ts,ps,mpeg2 decoder and analysis

mepg 2, iptv, stream parse,mov,mxf,gxf,ac3,aac

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  21 随笔 :: 0 文章 :: 54 评论 :: 0 Trackbacks

MXF class列举:


class CMXFDataStruct
{
public:
 CMXFDataStruct(void);
 ~CMXFDataStruct(void);

 BYTE *pGeneraltion_UID;
 BYTE *pInstance_ID;

 CMarkup _ElementXML;
 CString _strElementName;
 CString _strTypeBase;
};
typedef std::list< CMXFDataStruct *> MXFDATASTRUCTLIST;

typedef struct MPCDeviceTag
{
 char  szDeviceName[16];  /*device host name for load balance.*/
 int  nType;      /*device type for reserved.*/
 char szVersion[16];  /*reserved for device version. 4.2.35.6*/
 BYTE    bPDVersion;                 /* PD Version*/
 BYTE    bVixVersion;                /* Vix Version*/
 DWORD  nIndex;
}MPCDEVICE;
#define MPC_DEVICE_TOTAL_COUNT 4
typedef std::list< MPCDEVICE > MPCDEVICELIST;


//mxf packet header(16 BYTES)
typedef struct MXF_PACKETHEADTAG_
{
 unsigned char sync1;
 unsigned char sync2;
 unsigned char sync3;
 unsigned char sync4;

 unsigned char content[9];
 unsigned char PackKind;
 unsigned char State;
 unsigned char reserver;
 unsigned char BER_size;//the length
 unsigned char len[3];//the length = packet length(16) + payload length
}MXF_PACKETHEAD, *PMXF_PACKETHEAD;


//mxf Partition packet (16 BYTES)
typedef struct MXF_PARTITIONTAG_
{
 unsigned char Major_ver[2];
 unsigned char Min_ver[2];
 unsigned char KAG_size[4];
 unsigned char This_Partition[8];

 unsigned char Pre_Partition[8];
 unsigned char Foot_Partition[8];
 unsigned char HeadByteCount[8];
 BYTE IndexByteCount[8];
 BYTE indexSID[4];
 BYTE BodyOffset[8];
 BYTE BodySID[4];
 BYTE Operational[16];

}MXF_PARTITION, *PMXF_PARTITION;

//mxf Partition packet (16 BYTES)
typedef struct MXF_Local_TAG_

 BYTE LocalNumber[4];
 BYTE LocalSize[4];
 BYTE Guid[16];
}MXF_Local_TAG, *PMXF_Local_TAG;

//mxf Partition packet (16 BYTES)
typedef struct MXF_Local_TAG2_

 BYTE Local_tag[2];
 BYTE Guid[16];
}MXF_Local_TAG2, *PMXF_Local_TAG2;


enum Find_condition_mxf
{
 g_nFind_Identification = 1,
 g_nFind_pack,
 g_nFind_track,
 g_nFind_sequence,
 g_nFind_SourceClip,
 g_nFind_multipl_desc,
 g_nFind_sub_descriptor,
 g_nFind_Essence_container_data
};

typedef struct MXF_RP224_TAG_ // for Sequence

 BYTE CheckPart;
 BYTE Smpte_Index;
 LPTSTR lpContent;// Content[51];
 LPTSTR lpDescribe;// Describe[51]; // 16 * 3 + 1
}MXF_RP224_TAG, *PMXF_RP224_TAG;

 

class CMXF_SourceClip :public CMXFDataStruct // for SourceClip
{
public: 
 CMXF_SourceClip();
 ~CMXF_SourceClip();

 BYTE *pSourcePackageID;
 BYTE ElementType;
 DWORD Source_trackID;
};

typedef std::list< CMXF_SourceClip *> MXF_SOURCECLIP_LIST;

class CMXF_Sequence:public CMXFDataStruct // for Sequence
{
public: 
 CMXF_Sequence();
 ~CMXF_Sequence();  
 BYTE Seq_Type;
 MXF_SOURCECLIP_LIST ListSourceClip;
};

typedef std::list< CMXF_Sequence *> MXF_SEQUENCE_LIST;

class CMXF_Track :public CMXFDataStruct // for track
{
public: 
 CMXF_Track();
 ~CMXF_Track();
 CMXF_Sequence *pSequence; 
 DWORD Track_Number;
 BYTE  Track_Type; // 0=UNKNOWN, 3= timecode trick , 4= picture, 5= sound, 6= data,
   DWORD Track_ID;
};

typedef std::list< CMXF_Track *> MXF_TRACK_LIST;

class CMXF_Base_Descriptor :public CMXFDataStruct // Base_Descriptor

public:
 CMXF_Base_Descriptor();
 ~CMXF_Base_Descriptor();
 BYTE *pEsssence_Container;
 BYTE Smpte_Index;
};
class CMXF_Sub_descriptor:public CMXF_Base_Descriptor //Material_pack or source pack
{
public: 
 CMXF_Sub_descriptor();
 ~CMXF_Sub_descriptor();
 DWORD Link_Track_ID;
};

typedef std::list< CMXF_Sub_descriptor *> MXF_SUB_DESCRIPTOR_LIST;

class CMXF_Multiple_desc :public CMXF_Base_Descriptor //Multiple descriptor

public:
 CMXF_Multiple_desc();
 ~CMXF_Multiple_desc();
 MXF_SUB_DESCRIPTOR_LIST ListSubDesc;
 };

class CMXF_Package :public CMXFDataStruct //Material_pack or source pack

public:
 CMXF_Package();
 ~CMXF_Package();

 CMXF_Multiple_desc *pMultiple_desc;
 BYTE *pPackageUID;

 MXF_TRACK_LIST Listtrack;
 BYTE IsMaterial_pack; //0_unknow ,1_Material package, 2_ source package.
}; 
class CMXF_SourcePackage_ :public CMXF_Package // source pack

public:
 CMXF_SourcePackage_();
 ~CMXF_SourcePackage_();
};

class CMXF_Material_Package_ :public CMXF_Package //Material_pack

public:
 CMXF_Material_Package_();
 ~CMXF_Material_Package_(); 
};

typedef std::list< CMXF_Package *> MXF_PACK_LIST;

 

class CMXF_EssenceContainerData :public CMXFDataStruct//EssenceContainerData
{
public:
 CMXF_EssenceContainerData();
 ~CMXF_EssenceContainerData();     

 DWORD BodySID;
 DWORD IndexSID;
 BYTE *pLinkedPackageUID;

};
             
typedef std::list< CMXF_EssenceContainerData *> MXF_ESSENCECONTAINERDATA_LIST;

class CMXF_Content_storage :public CMXFDataStruct //Content_storage

public:
 CMXF_Content_storage();
 ~CMXF_Content_storage();

 MXF_PACK_LIST listPackage;                            
 MXF_ESSENCECONTAINERDATA_LIST listEssenceContainerData;
};

class CMXF_Identification :public CMXFDataStruct//Identification
{
public:
 CMXF_Identification();
 ~CMXF_Identification();     
};

typedef std::list< CMXF_Identification *> MXF_IDENTIFICATION_LIST;

class CMXF_Preface :public CMXFDataStruct//Material_pack or source pack
{
public:
 CMXF_Preface();
 ~CMXF_Preface();

 MXF_IDENTIFICATION_LIST listIdentification;
 CMXF_Content_storage Content_storage;
};

class CMXF_Production_Framework :public CMXFDataStruct//CMXF_Production_Framework
{
public:
 CMXF_Production_Framework();
 ~CMXF_Production_Framework();

};


class CMXFBaseTable :
    public CMXFBaseFun
{
public:
    CMXFBaseTable(void);
    ~CMXFBaseTable(void);
    BOOL Init();

    int Prase_Identification(BYTE *pBuf,DWORD PayloadLen);
    int Prase_Preface(BYTE *pBuf,DWORD PayloadLen);
    int Prase_sequence(BYTE *pBuf,DWORD PayloadLen);
    int Prase_RealData(BYTE *pBuf,DWORD PayloadLen);
    int Prase_SourceClip(BYTE *pBuf,DWORD PayloadLen);
    int Prase_TimeCode_Component(BYTE *pBuf,DWORD PayloadLen);
    int Prase_Content_storage(BYTE *pBuf,DWORD PayloadLen);
    int Prase_Material_pack(BYTE *pBuf,DWORD PayloadLen);
    int Prase_Track(BYTE *pBuf,DWORD PayloadLen,CString strPackageName);
    int PraseEssence_Container_data(BYTE *pBuf,DWORD PayloadLen);
    int PraseMetadata_CDCI_Essence_Desc(BYTE *pBuf,DWORD PayloadLen,BYTE nMpeg_desc = 0);
    int Prase_SourcePack(BYTE *pBuf,DWORD PayloadLen);
    int PraseSound_Essence_desc(BYTE *pBuf,DWORD PayloadLen,BYTE nIsPbuf47 = 0);
    int Prase_Multiple_desc(BYTE *pBuf,DWORD PayloadLen);
    int Prase_Generic_pack(BYTE *pBuf,DWORD PayloadLen,CString strPackageName,DWORD &CurOffset,BOOL ISMaterial_pack);
    int Prase_File_Descriptor(BYTE *pBuf,DWORD PayloadLen,CString strPackageName,DWORD &CurOffset,CMXF_Base_Descriptor *pMulti_desc,BOOL bDefaultIsError = TRUE);
    int Prase_Generic_Picture(BYTE *pBuf,DWORD PayloadLen,CString strPackageName,DWORD &CurOffset,BOOL bDefaultIsError = TRUE);
    int CDCIEssenceDescriptorType(BYTE *pBuf,DWORD PayloadLen,CString strPackageName,DWORD &CurOffset,BOOL bDefaultIsError = TRUE);
    int Prase_Generic_Sound(BYTE *pBuf,DWORD PayloadLen,CString strPackageName,DWORD &CurOffset,BOOL bDefaultIsError = TRUE);

    int Prase_Unknow_Sound(BYTE *pBuf,DWORD PayloadLen,CString strPackageName,DWORD &CurOffset,BOOL bDefaultIsError = TRUE);
    int Mpeg_Video_Descriptor(BYTE *pBuf,DWORD PayloadLen,CString strPackageName,DWORD &CurOffset,BOOL bDefaultIsErro = TRUE);

    int Prase_DM_Segment(BYTE *pBuf,DWORD PayloadLen);
    int Prase_DM_SourceClip(BYTE *pBuf,DWORD PayloadLen);

    void Release_all_list();
public:
    
    TracksMap *m_pTracksMap;
protected:
    CMXF_Preface *m_pPreface;

    //For previous package,It is not parsed.
    MXF_SEQUENCE_LIST m_Unknow_seqList;

    //For previous package,Its ID not found.
    MXF_SOURCECLIP_LIST m_Unknow_SourClipList;

    MXF_SUB_DESCRIPTOR_LIST m_Unknow_SubDescList;

private:
    int    CheckGeneration_UID(CString strLogName,BYTE *pBuf,DWORD PayloadLen);

posted on 2009-12-09 08:59 TS,MPEG2,dvbc专家 阅读(2519) 评论(9)  编辑 收藏 引用

评论

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2009-12-09 16:39 Pencil.C++
这都可以首页?  回复  更多评论
  

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2009-12-09 17:45
放到首页 是为了 寻找更多的mxf方面的专家,如果你也了解mxf,请我们多沟通,谢谢.  回复  更多评论
  

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2009-12-10 10:19 罗莱首页
世界的首都师大  回复  更多评论
  

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2009-12-10 13:02 fff
世界的首都师大--- 什么意思,搞不懂你的留言.  回复  更多评论
  

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2010-08-13 05:20 MXF expert
Do you cover anything in SMPTE380M - MXF descrptive metadata? Most of the TV stations require you to support DM in the workflow.
-- usouthal@hotmail.com  回复  更多评论
  

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2010-08-18 14:29
已经给你 回信了, 请关注,
int Prase_Production_Framework(BYTE *pBuf,DWORD PayloadLen);
int Prase_Clip_Framework(BYTE *pBuf,DWORD PayloadLen);
int Prase_Scene_Framework(BYTE *pBuf,DWORD PayloadLen);
int Prase_Titles(BYTE *pBuf,DWORD PayloadLen);
int Prase_Annotation(BYTE *pBuf,DWORD PayloadLen);  回复  更多评论
  

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2010-10-30 04:16 MXF expert
你为什么要自己写MXFSDK而不是用市场上已经有的,比如MOG, 或者Opencube? 在你的MXFSDK的基础上,你有没有开发应用软件?你在哪里工作?

  回复  更多评论
  

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2010-11-22 14:31 xx
学习了。  回复  更多评论
  

# re: MXF HeadMediaData,MXF Preface MXF文件格式, MXF文件解析,MXF Parse 2010-11-22 14:32 xx
学习了  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理


ts,ps,mpeg2 decoder and analysis,ts分析.