summaryrefslogtreecommitdiffstats
path: root/ext/resindvd/gstmpegdemux.h
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2008-06-17 01:08:14 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2008-06-17 01:08:14 +0000
commit0951e00dc05236b54a03e25c2c331bf1be332dc5 (patch)
tree553db40a5b2a59e9615e2db5a10a5927e35bcfab /ext/resindvd/gstmpegdemux.h
parentbcc41766b852bae2a8014c87bc2cb67ff7453f6a (diff)
downloadgst-plugins-bad-0951e00dc05236b54a03e25c2c331bf1be332dc5.tar.gz
gst-plugins-bad-0951e00dc05236b54a03e25c2c331bf1be332dc5.tar.bz2
gst-plugins-bad-0951e00dc05236b54a03e25c2c331bf1be332dc5.zip
configure.ac: Check for libdvdnav to build resindvd.
Original commit message from CVS: * configure.ac: Check for libdvdnav to build resindvd. * ext/Makefile.am: * ext/resindvd/Makefile.am: * ext/resindvd/gstmpegdefs.h: * ext/resindvd/gstmpegdemux.c: * ext/resindvd/gstmpegdemux.h: * ext/resindvd/gstmpegdesc.c: * ext/resindvd/gstmpegdesc.h: * ext/resindvd/gstpesfilter.c: * ext/resindvd/gstpesfilter.h: * ext/resindvd/plugin.c: * ext/resindvd/resin-play: * ext/resindvd/resindvdbin.c: * ext/resindvd/resindvdbin.h: * ext/resindvd/resindvdsrc.c: * ext/resindvd/resindvdsrc.h: * ext/resindvd/rsnaudiomunge.c: * ext/resindvd/rsnaudiomunge.h: * ext/resindvd/rsnbasesrc.c: * ext/resindvd/rsnbasesrc.h: * ext/resindvd/rsnpushsrc.c: * ext/resindvd/rsnpushsrc.h: * ext/resindvd/rsnstreamselector.c: * ext/resindvd/rsnstreamselector.h: First commit of DVD-Video playback component 'rsndvdbin' and helper elements. Use --enable-experimental for now, but feel free to give it a try using the resin-play script. * gst/dvdspu/gstdvdspu.c: Add some extra guards for malformed events.
Diffstat (limited to 'ext/resindvd/gstmpegdemux.h')
-rw-r--r--ext/resindvd/gstmpegdemux.h127
1 files changed, 127 insertions, 0 deletions
diff --git a/ext/resindvd/gstmpegdemux.h b/ext/resindvd/gstmpegdemux.h
new file mode 100644
index 00000000..fd566afa
--- /dev/null
+++ b/ext/resindvd/gstmpegdemux.h
@@ -0,0 +1,127 @@
+/*
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/.
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is Fluendo MPEG Demuxer plugin.
+ *
+ * The Initial Developer of the Original Code is Fluendo, S.L.
+ * Portions created by Fluendo, S.L. are Copyright (C) 2005
+ * Fluendo, S.L. All Rights Reserved.
+ *
+ * Contributor(s): Wim Taymans <wim@fluendo.com>
+ * Jan Schmidt <thaytan@noraisin.net>
+ */
+
+#ifndef __GST_FLUPS_DEMUX_H__
+#define __GST_FLUPS_DEMUX_H__
+
+#include <gst/gst.h>
+#include <gst/base/gstadapter.h>
+
+#include "gstpesfilter.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_FLUPS_DEMUX (gst_flups_demux_get_type())
+#define GST_FLUPS_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLUPS_DEMUX,GstFluPSDemux))
+#define GST_FLUPS_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLUPS_DEMUX,GstFluPSDemuxClass))
+#define GST_FLUPS_DEMUX_GET_CLASS(klass) (G_TYPE_INSTANCE_GET_CLASS((klass),GST_TYPE_FLUPS_DEMUX,GstFluPSDemuxClass))
+#define GST_IS_FLUPS_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLUPS_DEMUX))
+#define GST_IS_FLUPS_DEMUX_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLUPS_DEMUX))
+
+typedef struct _GstFluPSStream GstFluPSStream;
+typedef struct _GstFluPSDemux GstFluPSDemux;
+typedef struct _GstFluPSDemuxClass GstFluPSDemuxClass;
+
+#define GST_FLUPS_DEMUX_MAX_STREAMS 256
+#define GST_FLUPS_DEMUX_MAX_PSM 256
+
+typedef enum {
+ STATE_FLUPS_DEMUX_NEED_SYNC,
+ STATE_FLUPS_DEMUX_SYNCED,
+ STATE_FLUPS_DEMUX_NEED_MORE_DATA,
+} GstFluPSDemuxState;
+
+/* Information associated with a single FluPS stream. */
+struct _GstFluPSStream {
+ GstPad * pad;
+
+ gint id;
+ gint type;
+ gint size_bound;
+
+ gboolean discont;
+ gboolean notlinked;
+ gboolean need_segment;
+
+ GstClockTime last_ts;
+};
+
+struct _GstFluPSDemux {
+ GstElement parent;
+
+ GstPad * sinkpad;
+
+ GstAdapter * adapter;
+ GstAdapter * rev_adapter;
+ guint64 adapter_offset;
+ guint32 last_sync_code;
+ GstPESFilter filter;
+
+ gint64 mux_rate;
+ guint64 first_scr;
+ guint64 first_dts;
+ guint64 base_time;
+ guint64 current_scr;
+ guint64 next_scr;
+ guint64 bytes_since_scr;
+ gint64 scr_adjust;
+ guint64 scr_rate_n;
+ guint64 scr_rate_d;
+ guint64 first_scr_offset;
+ guint64 last_scr_offset;
+
+ gint16 psm[GST_FLUPS_DEMUX_MAX_PSM];
+
+ GstSegment sink_segment;
+ GstSegment src_segment;
+
+ /* stream output */
+ GstFluPSStream * current_stream;
+ guint64 next_pts;
+ guint64 next_dts;
+ GstFluPSStream ** streams;
+ gboolean need_no_more_pads;
+
+ /* Indicates an MPEG-2 stream */
+ gboolean is_mpeg2_pack;
+
+ /* Language codes event is stored when a dvd-lang-codes
+ * custom event arrives from upstream */
+ GstEvent * lang_codes;
+};
+
+struct _GstFluPSDemuxClass {
+ GstElementClass parent_class;
+
+ GstPadTemplate *sink_template;
+ GstPadTemplate *video_template;
+ GstPadTemplate *audio_template;
+ GstPadTemplate *private_template;
+ GstPadTemplate *subpicture_template;
+};
+
+GType gst_flups_demux_get_type (void);
+
+gboolean gst_flups_demux_plugin_init (GstPlugin *plugin);
+
+G_END_DECLS
+
+#endif /* __GST_FLUPS_DEMUX_H__ */