#include <stdint.h>
#include "avformat.h"
+#include "metadata.h"
#define PACKET_SIZE 3200
int64_t packet_pos;
+ uint16_t stream_language_index;
+
} ASFStream;
-typedef uint8_t GUID[16];
+typedef uint8_t ff_asf_guid[16];
typedef struct {
- GUID guid; ///< generated by client computer
+ ff_asf_guid guid; ///< generated by client computer
uint64_t file_size; /**< in bytes
* invalid if broadcasting */
uint64_t create_time; /**< time of creation, in 100-nanosecond units since 1.1.1601
* invalid if broadcasting */
uint32_t max_pktsize; /**< shall be the same as for min_pktsize
* invalid if broadcasting */
- uint32_t max_bitrate; /**< bandwith of stream in bps
+ uint32_t max_bitrate; /**< bandwidth of stream in bps
* should be the sum of bitrates of the
* individual media streams */
} ASFMainHeader;
int asfid2avid[128]; ///< conversion table from asf ID 2 AVStream ID
ASFStream streams[128]; ///< it's max number and it's not that big
uint32_t stream_bitrates[128]; ///< max number of streams, bitrate for each (for streaming)
+ char stream_languages[128][6]; ///< max number of streams, language for each (RFC1766, e.g. en-US)
/* non streamed additonnal info */
uint64_t nb_packets; ///< how many packets are there in the file, invalid if broadcasting
int64_t duration; ///< in 100ns units
ASFStream* asf_st; ///< currently decoded stream
} ASFContext;
-extern const GUID ff_asf_header;
-extern const GUID ff_asf_file_header;
-extern const GUID ff_asf_stream_header;
-extern const GUID ff_asf_ext_stream_header;
-extern const GUID ff_asf_audio_stream;
-extern const GUID ff_asf_audio_conceal_none;
-extern const GUID ff_asf_audio_conceal_spread;
-extern const GUID ff_asf_video_stream;
-extern const GUID ff_asf_video_conceal_none;
-extern const GUID ff_asf_command_stream;
-extern const GUID ff_asf_comment_header;
-extern const GUID ff_asf_codec_comment_header;
-extern const GUID ff_asf_codec_comment1_header;
-extern const GUID ff_asf_data_header;
-extern const GUID ff_asf_head1_guid;
-extern const GUID ff_asf_head2_guid;
-extern const GUID ff_asf_extended_content_header;
-extern const GUID ff_asf_simple_index_header;
-extern const GUID ff_asf_ext_stream_embed_stream_header;
-extern const GUID ff_asf_ext_stream_audio_stream;
-extern const GUID ff_asf_metadata_header;
-extern const GUID ff_asf_my_guid;
+extern const ff_asf_guid ff_asf_header;
+extern const ff_asf_guid ff_asf_file_header;
+extern const ff_asf_guid ff_asf_stream_header;
+extern const ff_asf_guid ff_asf_ext_stream_header;
+extern const ff_asf_guid ff_asf_audio_stream;
+extern const ff_asf_guid ff_asf_audio_conceal_none;
+extern const ff_asf_guid ff_asf_audio_conceal_spread;
+extern const ff_asf_guid ff_asf_video_stream;
+extern const ff_asf_guid ff_asf_video_conceal_none;
+extern const ff_asf_guid ff_asf_command_stream;
+extern const ff_asf_guid ff_asf_comment_header;
+extern const ff_asf_guid ff_asf_codec_comment_header;
+extern const ff_asf_guid ff_asf_codec_comment1_header;
+extern const ff_asf_guid ff_asf_data_header;
+extern const ff_asf_guid ff_asf_head1_guid;
+extern const ff_asf_guid ff_asf_head2_guid;
+extern const ff_asf_guid ff_asf_extended_content_header;
+extern const ff_asf_guid ff_asf_simple_index_header;
+extern const ff_asf_guid ff_asf_ext_stream_embed_stream_header;
+extern const ff_asf_guid ff_asf_ext_stream_audio_stream;
+extern const ff_asf_guid ff_asf_metadata_header;
+extern const ff_asf_guid ff_asf_my_guid;
+extern const ff_asf_guid ff_asf_language_guid;
+
+extern const AVMetadataConv ff_asf_metadata_conv[];
#define ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT 0x80 //1000 0000