📄 mpeg_demux.h
字号:
/*****************************************************************************
******************************************************************************
** **
** Copyright (c) 2006 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
******************************************************************************
*****************************************************************************/
/**
* @file mpeg_demux.h
*
* MPEG Demux header file.
*
* $Id: mpeg_demux.h,v 1.9 2006/10/25 20:09:19 rbehe Exp $
*/
#ifndef MPEG_DEMUX_H
#define MPEG_DEMUX_H
#include "vcitypes.h"
#include "utility.h"
#include "mpgstruct.h"
/******************************************************************************
*******************************************************************************
** **
** MPEG Demux Defines **
** **
*******************************************************************************
******************************************************************************/
/**
* @def MPEG Demux Update Defines
* @brief Flags used to update different lengths in the Demux information
* structure.
*/
#define UPDATE_NONE 0x00
#define UPDATE_PDL_PHDL 0x03
#define UPDATE_PDL 0x01
#define UPDATE_PHDL 0x02
#define UPDATE_SCRIDL 0x04
/******************************************************************************
*******************************************************************************
** **
** MPEG Demux Enumerations **
** **
*******************************************************************************
******************************************************************************/
/**
* @def MPEG Demux State Enumeration
* @brief The possible states of the MPEG1 Demux and the MPEG2 Demux.
*/
enum
{
FIND_START_CODE = 0,
PACK_HEADER,
SYSTEM_HEADER,
PADDING_STREAM,
PRIVATE_STREAM_1,
PRIVATE_STREAM_2,
DATA_STREAM,
SEND_MESSAGE,
SKIP_STREAM,
DEMUX_STOP,
DEMUX_EXIT
};
/******************************************************************************
*******************************************************************************
** **
** MPEG Demux Information Structure Definition **
** **
*******************************************************************************
******************************************************************************/
/**
* @def DEMUXINFO
* @brief Defines the information structure of the Demux.
*
* Records the information of the Demux including the state information and
* the configuration information.
*/
typedef struct tagDemuxInfo
{
/* Demux state */
ULONG ulDemuxState;
/* Data pointers */
BYTE *pbData;
BYTE *pbPack;
BYTE *pbPacket;
BYTE *pbBypassData;
/* Data lengths */
ULONG ulDataLength;
ULONG ulPacketDataLength;
ULONG ulPesHeaderDataLength;
ULONG ulSCRInfoDataLength;
/* Start codes and stream IDs */
ULONG ulStartCode;
BYTE bPesID;
BYTE bSubID;
/* Start of stream variables */
BOOLEAN fSystemHeaderFound;
/* Encryption data */
ENCRYPTION_TYPE tDataEncryption;
/* Synchronization data */
ULONG ulSCRBase;
ULONG ulSCRExt;
BOOLEAN fPtsExisted;
ULONG ulPTS;
BOOLEAN fDtsExisted;
ULONG ulDTS;
/* Copy of current input message */
DEMUXINPUTMESSAGE tInMessage;
/* Local copy of the Demux configuration information */
DEMUXCONFIGINFO tConfigInfo;
/* Pointer to the Demux configuration information */
DEMUXCONFIGINFO *pDynamicConfigInfo;
} DEMUXINFO;
/******************************************************************************
*******************************************************************************
** **
** MPEG Demux Function Prototypes **
** **
*******************************************************************************
******************************************************************************/
void MPEGFlushPayload(void);
/**
* MPEGDemuxGetErrorCnt Function. Returns the number of demux errors.
*
* @param
* None.
*
* @retval
* ULONG ulDemuxErrorCnt - number of demux errors.
*/
ULONG MPEGDemuxGetErrorCnt( void );
/**
* MPEG1DemuxThreadProc Function. Implements the state machine of the MPEG1
* (System Stream) Demux.
*
* @param
* PVOID pvDemuxInfo - Demux configuration information
*
* @retval
* None.
*/
ULONG MPEG1DemuxThreadProc(PVOID pvDemuxInfo);
/**
* MPEG2DemuxThreadProc Function. Implements the state machine of the MPEG2
* (Program Stream) Demux.
*
* @param
* PVOID pvDemuxInfo - Demux information
*
* @retval
* None.
*/
ULONG MPEG2DemuxThreadProc(PVOID pvDemuxInfo);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -