asf.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * asf.h: MMS access plug-in
00003  *****************************************************************************
00004  * Copyright (C) 2001-2004 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 /****************************************************************************
00025  * XXX:
00026  *  Definitions and data duplicated from asf demuxers but I want access
00027  * and demux plugins to be independent
00028  *
00029  ****************************************************************************/
00030 
00031 #ifndef _ASF_H_
00032 #define _ASF_H_ 1
00033 
00034 #define ASF_STREAM_VIDEO    0x0001
00035 #define ASF_STREAM_AUDIO    0x0002
00036 #define ASF_STREAM_UNKNOWN  0xffff
00037 
00038 typedef struct
00039 {
00040     int i_cat;      /* ASF_STREAM_VIDEO, ASF_STREAM_AUDIO */
00041     int i_bitrate;  /* -1 if unknown */
00042     int i_selected;
00043 } asf_stream_t;
00044 
00045 typedef struct
00046 {
00047     int64_t      i_file_size;
00048     int64_t      i_data_packets_count;
00049     int32_t      i_min_data_packet_size;
00050 
00051     asf_stream_t stream[128];
00052 
00053 } asf_header_t;
00054 
00055 typedef struct guid_s
00056 {
00057     uint32_t v1; /* le */
00058     uint16_t v2; /* le */
00059     uint16_t v3; /* le */
00060     uint8_t  v4[8];
00061 } guid_t;
00062 
00063 
00064 void  GenerateGuid      ( guid_t * );
00065 void  asf_HeaderParse   ( asf_header_t *, uint8_t *, int );
00066 void  asf_StreamSelect  ( asf_header_t *,
00067                               int i_bitrate_max, bool b_all, bool b_audio,
00068                               bool b_video );
00069 
00070 #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"
00071 #define GUID_PRINT( guid )  \
00072     (guid).v1,              \
00073     (guid).v2,              \
00074     (guid).v3,              \
00075     (guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3],    \
00076     (guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
00077 
00078 static const guid_t asf_object_header_guid =
00079 {
00080     0x75B22630,
00081     0x668E,
00082     0x11CF,
00083     { 0xA6,0xD9, 0x00,0xAA,0x00,0x62,0xCE,0x6C }
00084 };
00085 
00086 static const guid_t asf_object_file_properties_guid =
00087 {
00088     0x8cabdca1,
00089     0xa947,
00090     0x11cf,
00091     { 0x8e,0xe4, 0x00,0xC0,0x0C,0x20,0x53,0x65 }
00092 };
00093 
00094 static const guid_t asf_object_stream_properties_guid =
00095 {
00096     0xB7DC0791,
00097     0xA9B7,
00098     0x11CF,
00099     { 0x8E,0xE6, 0x00,0xC0,0x0C,0x20,0x53,0x65 }
00100 };
00101 
00102 static const guid_t asf_object_stream_type_audio =
00103 {
00104     0xF8699E40,
00105     0x5B4D,
00106     0x11CF,
00107     { 0xA8,0xFD, 0x00,0x80,0x5F,0x5C,0x44,0x2B }
00108 };
00109 
00110 static const guid_t asf_object_stream_type_video =
00111 {
00112     0xbc19efc0,
00113     0x5B4D,
00114     0x11CF,
00115     { 0xA8,0xFD, 0x00,0x80,0x5F,0x5C,0x44,0x2B }
00116 };
00117 
00118 static const guid_t asf_object_bitrate_properties_guid =
00119 {
00120     0x7BF875CE,
00121     0x468D,
00122     0x11D1,
00123     { 0x8D,0x82,0x00,0x60,0x97,0xC9,0xA2,0xB2 }
00124 };
00125 
00126 static const guid_t asf_object_bitrate_mutual_exclusion_guid =
00127 {
00128     0xD6E229DC,
00129     0x35DA,
00130     0x11D1,
00131     { 0x90,0x34,0x00,0xA0,0xC9,0x03,0x49,0xBE }
00132 };
00133 
00134 static const guid_t asf_object_extended_stream_properties_guid =
00135 {
00136     0x14E6A5CB,
00137     0xC672,
00138     0x4332,
00139     { 0x83, 0x99, 0xA9, 0x69, 0x52, 0x06, 0x5B, 0x5A }
00140 };
00141 
00142 static const guid_t asf_object_header_extension_guid =
00143 {
00144     0x5FBF03B5,
00145     0xA92E,
00146     0x11CF,
00147     { 0x8E, 0xE3, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65 }
00148 };
00149 
00150 #endif

Generated on Sun Nov 22 08:05:14 2009 for VLC by  doxygen 1.5.6