Commit bf89c903 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

ASF: split GUID in a separate header file

parent 30e4a13f
......@@ -2,6 +2,7 @@ SOURCES_asf = \
asf.c \
libasf.c \
libasf.h \
libasf_guid.h \
$(NULL)
libvlc_LTLIBRARIES += libasf_plugin.la
......@@ -121,7 +121,7 @@ static int Open( vlc_object_t * p_this )
if( stream_Peek( p_demux->s, &p_peek, 16 ) < 16 ) return VLC_EGENERIC;
ASF_GetGUID( &guid, p_peek );
if( !ASF_CmpGUID( &guid, &asf_object_header_guid ) ) return VLC_EGENERIC;
if( !CmpGUID( &guid, &asf_object_header_guid ) ) return VLC_EGENERIC;
/* Set p_demux fields */
p_demux->pf_demux = Demux;
......@@ -167,7 +167,7 @@ static int Demux( demux_t *p_demux )
guid_t guid;
ASF_GetGUID( &guid, p_peek );
if( ASF_CmpGUID( &guid, &asf_object_header_guid ) )
if( CmpGUID( &guid, &asf_object_header_guid ) )
{
msg_Warn( p_demux, "found a new ASF header" );
/* We end this stream */
......@@ -826,7 +826,7 @@ static int DemuxInit( demux_t *p_demux )
es_format_t fmt;
if( ASF_CmpGUID( &p_sp->i_stream_type, &asf_object_stream_type_audio ) &&
if( CmpGUID( &p_sp->i_stream_type, &asf_object_stream_type_audio ) &&
p_sp->i_type_specific_data_length >= sizeof( WAVEFORMATEX ) - 2 )
{
uint8_t *p_data = p_sp->p_type_specific_data;
......@@ -856,7 +856,7 @@ static int DemuxInit( demux_t *p_demux )
msg_Dbg( p_demux, "added new audio stream(codec:0x%x,ID:%d)",
GetWLE( p_data ), p_sp->i_stream_number );
}
else if( ASF_CmpGUID( &p_sp->i_stream_type,
else if( CmpGUID( &p_sp->i_stream_type,
&asf_object_stream_type_video ) &&
p_sp->i_type_specific_data_length >= 11 +
sizeof( BITMAPINFOHEADER ) )
......@@ -931,7 +931,7 @@ static int DemuxInit( demux_t *p_demux )
msg_Dbg( p_demux, "added new video stream(ID:%d)",
p_sp->i_stream_number );
}
else if( ASF_CmpGUID( &p_sp->i_stream_type, &asf_object_extended_stream_header ) &&
else if( CmpGUID( &p_sp->i_stream_type, &asf_object_extended_stream_header ) &&
p_sp->i_type_specific_data_length >= 64 )
{
/* Now follows a 64 byte header of which we don't know much */
......@@ -940,7 +940,7 @@ static int DemuxInit( demux_t *p_demux )
unsigned int i_data = p_sp->i_type_specific_data_length - 64;
msg_Dbg( p_demux, "Ext stream header detected. datasize = %d", p_sp->i_type_specific_data_length );
if( ASF_CmpGUID( p_ref, &asf_object_extended_stream_type_audio ) &&
if( CmpGUID( p_ref, &asf_object_extended_stream_type_audio ) &&
i_data >= sizeof( WAVEFORMATEX ) - 2)
{
int i_format;
......
......@@ -114,29 +114,6 @@ static char *AsfObjectHelperReadString( const uint8_t *p_peek, int i_peek, uint8
****************************************************************************/
static int ASF_ReadObject( stream_t *, asf_object_t *, asf_object_t * );
/****************************************************************************
* GUID functions
****************************************************************************/
void ASF_GetGUID( guid_t *p_guid, const uint8_t *p_data )
{
p_guid->v1 = GetDWLE( p_data );
p_guid->v2 = GetWLE( p_data + 4);
p_guid->v3 = GetWLE( p_data + 6);
memcpy( p_guid->v4, p_data + 8, 8 );
}
bool ASF_CmpGUID( const guid_t *p_guid1, const guid_t *p_guid2 )
{
if( (p_guid1->v1 != p_guid2->v1 )||
(p_guid1->v2 != p_guid2->v2 )||
(p_guid1->v3 != p_guid2->v3 )||
( memcmp( p_guid1->v4, p_guid2->v4,8 )) )
{
return false;
}
return true;
}
/****************************************************************************
*
****************************************************************************/
......@@ -1312,9 +1289,9 @@ static int ASF_ReadObject( stream_t *s, asf_object_t *p_obj,
/* find this object */
for( i_index = 0; ; i_index++ )
{
if( ASF_CmpGUID( ASF_Object_Function[i_index].p_id,
if( CmpGUID( ASF_Object_Function[i_index].p_id,
&p_obj->common.i_object_id ) ||
ASF_CmpGUID( ASF_Object_Function[i_index].p_id,
CmpGUID( ASF_Object_Function[i_index].p_id,
&asf_object_null_guid ) )
{
break;
......@@ -1373,9 +1350,9 @@ static void ASF_FreeObject( stream_t *s, asf_object_t *p_obj )
/* find this object */
for( i_index = 0; ; i_index++ )
{
if( ASF_CmpGUID( ASF_Object_Function[i_index].p_id,
if( CmpGUID( ASF_Object_Function[i_index].p_id,
&p_obj->common.i_object_id )||
ASF_CmpGUID( ASF_Object_Function[i_index].p_id,
CmpGUID( ASF_Object_Function[i_index].p_id,
&asf_object_null_guid ) )
{
break;
......@@ -1446,7 +1423,7 @@ static void ASF_ObjectDumpDebug( vlc_object_t *p_obj,
/* Find the name */
for( i = 0; ASF_ObjectDumpDebugInfo[i].p_id != NULL; i++ )
{
if( ASF_CmpGUID( ASF_ObjectDumpDebugInfo[i].p_id,
if( CmpGUID( ASF_ObjectDumpDebugInfo[i].p_id,
&p_node->i_object_id ) )
break;
}
......@@ -1619,7 +1596,7 @@ int __ASF_CountObject( asf_object_t *p_obj, const guid_t *p_guid )
p_child = p_obj->common.p_first;
while( p_child )
{
if( ASF_CmpGUID( &p_child->common.i_object_id, p_guid ) )
if( CmpGUID( &p_child->common.i_object_id, p_guid ) )
i_count++;
p_child = p_child->common.p_next;
......@@ -1636,7 +1613,7 @@ void *__ASF_FindObject( asf_object_t *p_obj, const guid_t *p_guid,
while( p_child )
{
if( ASF_CmpGUID( &p_child->common.i_object_id, p_guid ) )
if( CmpGUID( &p_child->common.i_object_id, p_guid ) )
{
if( i_number == 0 )
return p_child;
......
......@@ -24,177 +24,8 @@
/*****************************************************************************
* Structure needed for decoder
*****************************************************************************/
typedef struct guid_s
{
uint32_t v1; /* le */
uint16_t v2; /* le */
uint16_t v3; /* le */
uint8_t v4[8];
} guid_t;
#define GUID_FMT "0x%x-0x%x-0x%x-0x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
#define GUID_PRINT( guid ) \
(guid).v1, \
(guid).v2, \
(guid).v3, \
(guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3], \
(guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
enum
{
ASF_OBJECT_NULL = 0,
ASF_OBJECT_ROOT,
ASF_OBJECT_HEADER,
ASF_OBJECT_DATA,
ASF_OBJECT_INDEX,
ASF_OBJECT_FILE_PROPERTIES,
ASF_OBJECT_STREAM_PROPERTIES,
ASF_OBJECT_HEADER_EXTENSION,
ASF_OBJECT_CODEC_LIST,
ASF_OBJECT_MARKER,
ASF_OBJECT_CONTENT_DESCRIPTION,
ASF_OBJECT_METADATA,
ASF_OBJECT_PADDING,
ASF_OBJECT_OTHER,
};
static const guid_t asf_object_null_guid =
{
0x00000000,
0x0000,
0x0000,
{ 0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00 }
};
/* Top-Level object */
static const guid_t asf_object_header_guid =
{0x75B22630, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
static const guid_t asf_object_data_guid =
{0x75B22636, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
static const guid_t asf_object_simple_index_guid =
{0x33000890, 0xE5B1, 0x11CF, {0x89, 0xF4, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xCB}};
static const guid_t asf_object_index_guid =
{0xD6E229D3, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
/* Header object */
static const guid_t asf_object_file_properties_guid =
{0x8cabdca1, 0xa947, 0x11cf, {0x8e, 0xe4, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65}};
static const guid_t asf_object_stream_properties_guid =
{0xB7DC0791, 0xA9B7, 0x11CF, {0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65}};
static const guid_t asf_object_header_extension_guid =
{0x5FBF03B5, 0xA92E, 0x11CF, {0x8E, 0xE3, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65}};
static const guid_t asf_object_codec_list_guid =
{0x86D15240, 0x311D, 0x11D0, {0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}};
static const guid_t asf_object_marker_guid =
{0xF487CD01, 0xA951, 0x11CF, {0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65}};
static const guid_t asf_object_content_description_guid =
{0x75B22633, 0x668E, 0x11CF, {0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c}};
static const guid_t asf_object_extended_content_description =
{0xD2D0A440, 0xE307, 0x11D2, {0x97, 0xF0, 0x00, 0xA0, 0xC9, 0x5E, 0xA8, 0x50}};
/* Header Extension object */
static const guid_t asf_object_advanced_mutual_exclusion =
{0xA08649CF, 0x4775, 0x4670, {0x8A, 0x16, 0x6E, 0x35, 0x35, 0x75, 0x66, 0xCD}};
static const guid_t asf_object_stream_prioritization =
{0xD4FED15B, 0x88D3, 0x454F, {0x81, 0xF0, 0xED, 0x5C, 0x45, 0x99, 0x9E, 0x24}};
static const guid_t asf_object_metadata_guid =
{0xC5F8CBEA, 0x5BAF, 0x4877, {0x84, 0x67, 0xAA, 0x8C, 0x44, 0xFA, 0x4C, 0xCA}};
/* Stream Properties object */
static const guid_t asf_object_stream_type_audio =
{0xF8699E40, 0x5B4D, 0x11CF, {0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B}};
static const guid_t asf_object_stream_type_video =
{0xbc19efc0, 0x5B4D, 0x11CF, {0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B}};
static const guid_t asf_object_stream_type_command =
{0x59DACFC0, 0x59E6, 0x11D0, {0xA3, 0xAC, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}};
/* TODO */
// top-level
static const guid_t asf_object_media_index_guid =
{0xFEB103F8, 0x12AD, 0x4C64, {0x84, 0x0F, 0x2A, 0x1D, 0x2F, 0x7A, 0xD4, 0x8C}};
static const guid_t asf_object_timecode_index_guid =
{0x3CB73FD0, 0x0C4A, 0x4803, {0x95, 0x3D, 0xED, 0xF7, 0xB6, 0x22, 0x8F, 0x0C}};
// header
static const guid_t asf_object_script_command_guid =
{0x1EFB1A30, 0x0B62, 0x11D0, {0xA3, 0x9B, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}};
static const guid_t asf_object_bitrate_mutual_exclusion_guid =
{0xD6E229DC, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
static const guid_t asf_object_error_correction_guid =
{0x75B22635, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
static const guid_t asf_object_content_branding_guid =
{0x2211B3FA, 0xBD23, 0x11D2, {0xB4, 0xB7, 0x00, 0xA0, 0xC9, 0x55, 0xFC, 0x6E}};
static const guid_t asf_object_stream_bitrate_properties =
{0x7BF875CE, 0x468D, 0x11D1, {0x8D, 0x82, 0x00, 0x60, 0x97, 0xC9, 0xA2, 0xB2}};
static const guid_t asf_object_content_encryption_guid =
{0x2211B3FB, 0xBD23, 0x11D2, {0xB4, 0xB7, 0x00, 0xA0, 0xC9, 0x55, 0xFC, 0x6E}};
static const guid_t asf_object_extended_content_encryption_guid =
{0x298AE614, 0x2622, 0x4C17, {0xB9, 0x35, 0xDA, 0xE0, 0x7E, 0xE9, 0x28, 0x9C}};
static const guid_t asf_object_digital_signature_guid =
{0x2211B3FC, 0xBD23, 0x11D2, {0xB4, 0xB7, 0x00, 0xA0, 0xC9, 0x55, 0xFC, 0x6E}};
static const guid_t asf_object_padding =
{0x1806D474, 0xCADF, 0x4509, {0xA4, 0xBA, 0x9A, 0xAB, 0xCB, 0x96, 0xAA, 0xE8}};
// header extension
static const guid_t asf_object_extended_stream_properties_guid =
{0x14E6A5CB, 0xC672, 0x4332, {0x83, 0x99, 0xA9, 0x69, 0x52, 0x06, 0x5B, 0x5A}};
static const guid_t asf_object_group_mutual_exclusion_guid =
{0xD1465A40, 0x5A79, 0x4338, {0xB7, 0x1B, 0xE3, 0x6B, 0x8F, 0xD6, 0xC2, 0x49}};
static const guid_t asf_object_bandwidth_sharing_guid =
{0xA69609E6, 0x517B, 0x11D2, {0xB6, 0xAF, 0x00, 0xC0, 0x4F, 0xD9, 0x08, 0xE9}};
static const guid_t asf_object_language_list =
{0x7C4346A9, 0xEFE0, 0x4BFC, {0xB2, 0x29, 0x39, 0x3E, 0xDE, 0x41, 0x5C, 0x85}};
static const guid_t asf_object_metadata_library_guid =
{0x44231C94, 0x9498, 0x49D1, {0xA1, 0x41, 0x1D, 0x13, 0x4E, 0x45, 0x70, 0x54}};
static const guid_t asf_object_index_parameters_guid =
{0xD6E229DF, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
static const guid_t asf_object_media_object_index_parameters_guid =
{0x6B203BAD, 0x3F11, 0x48E4, {0xAC, 0xA8, 0xD7, 0x61, 0x3D, 0xE2, 0xCF, 0xA7}};
static const guid_t asf_object_timecode_index_parameters_guid =
{0xF55E496D, 0x9797, 0x4B5D, {0x8C, 0x8B, 0x60, 0x4D, 0xFE, 0x9B, 0xFB, 0x24}};
static const guid_t asf_object_compatibility_guid =
{0x26F18B5D, 0x4584, 0x47EC, {0x9F, 0x5F, 0x0E, 0x65, 0x1F, 0x04, 0x52, 0xC9}};
static const guid_t asf_object_advanced_content_encryption_guid =
{0x43058533, 0x6981, 0x49E6, {0x9B, 0x74, 0xAD, 0x12, 0xCB, 0x86, 0xD5, 0x8C}};
//
static const guid_t asf_object_extended_stream_header =
{0x3AFB65E2, 0x47EF, 0x40F2, {0xAC, 0x2C, 0x70, 0xA9, 0x0D, 0x71, 0xD3, 0x43}};
static const guid_t asf_object_extended_stream_type_audio =
{0x31178C9D, 0x03E1, 0x4528, {0xB5, 0x82, 0x3D, 0xF9, 0xDB, 0x22, 0xF5, 0x03}};
#include "libasf_guid.h"
#define ASF_OBJECT_COMMON \
int i_type; \
......@@ -525,10 +356,6 @@ typedef union asf_object_u
} asf_object_t;
void ASF_GetGUID( guid_t *p_guid, const uint8_t *p_data );
bool ASF_CmpGUID( const guid_t *p_guid1, const guid_t *p_guid2 );
asf_object_root_t *ASF_ReadObjectRoot( stream_t *, int b_seekable );
void ASF_FreeObjectRoot( stream_t *, asf_object_root_t *p_root );
......
/*****************************************************************************
* libasf_guid.h :
*****************************************************************************
* Copyright © 2001-2004, 2011 the VideoLAN team
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef LIBASG_GUID_H
#define LIBASG_GUID_H
/*****************************************************************************
* Structure needed for decoder
*****************************************************************************/
typedef struct guid_s
{
uint32_t v1; /* le */
uint16_t v2; /* le */
uint16_t v3; /* le */
uint8_t v4[8];
} guid_t;
#define GUID_FMT "0x%x-0x%x-0x%x-0x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
#define GUID_PRINT( guid ) \
(guid).v1, \
(guid).v2, \
(guid).v3, \
(guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3], \
(guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
enum
{
ASF_OBJECT_NULL = 0,
ASF_OBJECT_ROOT,
ASF_OBJECT_HEADER,
ASF_OBJECT_DATA,
ASF_OBJECT_INDEX,
ASF_OBJECT_FILE_PROPERTIES,
ASF_OBJECT_STREAM_PROPERTIES,
ASF_OBJECT_HEADER_EXTENSION,
ASF_OBJECT_CODEC_LIST,
ASF_OBJECT_MARKER,
ASF_OBJECT_CONTENT_DESCRIPTION,
ASF_OBJECT_METADATA,
ASF_OBJECT_PADDING,
ASF_OBJECT_OTHER,
};
static const guid_t asf_object_null_guid =
{
0x00000000,
0x0000,
0x0000,
{ 0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00 }
};
/* Top-Level object */
static const guid_t asf_object_header_guid =
{0x75B22630, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
static const guid_t asf_object_data_guid =
{0x75B22636, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
static const guid_t asf_object_simple_index_guid =
{0x33000890, 0xE5B1, 0x11CF, {0x89, 0xF4, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xCB}};
static const guid_t asf_object_index_guid =
{0xD6E229D3, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
/* Header object */
static const guid_t asf_object_file_properties_guid =
{0x8cabdca1, 0xa947, 0x11cf, {0x8e, 0xe4, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65}};
static const guid_t asf_object_stream_properties_guid =
{0xB7DC0791, 0xA9B7, 0x11CF, {0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65}};
static const guid_t asf_object_header_extension_guid =
{0x5FBF03B5, 0xA92E, 0x11CF, {0x8E, 0xE3, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65}};
static const guid_t asf_object_codec_list_guid =
{0x86D15240, 0x311D, 0x11D0, {0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}};
static const guid_t asf_object_marker_guid =
{0xF487CD01, 0xA951, 0x11CF, {0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65}};
static const guid_t asf_object_content_description_guid =
{0x75B22633, 0x668E, 0x11CF, {0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c}};
static const guid_t asf_object_extended_content_description =
{0xD2D0A440, 0xE307, 0x11D2, {0x97, 0xF0, 0x00, 0xA0, 0xC9, 0x5E, 0xA8, 0x50}};
/* Header Extension object */
static const guid_t asf_object_advanced_mutual_exclusion =
{0xA08649CF, 0x4775, 0x4670, {0x8A, 0x16, 0x6E, 0x35, 0x35, 0x75, 0x66, 0xCD}};
static const guid_t asf_object_stream_prioritization =
{0xD4FED15B, 0x88D3, 0x454F, {0x81, 0xF0, 0xED, 0x5C, 0x45, 0x99, 0x9E, 0x24}};
static const guid_t asf_object_metadata_guid =
{0xC5F8CBEA, 0x5BAF, 0x4877, {0x84, 0x67, 0xAA, 0x8C, 0x44, 0xFA, 0x4C, 0xCA}};
/* Stream Properties object */
static const guid_t asf_object_stream_type_audio =
{0xF8699E40, 0x5B4D, 0x11CF, {0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B}};
static const guid_t asf_object_stream_type_video =
{0xbc19efc0, 0x5B4D, 0x11CF, {0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B}};
static const guid_t asf_object_stream_type_command =
{0x59DACFC0, 0x59E6, 0x11D0, {0xA3, 0xAC, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}};
/* TODO */
// top-level
static const guid_t asf_object_media_index_guid =
{0xFEB103F8, 0x12AD, 0x4C64, {0x84, 0x0F, 0x2A, 0x1D, 0x2F, 0x7A, 0xD4, 0x8C}};
static const guid_t asf_object_timecode_index_guid =
{0x3CB73FD0, 0x0C4A, 0x4803, {0x95, 0x3D, 0xED, 0xF7, 0xB6, 0x22, 0x8F, 0x0C}};
// header
static const guid_t asf_object_script_command_guid =
{0x1EFB1A30, 0x0B62, 0x11D0, {0xA3, 0x9B, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}};
static const guid_t asf_object_bitrate_mutual_exclusion_guid =
{0xD6E229DC, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
static const guid_t asf_object_error_correction_guid =
{0x75B22635, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
static const guid_t asf_object_content_branding_guid =
{0x2211B3FA, 0xBD23, 0x11D2, {0xB4, 0xB7, 0x00, 0xA0, 0xC9, 0x55, 0xFC, 0x6E}};
static const guid_t asf_object_stream_bitrate_properties =
{0x7BF875CE, 0x468D, 0x11D1, {0x8D, 0x82, 0x00, 0x60, 0x97, 0xC9, 0xA2, 0xB2}};
static const guid_t asf_object_content_encryption_guid =
{0x2211B3FB, 0xBD23, 0x11D2, {0xB4, 0xB7, 0x00, 0xA0, 0xC9, 0x55, 0xFC, 0x6E}};
static const guid_t asf_object_extended_content_encryption_guid =
{0x298AE614, 0x2622, 0x4C17, {0xB9, 0x35, 0xDA, 0xE0, 0x7E, 0xE9, 0x28, 0x9C}};
static const guid_t asf_object_digital_signature_guid =
{0x2211B3FC, 0xBD23, 0x11D2, {0xB4, 0xB7, 0x00, 0xA0, 0xC9, 0x55, 0xFC, 0x6E}};
static const guid_t asf_object_padding =
{0x1806D474, 0xCADF, 0x4509, {0xA4, 0xBA, 0x9A, 0xAB, 0xCB, 0x96, 0xAA, 0xE8}};
// header extension
static const guid_t asf_object_extended_stream_properties_guid =
{0x14E6A5CB, 0xC672, 0x4332, {0x83, 0x99, 0xA9, 0x69, 0x52, 0x06, 0x5B, 0x5A}};
static const guid_t asf_object_group_mutual_exclusion_guid =
{0xD1465A40, 0x5A79, 0x4338, {0xB7, 0x1B, 0xE3, 0x6B, 0x8F, 0xD6, 0xC2, 0x49}};
static const guid_t asf_object_bandwidth_sharing_guid =
{0xA69609E6, 0x517B, 0x11D2, {0xB6, 0xAF, 0x00, 0xC0, 0x4F, 0xD9, 0x08, 0xE9}};
static const guid_t asf_object_language_list =
{0x7C4346A9, 0xEFE0, 0x4BFC, {0xB2, 0x29, 0x39, 0x3E, 0xDE, 0x41, 0x5C, 0x85}};
static const guid_t asf_object_metadata_library_guid =
{0x44231C94, 0x9498, 0x49D1, {0xA1, 0x41, 0x1D, 0x13, 0x4E, 0x45, 0x70, 0x54}};
static const guid_t asf_object_index_parameters_guid =
{0xD6E229DF, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
static const guid_t asf_object_media_object_index_parameters_guid =
{0x6B203BAD, 0x3F11, 0x48E4, {0xAC, 0xA8, 0xD7, 0x61, 0x3D, 0xE2, 0xCF, 0xA7}};
static const guid_t asf_object_timecode_index_parameters_guid =
{0xF55E496D, 0x9797, 0x4B5D, {0x8C, 0x8B, 0x60, 0x4D, 0xFE, 0x9B, 0xFB, 0x24}};
static const guid_t asf_object_compatibility_guid =
{0x26F18B5D, 0x4584, 0x47EC, {0x9F, 0x5F, 0x0E, 0x65, 0x1F, 0x04, 0x52, 0xC9}};
static const guid_t asf_object_advanced_content_encryption_guid =
{0x43058533, 0x6981, 0x49E6, {0x9B, 0x74, 0xAD, 0x12, 0xCB, 0x86, 0xD5, 0x8C}};
//
static const guid_t asf_object_extended_stream_header =
{0x3AFB65E2, 0x47EF, 0x40F2, {0xAC, 0x2C, 0x70, 0xA9, 0x0D, 0x71, 0xD3, 0x43}};
static const guid_t asf_object_extended_stream_type_audio =
{0x31178C9D, 0x03E1, 0x4528, {0xB5, 0x82, 0x3D, 0xF9, 0xDB, 0x22, 0xF5, 0x03}};
#define ASF_OBJECT_COMMON \
int i_type; \
guid_t i_object_id; \
uint64_t i_object_size; \
uint64_t i_object_pos; \
union asf_object_u *p_father; \
union asf_object_u *p_first; \
union asf_object_u *p_last; \
union asf_object_u *p_next;
/****************************************************************************
* GUID functions
****************************************************************************/
static inline void ASF_GetGUID( guid_t *p_guid, const uint8_t *p_data )
{
p_guid->v1 = GetDWLE( p_data );
p_guid->v2 = GetWLE( p_data + 4);
p_guid->v3 = GetWLE( p_data + 6);
memcpy( p_guid->v4, p_data + 8, 8 );
}
static inline bool CmpGUID( const guid_t *p_guid1, const guid_t *p_guid2 )
{
if( (p_guid1->v1 != p_guid2->v1 )||
(p_guid1->v2 != p_guid2->v2 )||
(p_guid1->v3 != p_guid2->v3 )||
( memcmp( p_guid1->v4, p_guid2->v4, 8 )) )
{
return false;
}
return true;
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment