/*****************************************************************************
* libasf_guid.h :
*****************************************************************************
- * Copyright © 2001-2004, 2011 the VideoLAN team
+ * Copyright © 2001-2004, 2011 VLC authors and VideoLAN
*
* 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
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser 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.
+ * You should have received a copy of the GNU Lesser 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
+#include <vlc_codecs.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]
+ (unsigned)(guid).Data1, \
+ (guid).Data2, \
+ (guid).Data3, \
+ (guid).Data4[0],(guid).Data4[1],(guid).Data4[2],(guid).Data4[3], \
+ (guid).Data4[4],(guid).Data4[5],(guid).Data4[6],(guid).Data4[7]
enum
{
{ 0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00 }
};
+static const guid_t vlc_object_root_guid =
+{
+ 0x00000000,
+ 0x0000,
+ 0x0000,
+ { 0x56, 0x4C, 0x43, 0x52, 0x4F, 0x4F, 0x54, 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_extended_content_description =
{0xD2D0A440, 0xE307, 0x11D2, {0x97, 0xF0, 0x00, 0xA0, 0xC9, 0x5E, 0xA8, 0x50}};
+static const guid_t asf_object_padding =
+{0x1806D474, 0xCADF, 0x4509, {0xA4, 0xBA, 0x9A, 0xAB, 0xCB, 0x96, 0xAA, 0xE8}};
+
/* 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_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_extended_stream_type_audio =
{0x31178C9D, 0x03E1, 0x4528, {0xB5, 0x82, 0x3D, 0xF9, 0xDB, 0x22, 0xF5, 0x03}};
+static const guid_t asf_guid_reserved_1 =
+{0xABD3D211, 0xA9BA, 0x11cf, {0x8E, 0xE6, 0x00, 0xC0, 0x0C ,0x20, 0x53, 0x65}};
+
+static const guid_t asf_guid_reserved_2 = //object_codec_list_reserved_guid =
+{0x86D15241, 0x311D, 0x11D0, {0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6}};
+
+// Stream Properties Object Error Correction
+static const guid_t asf_no_error_correction_guid =
+{0x20FB5700, 0x5B55, 0x11CF, {0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B}};
+
+static const guid_t asf_guid_audio_conceal_spread =
+{0xBFC3CD50, 0x618F, 0x11CF, {0x8B, 0xB2, 0x00, 0xAA, 0x00, 0xB4, 0xE2, 0x20}};
+
+// Mutual exclusion
+static const guid_t asf_guid_mutex_language =
+{0xD6E22A00, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
+
+static const guid_t asf_guid_mutex_bitrate =
+{0xD6E22A01, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
+
+static const guid_t asf_guid_mutex_unknown =
+{0xD6E22A02, 0x35DA, 0x11D1, {0x90, 0x34, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xBE}};
-#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;
+ p_guid->Data1 = GetDWLE( p_data );
+ p_guid->Data2 = GetWLE( p_data + 4);
+ p_guid->Data3 = GetWLE( p_data + 6);
+ memcpy( p_guid->Data4, p_data + 8, 8 );
}
#endif