2002-10-17 21:41:47 +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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __ASF_DEMUX_H__
|
|
|
|
#define __ASF_DEMUX_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2003-10-29 03:15:55 +00:00
|
|
|
#include <gst/bytestream/bytestream.h>
|
2002-10-17 21:41:47 +00:00
|
|
|
|
2002-10-17 22:01:00 +00:00
|
|
|
G_BEGIN_DECLS
|
2004-03-15 16:32:53 +00:00
|
|
|
|
2002-10-17 21:41:47 +00:00
|
|
|
#define GST_TYPE_ASF_DEMUX \
|
2004-05-02 18:07:39 +00:00
|
|
|
(gst_asf_demux_get_type())
|
2002-10-17 21:41:47 +00:00
|
|
|
#define GST_ASF_DEMUX(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ASF_DEMUX,GstASFDemux))
|
|
|
|
#define GST_ASF_DEMUX_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ASF_DEMUX,GstASFDemux))
|
|
|
|
#define GST_IS_ASF_DEMUX(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ASF_DEMUX))
|
|
|
|
#define GST_IS_ASF_DEMUX_CLASS(obj) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ASF_DEMUX))
|
2004-03-15 16:32:53 +00:00
|
|
|
|
2002-10-17 21:41:47 +00:00
|
|
|
typedef struct _GstASFDemux GstASFDemux;
|
|
|
|
typedef struct _GstASFDemuxClass GstASFDemuxClass;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _GstASFStreamContext {
|
2002-10-17 21:41:47 +00:00
|
|
|
GstPad *pad;
|
|
|
|
guint64 pts;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2004-03-15 16:32:53 +00:00
|
|
|
GstPad *pad;
|
2003-01-31 18:23:38 +00:00
|
|
|
guint16 id;
|
2002-10-17 21:41:47 +00:00
|
|
|
guint32 frag_offset;
|
|
|
|
guint32 sequence;
|
2003-01-23 11:15:49 +00:00
|
|
|
guint64 delay;
|
|
|
|
GstBuffer *payload;
|
2002-10-17 21:41:47 +00:00
|
|
|
} asf_stream_context;
|
|
|
|
|
gst/asfdemux/gstasfdemux.*: You know Chimaira? "I - HATE - EVERYTHING". Yeah, that's what this feels like. I think we...
Original commit message from CVS:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_init),
(gst_asf_demux_loop), (gst_asf_demux_process_file),
(gst_asf_demux_process_data), (gst_asf_demux_handle_data),
(gst_asf_demux_process_object), (gst_asf_demux_get_stream),
(gst_asf_demux_process_chunk), (gst_asf_demux_handle_sink_event),
(gst_asf_demux_handle_src_event), (gst_asf_demux_handle_src_query),
(gst_asf_demux_change_state):
* gst/asfdemux/gstasfdemux.h:
You know Chimaira? "I - HATE - EVERYTHING". Yeah, that's what this
feels like. I think we should set a new requirement for demuxers
from now on to implement sane loop functions, data loops, query
and seek functions before first commit into CVS. And this commit
fixes all of the above.
2004-06-10 04:23:03 +00:00
|
|
|
typedef enum {
|
|
|
|
GST_ASF_DEMUX_STATE_HEADER,
|
|
|
|
GST_ASF_DEMUX_STATE_DATA,
|
|
|
|
GST_ASF_DEMUX_STATE_EOS
|
|
|
|
} GstAsfDemuxState;
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _GstASFDemux {
|
2005-12-06 19:48:07 +00:00
|
|
|
GstElement element;
|
2002-10-17 21:41:47 +00:00
|
|
|
|
|
|
|
/* pads */
|
2005-12-06 19:48:07 +00:00
|
|
|
GstPad *sinkpad;
|
2002-10-17 21:41:47 +00:00
|
|
|
|
|
|
|
GstByteStream *bs;
|
|
|
|
|
2005-01-27 00:56:11 +00:00
|
|
|
GstTagList *taglist;
|
gst/asfdemux/gstasfdemux.*: You know Chimaira? "I - HATE - EVERYTHING". Yeah, that's what this feels like. I think we...
Original commit message from CVS:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_init),
(gst_asf_demux_loop), (gst_asf_demux_process_file),
(gst_asf_demux_process_data), (gst_asf_demux_handle_data),
(gst_asf_demux_process_object), (gst_asf_demux_get_stream),
(gst_asf_demux_process_chunk), (gst_asf_demux_handle_sink_event),
(gst_asf_demux_handle_src_event), (gst_asf_demux_handle_src_query),
(gst_asf_demux_change_state):
* gst/asfdemux/gstasfdemux.h:
You know Chimaira? "I - HATE - EVERYTHING". Yeah, that's what this
feels like. I think we should set a new requirement for demuxers
from now on to implement sane loop functions, data loops, query
and seek functions before first commit into CVS. And this commit
fixes all of the above.
2004-06-10 04:23:03 +00:00
|
|
|
GstAsfDemuxState state;
|
|
|
|
guint64 data_offset, num_packets, packet, data_size;
|
|
|
|
guint64 seek_pending;
|
|
|
|
gboolean seek_flush, seek_discont;
|
|
|
|
|
2002-10-17 21:41:47 +00:00
|
|
|
#define GST_ASF_DEMUX_NUM_VIDEO_PADS 16
|
|
|
|
#define GST_ASF_DEMUX_NUM_AUDIO_PADS 32
|
2003-01-31 21:10:00 +00:00
|
|
|
#define GST_ASF_DEMUX_NUM_STREAMS 23
|
|
|
|
#define GST_ASF_DEMUX_NUM_STREAM_IDS 127
|
2002-10-17 21:41:47 +00:00
|
|
|
|
|
|
|
/* stream output pads */
|
|
|
|
GstPad *video_pad[GST_ASF_DEMUX_NUM_VIDEO_PADS];
|
|
|
|
gint64 video_PTS[GST_ASF_DEMUX_NUM_VIDEO_PADS];
|
|
|
|
|
|
|
|
GstPad *audio_pad[GST_ASF_DEMUX_NUM_AUDIO_PADS];
|
|
|
|
gint64 audio_PTS[GST_ASF_DEMUX_NUM_AUDIO_PADS];
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
guint64 last_seek;
|
2002-10-17 21:41:47 +00:00
|
|
|
gboolean restart;
|
|
|
|
|
2003-01-31 21:10:00 +00:00
|
|
|
guint32 bitrate[GST_ASF_DEMUX_NUM_STREAM_IDS];
|
|
|
|
|
2002-10-17 21:41:47 +00:00
|
|
|
/* Demuxing state */
|
|
|
|
guint32 num_audio_streams;
|
|
|
|
guint32 num_video_streams;
|
|
|
|
guint32 num_streams;
|
|
|
|
asf_stream_context stream[GST_ASF_DEMUX_NUM_STREAMS];
|
|
|
|
|
|
|
|
guint32 packet_size;
|
|
|
|
guint32 timestamp;
|
gst/asfdemux/gstasfdemux.*: You know Chimaira? "I - HATE - EVERYTHING". Yeah, that's what this feels like. I think we...
Original commit message from CVS:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_init),
(gst_asf_demux_loop), (gst_asf_demux_process_file),
(gst_asf_demux_process_data), (gst_asf_demux_handle_data),
(gst_asf_demux_process_object), (gst_asf_demux_get_stream),
(gst_asf_demux_process_chunk), (gst_asf_demux_handle_sink_event),
(gst_asf_demux_handle_src_event), (gst_asf_demux_handle_src_query),
(gst_asf_demux_change_state):
* gst/asfdemux/gstasfdemux.h:
You know Chimaira? "I - HATE - EVERYTHING". Yeah, that's what this
feels like. I think we should set a new requirement for demuxers
from now on to implement sane loop functions, data loops, query
and seek functions before first commit into CVS. And this commit
fixes all of the above.
2004-06-10 04:23:03 +00:00
|
|
|
guint64 play_time;
|
2003-01-23 11:15:49 +00:00
|
|
|
|
|
|
|
guint64 preroll;
|
|
|
|
guint64 pts;
|
2003-01-31 18:23:38 +00:00
|
|
|
|
|
|
|
/* Descrambler settings */
|
2004-03-15 16:32:53 +00:00
|
|
|
guint8 span;
|
2003-01-31 18:23:38 +00:00
|
|
|
guint16 ds_packet_size;
|
|
|
|
guint16 ds_chunk_size;
|
|
|
|
guint16 ds_data_size;
|
|
|
|
|
2002-10-17 21:41:47 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 16:32:53 +00:00
|
|
|
struct _GstASFDemuxClass {
|
2002-10-17 21:41:47 +00:00
|
|
|
GstElementClass parent_class;
|
|
|
|
};
|
|
|
|
|
2004-05-02 18:07:39 +00:00
|
|
|
GType gst_asf_demux_get_type (void);
|
2002-10-17 21:41:47 +00:00
|
|
|
|
2002-10-17 22:01:00 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 16:32:53 +00:00
|
|
|
|
2002-10-17 21:41:47 +00:00
|
|
|
#endif /* __ASF_DEMUX_H__ */
|