⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpeg_tsdemux.h

📁 这是DVD中伺服部分的核心代码
💻 H
字号:
/*****************************************************************************
******************************************************************************
**                                                                          **
**  Copyright (c) 2002 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_tsdemux.h
 *
 * MPEG Demux header file.
 *
 */
#ifndef MPEG_TSDEMUX_H
#define MPEG_TSDEMUX_H

#include "vcitypes.h"
#include "utility.h"
#include "mpgstruct.h"

/******************************************************************************
*******************************************************************************
**                                                                           **
**  MPEG Demux Defines                                                       **
**                                                                           **
*******************************************************************************
******************************************************************************/
#define MPEGTS_SUCCESS   FALSE
#define MPEGTS_FAILURE   TRUE

/**
 * @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
{
	NO_SYNC,
	PARTIAL_PID,
	FULL_PID,
	TS_DEMUX_EXIT
};

/******************************************************************************
*******************************************************************************
**                                                                           **
**  MPEG Demux Information Structure Definition                              **
**                                                                           **
*******************************************************************************
******************************************************************************/

#define INVALID_PID 0xFFFF 
#define INVALID_STREAM (-1) 

/**
 * @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 tagTSDemuxInfo
{
  /*
   *  Demux state
   */
  ULONG   ulDemuxState;

  /*
   *  Data pointers
   */
  SHORT wPID;
  SHORT wPIDIndex;
  BYTE *pbData;
  BYTE *pbPesHeader;
  BYTE *pbPayload;
  ULONG ulPayloadSize;
  ULONG ulPartialSize; //Added JPM

  /*
   *
   */
  BOOLEAN fBufferBeingUsed;
  SHORT   wSIPID;
  SHORT   wBufferSize;
  SHORT   wPacketSize;
  BYTE    bPSIBuffer[1200];

  BOOLEAN fPayloadUnitStart;
  /*
   *  Encryption data
   */
  ENCRYPTION_TYPE tDataEncryption;

  /*
   *  Synchronization data
   */
  ULONG   ulPCRBase;
  ULONG   ulPCRExt;
  BOOLEAN fPtsExisted;
  ULONG	  ulPTS;
  BOOLEAN fDtsExisted;
  ULONG	  ulDTS;
  
  DEMUXINPUTMESSAGE *messInput;   //Pointer to input stream
  BYTE              *pbInputData; //Pointer to the payload data
  ULONG             ulInputSize;  //Current size of the payload

  BYTE				  bPartialPacket[MPG_TRANSPORT_SIZE];

  /*
   *  Local copy of the Demux configuration information
   */
  DEMUXCONFIGINFO tConfigInfo;

  /*
   *  Pointer to the Demux configuration information
   */
  DEMUXCONFIGINFO *pDynamicConfigInfo;

} TSDEMUXINFO;

/******************************************************************************
*******************************************************************************
**                                                                           **
**  MPEG Demux Function Prototypes                                           **
**                                                                           **
*******************************************************************************
******************************************************************************/
/**
 * MPEG2TSDemuxThreadProc Function. Implements the state machine of the MPEG2
 * (Program Stream) Demux.
 *
 * @param
 *    PVOID pvDemuxInfo - Demux information
 *
 * @retval
 *    None.
 */
ULONG MPEG2TSDemuxThreadProc(PVOID pvDemuxInfo);
ULONG MPEG2TSDemuxGetErrorCnt( void );
void  MPEG2TSFlushPayload( void );


#endif

⌨️ 快捷键说明

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