pcr.h
上传用户:thjx518
上传日期:2022-03-16
资源大小:179k
文件大小:1k
源码类别:

mpeg/mp3

开发平台:

Visual C++

  1. #ifndef  DVBSEND_H
  2. #define  DVBSEND_H
  3. #pragma pack(1)
  4. typedef struct {
  5.         unsigned char SyncByte;
  6.         unsigned short PID:13;
  7.         unsigned short TransPortPriority:1;
  8.         unsigned short PayLoadUnitStartIndicator:1;
  9.         unsigned short TransportErrorIndicator:1;
  10.        
  11.         unsigned char continuity_conter:4;
  12.                 unsigned char adptation_field_control:2;
  13.                 unsigned char transport_scrambling_conreol:2;
  14. }TS;
  15. typedef struct{
  16.         unsigned char adaptation_field_length;
  17.         unsigned char filled:4;
  18.         unsigned char pcr_flag:1;
  19.         unsigned char elementaty_stream_priority_indicator:1;
  20.         unsigned char random_access_indicator:1;
  21.         unsigned char discontinuity_indicator:1;
  22.         unsigned long pcr_base;      //__int_32
  23.         unsigned short pcr_ext:9;
  24.         unsigned short reserved:6;
  25.         unsigned short pcr_basebit:1;
  26. }Adaptor;
  27. #pragma pack()
  28. char *FindType(char *buf,int len,int Type);
  29. void GetElementPID(const char *filename,USHORT pcrpid,long *bitrate);
  30. void SetPCR(UCHAR*pack,__int64 pcrvalue);
  31. #endif