1 /* GStreamer ASF/WMV/WMA demuxer
2 * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __ASF_PACKET_H__
21 #define __ASF_PACKET_H__
23 #include <gst/gstbuffer.h>
24 #include <gst/gstclock.h>
26 #include "gstasfdemux.h"
31 gboolean keyframe; /* buffer flags might not survive merge.. */
32 guint mo_number; /* media object number (unused) */
33 guint mo_offset; /* offset (timestamp for compressed data) */
34 guint mo_size; /* size of media-object-to-be, or 0 */
35 guint buf_filled; /* how much of the mo data we got so far */
36 GstBuffer *buf; /* buffer to assemble media-object or NULL*/
37 guint rep_data_len; /* should never be more than 256, since */
38 guint8 rep_data[256]; /* the length should be stored in a byte */
40 GstClockTime duration; /* is not always available */
41 guint8 par_x; /* not always available (0:deactivated) */
42 guint8 par_y; /* not always available (0:deactivated) */
43 gboolean interlaced; /* default: FALSE */
51 guint length; /* packet length (unused) */
52 guint padding; /* length of padding at end of packet */
53 guint sequence; /* sequence (unused) */
54 GstClockTime send_time;
55 GstClockTime duration;
57 guint8 prop_flags; /* payload length types */
61 GST_ASF_DEMUX_PARSE_PACKET_ERROR_NONE,
62 GST_ASF_DEMUX_PARSE_PACKET_ERROR_RECOVERABLE,
63 GST_ASF_DEMUX_PARSE_PACKET_ERROR_FATAL
64 } GstAsfDemuxParsePacketError;
66 GstAsfDemuxParsePacketError gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf);
68 #define gst_asf_payload_is_complete(payload) \
69 ((payload)->buf_filled >= (payload)->mo_size)
73 #endif /* __ASF_PACKET_H__ */