2003-01-31 21:41:07 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2004-05-02 18:07:39 +00:00
|
|
|
#ifndef __ASFHEADERS_H__
|
|
|
|
#define __ASFHEADERS_H__
|
2003-01-31 21:41:07 +00:00
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
typedef struct {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint32 v1;
|
|
|
|
guint32 v2;
|
|
|
|
guint32 v3;
|
|
|
|
guint32 v4;
|
|
|
|
} ASFGuid;
|
2004-03-15 16:32:53 +00:00
|
|
|
|
2003-01-31 21:41:07 +00:00
|
|
|
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
typedef struct {
|
|
|
|
guint8 obj_id;
|
2003-01-31 21:41:07 +00:00
|
|
|
ASFGuid guid;
|
|
|
|
} ASFGuidHash;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
enum {
|
2003-01-31 21:41:07 +00:00
|
|
|
ASF_OBJ_UNDEFINED = 0,
|
|
|
|
ASF_OBJ_STREAM,
|
|
|
|
ASF_OBJ_DATA,
|
|
|
|
ASF_OBJ_FILE,
|
|
|
|
ASF_OBJ_HEADER,
|
|
|
|
ASF_OBJ_CONCEAL_NONE,
|
|
|
|
ASF_OBJ_COMMENT,
|
|
|
|
ASF_OBJ_CODEC_COMMENT,
|
2003-08-26 19:28:20 +00:00
|
|
|
ASF_OBJ_CODEC_COMMENT1,
|
2003-01-31 21:41:07 +00:00
|
|
|
ASF_OBJ_INDEX,
|
|
|
|
ASF_OBJ_HEAD1,
|
|
|
|
ASF_OBJ_HEAD2,
|
|
|
|
ASF_OBJ_PADDING,
|
|
|
|
ASF_OBJ_BITRATE_PROPS,
|
2003-01-31 23:16:37 +00:00
|
|
|
ASF_OBJ_EXT_CONTENT_DESC,
|
|
|
|
ASF_OBJ_BITRATE_MUTEX,
|
2004-05-18 01:38:49 +00:00
|
|
|
ASF_OBJ_LANGUAGE_LIST,
|
|
|
|
ASF_OBJ_METADATA_OBJECT,
|
|
|
|
ASF_OBJ_EXTENDED_STREAM_PROPS,
|
2003-01-31 21:41:07 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
enum {
|
2003-01-31 21:41:07 +00:00
|
|
|
ASF_STREAM_UNDEFINED = 0,
|
|
|
|
ASF_STREAM_VIDEO,
|
|
|
|
ASF_STREAM_AUDIO,
|
|
|
|
};
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
enum {
|
2003-01-31 21:41:07 +00:00
|
|
|
ASF_CORRECTION_UNDEFINED = 0,
|
|
|
|
ASF_CORRECTION_ON,
|
|
|
|
ASF_CORRECTION_OFF,
|
|
|
|
};
|
|
|
|
|
2004-05-02 18:07:39 +00:00
|
|
|
extern ASFGuidHash asf_correction_guids[];
|
2003-01-31 21:41:07 +00:00
|
|
|
|
2004-05-02 18:07:39 +00:00
|
|
|
extern ASFGuidHash asf_stream_guids[];
|
2003-01-31 21:41:07 +00:00
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_obj_header {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint32 num_objects;
|
2004-03-15 16:32:53 +00:00
|
|
|
guint8 unknown1;
|
|
|
|
guint8 unknown2;
|
2003-01-31 21:41:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_obj_header asf_obj_header;
|
|
|
|
|
2004-05-18 01:38:49 +00:00
|
|
|
struct _asf_obj_header_ext {
|
|
|
|
ASFGuid reserved1;
|
|
|
|
guint16 reserved2;
|
|
|
|
guint32 data_size;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_obj_header_ext asf_obj_header_ext;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_obj_comment {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint16 title_length;
|
|
|
|
guint16 author_length;
|
|
|
|
guint16 copyright_length;
|
|
|
|
guint16 description_length;
|
|
|
|
guint16 rating_length;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_obj_comment asf_obj_comment;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_obj_file {
|
2003-01-31 21:41:07 +00:00
|
|
|
ASFGuid file_id;
|
|
|
|
guint64 file_size;
|
|
|
|
guint64 creation_time;
|
|
|
|
guint64 packets_count;
|
|
|
|
guint64 play_time;
|
|
|
|
guint64 send_time;
|
|
|
|
guint64 preroll;
|
|
|
|
guint32 flags;
|
|
|
|
guint32 min_pktsize;
|
|
|
|
guint32 max_pktsize;
|
|
|
|
guint32 min_bitrate;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_obj_file asf_obj_file;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_obj_stream {
|
2003-01-31 21:41:07 +00:00
|
|
|
ASFGuid type;
|
|
|
|
ASFGuid correction;
|
2003-11-05 23:08:32 +00:00
|
|
|
guint64 unknown1;
|
|
|
|
guint32 type_specific_size;
|
|
|
|
guint32 stream_specific_size;
|
2003-01-31 21:41:07 +00:00
|
|
|
guint16 id;
|
2003-11-05 23:08:32 +00:00
|
|
|
guint32 unknown2;
|
2003-01-31 21:41:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_obj_stream asf_obj_stream;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_stream_audio {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint16 codec_tag;
|
|
|
|
guint16 channels;
|
|
|
|
guint32 sample_rate;
|
|
|
|
guint32 byte_rate;
|
|
|
|
guint16 block_align;
|
|
|
|
guint16 word_size;
|
|
|
|
guint16 size;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_stream_audio asf_stream_audio;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_stream_correction {
|
|
|
|
guint8 span;
|
2003-01-31 21:41:07 +00:00
|
|
|
guint16 packet_size;
|
|
|
|
guint16 chunk_size;
|
|
|
|
guint16 data_size;
|
2004-03-15 16:32:53 +00:00
|
|
|
guint8 silence_data;
|
2003-01-31 21:41:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_stream_correction asf_stream_correction;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_stream_video {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint32 width;
|
|
|
|
guint32 height;
|
2004-03-15 16:32:53 +00:00
|
|
|
guint8 unknown;
|
2003-01-31 21:41:07 +00:00
|
|
|
guint16 size;
|
2004-01-27 01:27:04 +00:00
|
|
|
};
|
2003-01-31 21:41:07 +00:00
|
|
|
|
|
|
|
typedef struct _asf_stream_video asf_stream_video;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_stream_video_format {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint32 size;
|
|
|
|
guint32 width;
|
|
|
|
guint32 height;
|
|
|
|
guint16 planes;
|
|
|
|
guint16 depth;
|
|
|
|
guint32 tag;
|
|
|
|
guint32 image_size;
|
|
|
|
guint32 xpels_meter;
|
|
|
|
guint32 ypels_meter;
|
|
|
|
guint32 num_colors;
|
|
|
|
guint32 imp_colors;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_stream_video_format asf_stream_video_format;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_obj_data {
|
2003-01-31 21:41:07 +00:00
|
|
|
ASFGuid file_id;
|
|
|
|
guint64 packets;
|
2004-03-15 16:32:53 +00:00
|
|
|
guint8 unknown1;
|
2004-01-27 01:27:04 +00:00
|
|
|
/* guint8 unknown2; FIXME: this object is supposed to be 26 bytes?! */
|
2004-03-15 16:32:53 +00:00
|
|
|
guint8 correction;
|
2003-01-31 21:41:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_obj_data asf_obj_data;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_obj_data_correction {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint8 type;
|
|
|
|
guint8 cycle;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_obj_data_correction asf_obj_data_correction;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_obj_data_packet {
|
|
|
|
guint8 flags;
|
|
|
|
guint8 property;
|
2003-01-31 21:41:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_obj_data_packet asf_obj_data_packet;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_packet_info {
|
|
|
|
guint32 padsize;
|
|
|
|
guint8 replicsizetype;
|
|
|
|
guint8 fragoffsettype;
|
|
|
|
guint8 seqtype;
|
|
|
|
guint8 segsizetype;
|
2003-01-31 21:41:07 +00:00
|
|
|
gboolean multiple;
|
2004-03-15 16:32:53 +00:00
|
|
|
guint32 size_left;
|
2003-01-31 21:41:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_packet_info asf_packet_info;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_segment_info {
|
|
|
|
guint8 stream_number;
|
|
|
|
guint32 chunk_size;
|
|
|
|
guint32 frag_offset;
|
|
|
|
guint32 segment_size;
|
|
|
|
guint32 sequence;
|
|
|
|
guint32 frag_timestamp;
|
2003-01-31 21:41:07 +00:00
|
|
|
gboolean compressed;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_segment_info asf_segment_info;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_replicated_data {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint32 object_size;
|
|
|
|
guint32 frag_timestamp;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_replicated_data asf_replicated_data;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _asf_bitrate_record {
|
2003-01-31 21:41:07 +00:00
|
|
|
guint16 stream_id;
|
|
|
|
guint32 bitrate;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _asf_bitrate_record asf_bitrate_record;
|
|
|
|
|
2004-05-02 18:07:39 +00:00
|
|
|
extern ASFGuidHash asf_object_guids[];
|
2003-01-31 21:41:07 +00:00
|
|
|
|
2004-05-02 18:07:39 +00:00
|
|
|
#endif /* __ASFHEADERS_H__ */
|