summaryrefslogtreecommitdiffstats
path: root/ext/resindvd/rsnpushsrc.c
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/rsnpushsrc.c
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/rsnpushsrc.c')
-rw-r--r--ext/resindvd/rsnpushsrc.c101
1 files changed, 101 insertions, 0 deletions
diff --git a/ext/resindvd/rsnpushsrc.c b/ext/resindvd/rsnpushsrc.c
new file mode 100644
index 00000000..363b41d6
--- /dev/null
+++ b/ext/resindvd/rsnpushsrc.c
@@ -0,0 +1,101 @@
+/* GStreamer
+ * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
+ * 2000,2005 Wim Taymans <wim@fluendo.com>
+ *
+ * gstpushsrc.c:
+ *
+ * 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.
+ */
+
+/*
+ *
+ * This is a temporary copy of GstBaseSrc/GstPushSrc for the resin
+ * DVD components, to work around a deadlock with source elements that
+ * send seeks to themselves.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "rsnpushsrc.h"
+#include <gst/gstmarshal.h>
+
+GST_DEBUG_CATEGORY_STATIC (rsn_push_src_debug);
+#define GST_CAT_DEFAULT rsn_push_src_debug
+
+#define _do_init(type) \
+ GST_DEBUG_CATEGORY_INIT (rsn_push_src_debug, "pushsrc", 0, \
+ "pushsrc element");
+
+GST_BOILERPLATE_FULL (RsnPushSrc, rsn_push_src, RsnBaseSrc, RSN_TYPE_BASE_SRC,
+ _do_init);
+
+static gboolean rsn_push_src_check_get_range (RsnBaseSrc * src);
+static GstFlowReturn rsn_push_src_create (RsnBaseSrc * bsrc, guint64 offset,
+ guint length, GstBuffer ** ret);
+
+static void
+rsn_push_src_base_init (gpointer g_class)
+{
+ /* nop */
+}
+
+static void
+rsn_push_src_class_init (RsnPushSrcClass * klass)
+{
+ RsnBaseSrcClass *gstbasesrc_class = (RsnBaseSrcClass *) klass;
+
+ gstbasesrc_class->create = GST_DEBUG_FUNCPTR (rsn_push_src_create);
+ gstbasesrc_class->check_get_range =
+ GST_DEBUG_FUNCPTR (rsn_push_src_check_get_range);
+}
+
+static void
+rsn_push_src_init (RsnPushSrc * pushsrc, RsnPushSrcClass * klass)
+{
+ /* nop */
+}
+
+static gboolean
+rsn_push_src_check_get_range (RsnBaseSrc * src)
+{
+ /* a pushsrc can by default never operate in pull mode override
+ * if you want something different. */
+ return FALSE;
+}
+
+static GstFlowReturn
+rsn_push_src_create (RsnBaseSrc * bsrc, guint64 offset, guint length,
+ GstBuffer ** ret)
+{
+ GstFlowReturn fret;
+ RsnPushSrc *src;
+ RsnPushSrcClass *pclass;
+
+ src = GST_PUSH_SRC (bsrc);
+ pclass = GST_PUSH_SRC_GET_CLASS (src);
+ if (pclass->create)
+ fret = pclass->create (src, ret);
+ else
+ fret = GST_FLOW_ERROR;
+
+ return fret;
+}