pe_istreamctrl_interface.cpp

来自「这是DVD中伺服部分的核心代码」· C++ 代码 · 共 1,595 行 · 第 1/4 页

CPP
1,595
字号
 * Assigns the pes_id video stream to the de-multiplexer for processing with ExtID and ExtVideo
 * Overloaded function
 *
 * @param handle    - iStrmCtrl handle.
 * @param lPesId    - Packetized elementary stream identifier.
 * @param VideoType - Primary Video Type
 * @param lExtID       - Extented Video ID
 * @param ExtVideoType - Extented Video type
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddVideoPS(PE_HANDLE handle, LONG lPesId, PE_ISTREAMCTRL_VIDEO_TYPE VideoType, LONG lExtID, PE_ISTREAMCTRL_VIDEO_EXT_TYPE ExtVideoType, PE_ISTREAMCTRL_INPUT input)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_VIDEO_PS, lPesId, input, VideoType, lExtID, ExtVideoType, PE_SYNC) );
}



/**
 * Assigns the pes_id video stream to the de-multiplexer for processing with ExtID and ExtVideo
 * Overloaded function
 *
 * @param handle    - iStrmCtrl handle.
 * @param lPesId    - Packetized elementary stream identifier.
 * @param VideoType - Primary Video Type
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddSecondaryVideoPS(PE_HANDLE handle, LONG lPesId, PE_ISTREAMCTRL_INPUT input, PE_ISTREAMCTRL_VIDEO_TYPE VideoType)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_SECONDARY_VIDEO_PS, lPesId, input, VideoType, 0, 0, PE_SYNC) );
}

/**
 * Assigns the pes_id video stream to the de-multiplexer for processing with ExtID and ExtVideo
 * Overloaded function
 *
 * @param handle    - iStrmCtrl handle.
 * @param lPesId    - Packetized elementary stream identifier.
 * @param VideoType - Primary Video Type
 * @param lExtID       - Extented Video ID
 * @param ExtVideoType - Extented Video type
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddSecondaryVideoPS(PE_HANDLE handle, LONG lPesId, PE_ISTREAMCTRL_VIDEO_TYPE VideoType, LONG lExtID, PE_ISTREAMCTRL_VIDEO_EXT_TYPE ExtVideoType, PE_ISTREAMCTRL_INPUT input)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_SECONDARY_VIDEO_PS, lPesId, input, VideoType, lExtID, ExtVideoType, PE_SYNC) );
}




/**
 * Assigns the pes_id and sub_id audio stream to the de-multiplexer for processing.
 *
 * @param handle - iStrmCtrl handle.
 * @param lPesId - Packetized elementary stream identifier.
 * @param lSubId - Substream identifier.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddAudioPS(PE_HANDLE handle, LONG lPesId, LONG lSubId, PE_ISTREAMCTRL_INPUT input,
    PE_ISTREAMCTRL_AUDIO_TYPE AudioType, PE_ISTREAMCTRL_AUDIO_ATTRIBUTES *pAudioAttr)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_AUDIO_PS, lPesId, lSubId, input,
        AudioType, (ULONG)pAudioAttr, PE_SYNC) );
}


/**
 * Assigns the pes_id and sub_id audio stream to the de-multiplexer for processing.
 *
 * @param handle - iStrmCtrl handle.
 * @param lPesId - Packetized elementary stream identifier.
 * @param lSubId - Substream identifier.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddSecondaryAudioPS(PE_HANDLE handle, LONG lPesId, LONG lSubId,
    PE_ISTREAMCTRL_INPUT input, PE_ISTREAMCTRL_AUDIO_TYPE AudioType, PE_ISTREAMCTRL_AUDIO_ATTRIBUTES *pAudioAttr)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_SECONDARY_AUDIO_PS,
       lPesId, lSubId, input, AudioType, (ULONG)pAudioAttr, PE_SYNC) );
}


/**
 * Assigns the pes_id and sub_id audio stream to the de-multiplexer for processing.
 *
 * @param handle - iStrmCtrl handle.
 * @param lPesId - Packetized elementary stream identifier.
 * @param lSubId - Substream identifier.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddSubstituteAudioPS(PE_HANDLE handle, LONG lPesId, LONG lSubId,
    PE_ISTREAMCTRL_INPUT input, PE_ISTREAMCTRL_AUDIO_TYPE AudioType, PE_ISTREAMCTRL_AUDIO_ATTRIBUTES *pAudioAttr)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_SUBSTITUTE_AUDIO_PS, lPesId, lSubId,
        input, AudioType, (ULONG)pAudioAttr, PE_SYNC) );
}

/**
 * Assigns the pes_id and sub_id sub-picture stream to the de-multiplexer for processing.
 *
 * @param handle - iStrmCtrl handle.
 * @param lPesId - Packetized elementary stream identifier.
 * @param lSubId - Substream identifier.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddSubpicPS(PE_HANDLE handle, LONG lPesId, LONG lSubId)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_SUBPIC_PS, lPesId, lSubId, 0, 0, 0, PE_SYNC) );
}

/**
 * Attaches a cStream to the PEConsumer input for control by the iStrmCtrl interface.
 * Assigns the PID for the video stream. Video is always on the main stream.
 * If the main stream PEConsumer is idle (not being used to demux) then it will become active.
 *
 * @param handle         - iStrmCtrl handle.
 * @param cstream_handle - Streaming class handle.
 * @param input          - which input pin to use on PEConsumer
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddVideoTS(PE_HANDLE handle, LONG lPID, PE_ISTREAMCTRL_INPUT input, PE_ISTREAMCTRL_VIDEO_TYPE VideoType)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_VIDEO_TS, lPID, input, VideoType, 0, 0, PE_SYNC) );
}

/**
 * Attaches a cStream to the PEConsumer input for control by the iStrmCtrl interface.
 * Assigns the PID for the audio stream, and specifies which input stream to associate with the demux.
 * The audio demux can only be added for the main stream, the application type 4 stream, or the
 * application_type 7 stream. For example, an attempt to add the audio demux to the application_type 5
 * stream should fail since this stream is intended for interactive graphics only.
 * There is only one primary audio demux available at a time. An attempt to add a new Audio demux
 * without first removing a currently attached demux will fail.
 * If the PEConsumer associated with the specified input stream is currently idle (not being used to demux) then it will become active.
 *
 * @param handle         - iStrmCtrl handle.
 * @param cstream_handle - Streaming class handle.
 * @param input          - which input pin to use on PEConsumer
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddAudioTS(PE_HANDLE handle, LONG lPID, PE_ISTREAMCTRL_INPUT input,
    PE_ISTREAMCTRL_AUDIO_TYPE AudioType, PE_ISTREAMCTRL_AUDIO_ATTRIBUTES *pAudioAttr)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_AUDIO_TS, lPID, input,
        AudioType, (ULONG)pAudioAttr, 0, PE_SYNC) );
}

/**
 * Attaches a cStream to the PEConsumer input for control by the iStrmCtrl interface.
 * Assigns the PID for the BD-ROM Presentation Graphics stream, and specifies which input stream to associate with the demux.
 * The PG stream can only be added for the main stream, or the application_type 7 stream.
 * The PG stream and the Subtext stream can not be demuxed at the same time. An attempt to add the PG demux without first removing the Subtext demux will fail.
 * There is only one PG demux available at a time. An attempt to add a new PG demux without first removing a current demux will fail.
 * If the PEConsumer associated with the specified input stream is currently idle (not being used to demux) then it will become active.
 *
 * @param handle         - iStrmCtrl handle.
 * @param cstream_handle - Streaming class handle.
 * @param input          - which input pin to use on PEConsumer
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddPGTS(PE_HANDLE handle, LONG lPID, PE_ISTREAMCTRL_INPUT input)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_PG_TS, lPID, input, 0, 0, 0, PE_SYNC) );
}

/**
 * Attaches a cStream to the PEConsumer input for control by the iStrmCtrl interface.
 * Assigns the PID for the BD-ROM Interactive Graphics stream, and specifies which input stream to associate with the demux.
 * The IG stream can only be added for the main stream, the application_type 5 stream, or the application_type 7 stream.
 * There is only one IG stream demux available at a time. An attempt to add a new IG demux without first removing a
 * currently attached demux will fail.
 * If the PEConsumer associated with the specified input stream is currently idle (not being used to demux) then it will become active.
 *
 * @param handle         - iStrmCtrl handle.
 * @param cstream_handle - Streaming class handle.
 * @param input          - which input pin to use on PEConsumer
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddIGTS(PE_HANDLE handle, LONG lPID, PE_ISTREAMCTRL_INPUT input)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_IG_TS, lPID, input, 0, 0, 0, PE_SYNC) );
}

/**
 * Attaches a cStream to the PEConsumer input for control by the iStrmCtrl interface.
 *
 * @param handle         - iStrmCtrl handle.
 * @param cstream_handle - Streaming class handle.
 * @param input          - which input pin to use on PEConsumer
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddSubtextTS(PE_HANDLE handle, LONG lPID, PE_ISTREAMCTRL_INPUT input)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_SUBTEXT_TS, lPID, input, 0, 0, 0, PE_SYNC) );
}

/**
 * Attaches a cStream to the PEConsumer input for control by the iStrmCtrl interface.
 *
 * @param handle         - iStrmCtrl handle.
 * @param cstream_handle - Streaming class handle.
 * @param input          - which input pin to use on PEConsumer
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxAddSecondaryAudioTS(PE_HANDLE handle, LONG lPID, PE_ISTREAMCTRL_INPUT input,
    PE_ISTREAMCTRL_AUDIO_TYPE AudioType, PE_ISTREAMCTRL_AUDIO_ATTRIBUTES *pAudioAttr)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_DEMUX_SECONDARY_AUDIO_TS, lPID, input,
        AudioType, (ULONG)pAudioAttr, 0, PE_SYNC) );
}

/**
 * Detaches the video output stream from the de-multiplexer.
 *
 * @param handle - iStrmCtrl handle.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxRemoveVideo(PE_HANDLE handle)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_REMOVE_VIDEO, 0, 0, 0, 0, 0, PE_ASYNC) );
}

/**
 * Detaches the video output stream from the de-multiplexer.
 *
 * @param handle - iStrmCtrl handle.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxRemoveSecondaryVideo(PE_HANDLE handle)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_REMOVE_SECONDARY_VIDEO, 0, 0, 0, 0, 0, PE_ASYNC) );
}

/**
 * Detaches the audio output stream from the de-multiplexer.
 *
 * @param handle - iStrmCtrl handle.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxRemoveAudio(PE_HANDLE handle)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_REMOVE_AUDIO, 0, 0, 0, 0, 0, PE_ASYNC) );
}

/**
 * Detaches the sub-picture output stream from the de-multiplexer.
 *
 * @param handle - iStrmCtrl handle.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxRemoveSubpic(PE_HANDLE handle)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_REMOVE_SUBPIC, 0, 0, 0, 0, 0, PE_ASYNC) );
}

/**
 * Detaches the bdrom presentation graphics PID from the de-multiplexer.
 *
 * @param handle - iStrmCtrl handle.
 *
 * @return PE_STATUS - Error code.
 */
PE_STATUS PEiStreamCtrlDemuxRemovePG(PE_HANDLE handle)
{
    /* verify input */
    if (NULL == handle)
    {
        return (PE_INVALID_HANDLE);
    }

    return ( peiStrmSendMessage( ((PEHANDLE *)handle)->iStreamCtrl, PE_REMOVE_PG, 0, 0, 0, 0, 0, PE_ASYNC) );
}

/**
 * Detaches the bdrom interactive graphics PID from the de-multiplexer.
 *
 * @param handle - iStrmCtrl handle.
 *
 * @return PE_STATUS - Error code.
 */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?