00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #define ASF_STREAM_VIDEO 0x0001
00032 #define ASF_STREAM_AUDIO 0x0002
00033 #define ASF_STREAM_UNKNOWN 0xffff
00034
00035 typedef struct
00036 {
00037 int i_cat;
00038 int i_bitrate;
00039 int i_selected;
00040 } asf_stream_t;
00041
00042 typedef struct
00043 {
00044 int64_t i_file_size;
00045 int64_t i_data_packets_count;
00046 int32_t i_min_data_packet_size;
00047
00048 asf_stream_t stream[128];
00049
00050 } asf_header_t;
00051
00052
00053 typedef struct guid_s
00054 {
00055 uint32_t v1;
00056 uint16_t v2;
00057 uint16_t v3;
00058 uint8_t v4[8];
00059 } guid_t;
00060
00061
00062 void E_( GenerateGuid ) ( guid_t * );
00063 void E_( asf_HeaderParse ) ( asf_header_t *, uint8_t *, int );
00064 void E_( asf_StreamSelect ) ( asf_header_t *,
00065 int i_bitrate_max, vlc_bool_t b_all, vlc_bool_t b_audio,
00066 vlc_bool_t b_video );
00067
00068
00069 #define GUID_FMT "%8.8x-%4.4x-%4.4x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
00070 #define GUID_PRINT( guid ) \
00071 (guid).v1, \
00072 (guid).v2, \
00073 (guid).v3, \
00074 (guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3], \
00075 (guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
00076
00077 static const guid_t asf_object_header_guid =
00078 {
00079 0x75B22630,
00080 0x668E,
00081 0x11CF,
00082 { 0xA6,0xD9, 0x00,0xAA,0x00,0x62,0xCE,0x6C }
00083 };
00084
00085 static const guid_t asf_object_file_properties_guid =
00086 {
00087 0x8cabdca1,
00088 0xa947,
00089 0x11cf,
00090 { 0x8e,0xe4, 0x00,0xC0,0x0C,0x20,0x53,0x65 }
00091 };
00092
00093 static const guid_t asf_object_stream_properties_guid =
00094 {
00095 0xB7DC0791,
00096 0xA9B7,
00097 0x11CF,
00098 { 0x8E,0xE6, 0x00,0xC0,0x0C,0x20,0x53,0x65 }
00099 };
00100
00101 static const guid_t asf_object_stream_type_audio =
00102 {
00103 0xF8699E40,
00104 0x5B4D,
00105 0x11CF,
00106 { 0xA8,0xFD, 0x00,0x80,0x5F,0x5C,0x44,0x2B }
00107 };
00108
00109 static const guid_t asf_object_stream_type_video =
00110 {
00111 0xbc19efc0,
00112 0x5B4D,
00113 0x11CF,
00114 { 0xA8,0xFD, 0x00,0x80,0x5F,0x5C,0x44,0x2B }
00115 };
00116
00117 static const guid_t asf_object_bitrate_properties_guid =
00118 {
00119 0x7BF875CE,
00120 0x468D,
00121 0x11D1,
00122 { 0x8D,0x82,0x00,0x60,0x97,0xC9,0xA2,0xB2 }
00123 };
00124
00125 static const guid_t asf_object_bitrate_mutual_exclusion_guid =
00126 {
00127 0xD6E229DC,
00128 0x35DA,
00129 0x11D1,
00130 { 0x90,0x34,0x00,0xA0,0xC9,0x03,0x49,0xBE }
00131 };
00132
00133 static const guid_t asf_object_extended_stream_properties_guid =
00134 {
00135 0x14E6A5CB,
00136 0xC672,
00137 0x4332,
00138 { 0x83, 0x99, 0xA9, 0x69, 0x52, 0x06, 0x5B, 0x5A }
00139 };
00140
00141 static const guid_t asf_object_header_extension_guid =
00142 {
00143 0x5FBF03B5,
00144 0xA92E,
00145 0x11CF,
00146 { 0x8E, 0xE3, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65 }
00147 };