2002-05-01 18:41:59 +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 __GST_QTDEMUX_H__
|
|
|
|
#define __GST_QTDEMUX_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2003-10-29 03:15:55 +00:00
|
|
|
#include <gst/bytestream/bytestream.h>
|
2004-01-26 20:01:35 +00:00
|
|
|
#include <gst/getbits/getbits.h>
|
2002-05-01 18:41:59 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2004-03-15 16:32:54 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
2002-05-01 18:41:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define GST_TYPE_QTDEMUX \
|
|
|
|
(gst_qtdemux_get_type())
|
|
|
|
#define GST_QTDEMUX(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QTDEMUX,GstQTDemux))
|
|
|
|
#define GST_QTDEMUX_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QTDEMUX,GstQTDemux))
|
|
|
|
#define GST_IS_QTDEMUX(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QTDEMUX))
|
|
|
|
#define GST_IS_QTDEMUX_CLASS(obj) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QTDEMUX))
|
|
|
|
|
2003-06-10 06:23:42 +00:00
|
|
|
#define GST_QTDEMUX_MAX_STREAMS 8
|
2002-05-01 18:41:59 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
typedef struct _GstQTDemux GstQTDemux;
|
|
|
|
typedef struct _GstQTDemuxClass GstQTDemuxClass;
|
|
|
|
typedef struct _QtDemuxStream QtDemuxStream;
|
2002-05-01 18:41:59 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
struct _GstQTDemux {
|
|
|
|
GstElement element;
|
2002-05-01 18:41:59 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
/* pads */
|
|
|
|
GstPad *sinkpad;
|
2003-06-10 06:23:42 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
QtDemuxStream *streams[GST_QTDEMUX_MAX_STREAMS];
|
|
|
|
int n_streams;
|
|
|
|
int n_video_streams;
|
|
|
|
int n_audio_streams;
|
2002-05-01 18:41:59 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
GstByteStream *bs;
|
2003-06-10 06:23:42 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
GNode *moov_node;
|
|
|
|
GNode *moov_node_compressed;
|
2003-06-10 06:23:42 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
guint32 timescale;
|
|
|
|
guint32 duration;
|
2003-06-10 06:23:42 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
int state;
|
2003-06-10 06:23:42 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
int offset;
|
2003-06-16 17:39:26 +00:00
|
|
|
|
gst/qtdemux/qtdemux.c: More qtdemux hackage -- parse a lot more atoms, extract a few tags. One might even mistake th...
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header),
(gst_qtdemux_add_stream), (qtdemux_parse), (qtdemux_type_get),
(qtdemux_dump_stsz), (qtdemux_dump_stco), (qtdemux_dump_co64),
(qtdemux_dump_unknown), (qtdemux_parse_tree), (qtdemux_parse_udta),
(qtdemux_tag_add), (get_size), (gst_qtdemux_handle_esds): More qtdemux
hackage -- parse a lot more atoms, extract a few tags. One might even
mistake this for tag support. Maybe it is.
* gst/qtdemux/qtdemux.h:
2004-05-01 01:46:16 +00:00
|
|
|
GstTagList *tag_list;
|
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
/* track stuff */
|
2003-06-10 06:23:42 +00:00
|
|
|
|
gst/qtdemux/qtdemux.*: Bitch. Also known as seeking, querying & co.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_init),
(gst_qtdemux_handle_src_query), (gst_qtdemux_handle_src_event),
(gst_qtdemux_handle_sink_event), (gst_qtdemux_change_state),
(gst_qtdemux_loop_header), (qtdemux_dump_mvhd),
(qtdemux_parse_trak):
* gst/qtdemux/qtdemux.h:
Bitch. Also known as seeking, querying & co.
* sys/oss/gstosssink.c: (gst_osssink_init), (gst_osssink_chain),
(gst_osssink_change_state):
* sys/oss/gstosssink.h:
Resyncing is for weenies, this hack is no longer needed and was
broken anyway (since it - unintendedly - always leaves resync to
TRUE).
2004-06-05 18:50:48 +00:00
|
|
|
guint64 last_ts;
|
|
|
|
gboolean need_discont;
|
|
|
|
gboolean need_flush;
|
2004-03-15 16:32:54 +00:00
|
|
|
};
|
2002-05-01 18:41:59 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
struct _GstQTDemuxClass {
|
|
|
|
GstElementClass parent_class;
|
|
|
|
};
|
2002-05-01 18:41:59 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2004-03-15 16:32:54 +00:00
|
|
|
#endif /* __cplusplus */
|
2002-05-01 18:41:59 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
#endif /* __GST_QTDEMUX_H__ */
|