AP4_Atom Class Reference

Abstract base class for all atom types. More...

#include <Ap4Atom.h>

Inheritance diagram for AP4_Atom:

AP4_3GppLocalizedStringAtom AP4_AvccAtom AP4_Co64Atom AP4_ContainerAtom AP4_CttsAtom AP4_DataAtom AP4_DcfdAtom AP4_DcfStringAtom AP4_ElstAtom AP4_EsdsAtom AP4_FrmaAtom AP4_FtypAtom AP4_GrpiAtom AP4_HdlrAtom AP4_HmhdAtom AP4_IkmsAtom AP4_IodsAtom AP4_IsfmAtom AP4_IsltAtom AP4_MdhdAtom AP4_MetaDataStringAtom AP4_MvhdAtom AP4_NmhdAtom AP4_OdafAtom AP4_OddaAtom AP4_RtpAtom AP4_SchmAtom AP4_SdpAtom AP4_SmhdAtom AP4_StcoAtom AP4_StscAtom AP4_StssAtom AP4_StszAtom AP4_SttsAtom AP4_TimsAtom AP4_TkhdAtom AP4_TrefTypeAtom AP4_UnknownAtom AP4_UrlAtom AP4_UuidAtom AP4_VmhdAtom

List of all members.

Public Types

typedef AP4_UI32 Type

Public Member Functions

 AP4_Atom (Type type, AP4_UI32 size=AP4_ATOM_HEADER_SIZE)
 Create a simple atom with a specified type and 32-bit size.
 AP4_Atom (Type type, AP4_UI64 size, bool force_64=false)
 Create a simple atom with a specified type and 64-bit size.
 AP4_Atom (Type type, AP4_UI32 size, AP4_UI32 version, AP4_UI32 flags)
 Create a full atom with a specified type, 32-bit size, version and flags.
 AP4_Atom (Type type, AP4_UI64 size, bool force_64, AP4_UI32 version, AP4_UI32 flags)
 Create a full atom with a specified type, 64-bit size, version and flags.
virtual ~AP4_Atom ()
Type GetType () const
void SetType (Type type)
AP4_Size GetHeaderSize () const
AP4_UI64 GetSize () const
void SetSize (AP4_UI64 size, bool force_64=false)
AP4_UI32 GetSize32 () const
void SetSize32 (AP4_UI32 size)
AP4_UI64 GetSize64 () const
void SetSize64 (AP4_UI64 size)
virtual AP4_Result Write (AP4_ByteStream &stream)
virtual AP4_Result WriteHeader (AP4_ByteStream &stream)
virtual AP4_Result WriteFields (AP4_ByteStream &stream)=0
virtual AP4_Result Inspect (AP4_AtomInspector &inspector)
virtual AP4_Result InspectHeader (AP4_AtomInspector &inspector)
virtual AP4_Result InspectFields (AP4_AtomInspector &)
virtual AP4_Result SetParent (AP4_AtomParent *parent)
virtual AP4_AtomParentGetParent ()
virtual AP4_Result Detach ()
virtual AP4_AtomClone ()
 Create a clone of the object.

Static Public Member Functions

static Type TypeFromString (const char *four_cc)
static AP4_Result ReadFullHeader (AP4_ByteStream &stream, AP4_UI32 &version, AP4_UI32 &flags)

Protected Attributes

Type m_Type
AP4_UI32 m_Size32
AP4_UI64 m_Size64
bool m_IsFull
AP4_UI32 m_Version
AP4_UI32 m_Flags
AP4_AtomParentm_Parent


Detailed Description

Abstract base class for all atom types.

Definition at line 116 of file Ap4Atom.h.


Member Typedef Documentation

Definition at line 119 of file Ap4Atom.h.


Constructor & Destructor Documentation

AP4_Atom::AP4_Atom ( Type  type,
AP4_UI32  size = AP4_ATOM_HEADER_SIZE 
)

Create a simple atom with a specified type and 32-bit size.

AP4_Atom::AP4_Atom ( Type  type,
AP4_UI64  size,
bool  force_64 = false 
)

Create a simple atom with a specified type and 64-bit size.

AP4_Atom::AP4_Atom ( Type  type,
AP4_UI32  size,
AP4_UI32  version,
AP4_UI32  flags 
)

Create a full atom with a specified type, 32-bit size, version and flags.

AP4_Atom::AP4_Atom ( Type  type,
AP4_UI64  size,
bool  force_64,
AP4_UI32  version,
AP4_UI32  flags 
)

Create a full atom with a specified type, 64-bit size, version and flags.

virtual AP4_Atom::~AP4_Atom (  )  [inline, virtual]

Definition at line 156 of file Ap4Atom.h.


Member Function Documentation

static Type AP4_Atom::TypeFromString ( const char *  four_cc  )  [static]

static AP4_Result AP4_Atom::ReadFullHeader ( AP4_ByteStream stream,
AP4_UI32 version,
AP4_UI32 flags 
) [static]

Type AP4_Atom::GetType (  )  const [inline]

Definition at line 159 of file Ap4Atom.h.

References m_Type.

Referenced by AP4_AtomFinder::Test().

void AP4_Atom::SetType ( Type  type  )  [inline]

Definition at line 160 of file Ap4Atom.h.

References m_Type.

AP4_Size AP4_Atom::GetHeaderSize (  )  const

AP4_UI64 AP4_Atom::GetSize (  )  const [inline]

Definition at line 162 of file Ap4Atom.h.

References m_Size32, and m_Size64.

void AP4_Atom::SetSize ( AP4_UI64  size,
bool  force_64 = false 
)

AP4_UI32 AP4_Atom::GetSize32 (  )  const [inline]

Definition at line 164 of file Ap4Atom.h.

References m_Size32.

void AP4_Atom::SetSize32 ( AP4_UI32  size  )  [inline]

Definition at line 165 of file Ap4Atom.h.

References m_Size32.

AP4_UI64 AP4_Atom::GetSize64 (  )  const [inline]

Definition at line 166 of file Ap4Atom.h.

References m_Size64.

void AP4_Atom::SetSize64 ( AP4_UI64  size  )  [inline]

Definition at line 167 of file Ap4Atom.h.

References m_Size64.

virtual AP4_Result AP4_Atom::Write ( AP4_ByteStream stream  )  [virtual]

Reimplemented in AP4_SampleEntry.

virtual AP4_Result AP4_Atom::WriteHeader ( AP4_ByteStream stream  )  [virtual]

virtual AP4_Result AP4_Atom::WriteFields ( AP4_ByteStream stream  )  [pure virtual]

virtual AP4_Result AP4_Atom::Inspect ( AP4_AtomInspector inspector  )  [virtual]

Reimplemented in AP4_SampleEntry.

Referenced by AP4_AtomListInspector::Action().

virtual AP4_Result AP4_Atom::InspectHeader ( AP4_AtomInspector inspector  )  [virtual]

virtual AP4_Result AP4_Atom::InspectFields ( AP4_AtomInspector  )  [inline, virtual]

virtual AP4_Result AP4_Atom::SetParent ( AP4_AtomParent parent  )  [inline, virtual]

Definition at line 178 of file Ap4Atom.h.

References AP4_SUCCESS, and m_Parent.

virtual AP4_AtomParent* AP4_Atom::GetParent (  )  [inline, virtual]

Definition at line 182 of file Ap4Atom.h.

References m_Parent.

virtual AP4_Result AP4_Atom::Detach (  )  [virtual]

virtual AP4_Atom* AP4_Atom::Clone (  )  [virtual]

Create a clone of the object.

This method returns a clone of the atom, or NULL if the atom cannot be cloned. Override this if your want to make an atom cloneable in a more efficient way than the default implementation.

Reimplemented in AP4_UnknownAtom, AP4_ContainerAtom, AP4_GrpiAtom, AP4_IkmsAtom, AP4_IsfmAtom, and AP4_OhdrAtom.


Member Data Documentation

Type AP4_Atom::m_Type [protected]

Definition at line 196 of file Ap4Atom.h.

Referenced by GetType(), and SetType().

Definition at line 197 of file Ap4Atom.h.

Referenced by GetSize(), GetSize32(), and SetSize32().

Definition at line 198 of file Ap4Atom.h.

Referenced by GetSize(), GetSize64(), and SetSize64().

bool AP4_Atom::m_IsFull [protected]

Definition at line 200 of file Ap4Atom.h.

Definition at line 201 of file Ap4Atom.h.

Definition at line 202 of file Ap4Atom.h.

Definition at line 203 of file Ap4Atom.h.

Referenced by GetParent(), and SetParent().


The documentation for this class was generated from the following file:

Generated on Mon Sep 29 10:53:38 2008 for Bento4 MP4 SDK by  doxygen 1.5.6