Ap4Ipmp.h
Go to the documentation of this file.00001 /***************************************************************** 00002 | 00003 | AP4 - IPMP 00004 | 00005 | Copyright 2002-2008 Axiomatic Systems, LLC 00006 | 00007 | 00008 | This file is part of Bento4/AP4 (MP4 Atom Processing Library). 00009 | 00010 | Unless you have obtained Bento4 under a difference license, 00011 | this version of Bento4 is Bento4|GPL. 00012 | Bento4|GPL is free software; you can redistribute it and/or modify 00013 | it under the terms of the GNU General Public License as published by 00014 | the Free Software Foundation; either version 2, or (at your option) 00015 | any later version. 00016 | 00017 | Bento4|GPL is distributed in the hope that it will be useful, 00018 | but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 | GNU General Public License for more details. 00021 | 00022 | You should have received a copy of the GNU General Public License 00023 | along with Bento4|GPL; see the file COPYING. If not, write to the 00024 | Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 00025 | 02111-1307, USA. 00026 | 00027 ****************************************************************/ 00028 00029 #ifndef _AP4_IPMP_H_ 00030 #define _AP4_IPMP_H_ 00031 00032 /*---------------------------------------------------------------------- 00033 | includes 00034 +---------------------------------------------------------------------*/ 00035 #include "Ap4Types.h" 00036 #include "Ap4String.h" 00037 #include "Ap4Descriptor.h" 00038 00039 /*---------------------------------------------------------------------- 00040 | constants 00041 +---------------------------------------------------------------------*/ 00042 const AP4_UI08 AP4_DESCRIPTOR_TAG_IPMP_DESCRIPTOR_POINTER = 0x0A; 00043 const AP4_UI08 AP4_DESCRIPTOR_TAG_IPMP_DESCRIPTOR = 0x0B; 00044 00045 /*---------------------------------------------------------------------- 00046 | AP4_IpmpDescriptorPointer 00047 +---------------------------------------------------------------------*/ 00048 class AP4_IpmpDescriptorPointer : public AP4_Descriptor 00049 { 00050 public: 00051 AP4_IMPLEMENT_DYNAMIC_CAST_D(AP4_IpmpDescriptorPointer, AP4_Descriptor) 00052 00053 // methods 00054 AP4_IpmpDescriptorPointer(AP4_UI08 descriptor_id); 00055 AP4_IpmpDescriptorPointer(AP4_ByteStream& stream, 00056 AP4_Size header_size, 00057 AP4_Size payload_size); 00058 virtual AP4_Result WriteFields(AP4_ByteStream& stream); 00059 virtual AP4_Result Inspect(AP4_AtomInspector& inspector); 00060 00061 // accessors 00062 AP4_UI08 GetDescriptorId() const { return m_DescriptorId; } 00063 AP4_UI16 GetDescriptorIdEx() const { return m_DescriptorIdEx; } 00064 AP4_UI16 GetEsId() const { return m_EsId; } 00065 00066 private: 00067 // members 00068 AP4_UI08 m_DescriptorId; 00069 AP4_UI16 m_DescriptorIdEx; 00070 AP4_UI16 m_EsId; 00071 }; 00072 00073 /*---------------------------------------------------------------------- 00074 | AP4_IpmpDescriptor 00075 +---------------------------------------------------------------------*/ 00076 class AP4_IpmpDescriptor : public AP4_Descriptor 00077 { 00078 public: 00079 AP4_IMPLEMENT_DYNAMIC_CAST_D(AP4_IpmpDescriptor, AP4_Descriptor) 00080 00081 // methods 00082 AP4_IpmpDescriptor(AP4_UI08 descriptor_id, AP4_UI16 ipmps_type); 00083 AP4_IpmpDescriptor(AP4_ByteStream& stream, 00084 AP4_Size header_size, 00085 AP4_Size payload_size); 00086 virtual AP4_Result WriteFields(AP4_ByteStream& stream); 00087 virtual AP4_Result Inspect(AP4_AtomInspector& inspector); 00088 00089 // accessors 00090 AP4_UI08 GetDescriptorId() const { return m_DescriptorId; } 00091 AP4_UI16 GetIpmpsType() const { return m_IpmpsType; } 00092 AP4_UI16 GetDescriptorIdEx() const { return m_DescriptorIdEx; } 00093 const AP4_UI08* GetToolId() const { return m_ToolId; } 00094 AP4_UI08 GetControlPointCode() const { return m_ControlPointCode; } 00095 AP4_UI08 GetSequenceCode() const { return m_SequenceCode; } 00096 const AP4_String& GetUrl() const { return m_Url; } 00097 const AP4_DataBuffer& GetData() const { return m_Data; } 00098 void SetData(const unsigned char* data, AP4_Size data_size); 00099 00100 private: 00101 // members 00102 AP4_UI08 m_DescriptorId; 00103 AP4_UI16 m_IpmpsType; 00104 AP4_UI16 m_DescriptorIdEx; 00105 AP4_UI08 m_ToolId[16]; 00106 AP4_UI08 m_ControlPointCode; 00107 AP4_UI08 m_SequenceCode; 00108 AP4_String m_Url; 00109 AP4_DataBuffer m_Data; 00110 }; 00111 00112 #endif // _AP4_IPMP_H_
Generated on Thu May 13 16:36:32 2010 for Bento4 MP4 SDK by
