rpms/gstreamer-plugins-flumpegdemux/devel gst-fmd-update-from-bad.patch, NONE, 1.1 gstreamer-plugins-flumpegdemux.spec, 1.4, 1.5

Bastien Nocera hadess at fedoraproject.org
Wed Apr 1 12:20:37 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/gstreamer-plugins-flumpegdemux/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16882

Modified Files:
	gstreamer-plugins-flumpegdemux.spec 
Added Files:
	gst-fmd-update-from-bad.patch 
Log Message:
* Wed Apr 01 2009 - Bastien Nocera <bnocera at redhat.com> - 0.10.15-6
- Update code from gst-plugins-bad


gst-fmd-update-from-bad.patch:

--- NEW FILE gst-fmd-update-from-bad.patch ---
diff -uprN gst-fluendo-mpegdemux-0.10.15.old/configure.ac gst-fluendo-mpegdemux-0.10.15/configure.ac
--- gst-fluendo-mpegdemux-0.10.15.old/configure.ac	2008-02-13 18:14:54.000000000 +0000
+++ gst-fluendo-mpegdemux-0.10.15/configure.ac	2009-04-01 12:39:32.000000000 +0100
@@ -76,6 +76,8 @@ AC_SUBST(GST_CFLAGS)
 AC_SUBST(GST_LIBS)
 AC_SUBST(GST_BASE_LIBS)
 
+PKG_CHECK_MODULES(LIBOIL, liboil-0.3)
+
 dnl make GST_MAJORMINOR available in Makefile.am
 AC_SUBST(GST_MAJORMINOR)
 
diff -uprN gst-fluendo-mpegdemux-0.10.15.old/src/flumpegdemux.c gst-fluendo-mpegdemux-0.10.15/src/flumpegdemux.c
--- gst-fluendo-mpegdemux-0.10.15.old/src/flumpegdemux.c	2007-11-21 12:59:24.000000000 +0000
+++ gst-fluendo-mpegdemux-0.10.15/src/flumpegdemux.c	2009-04-01 12:37:48.000000000 +0100
@@ -1,4 +1,10 @@
-/* 
+/*
+ * This library is licensed under 2 different licenses and you
+ * can choose to use it under the terms of either one of them. The
+ * two licenses are the MPL 1.1 and the LGPL.
+ *
+ * MPL:
+ *
  * 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
@@ -9,6 +15,23 @@
  * License for the specific language governing rights and limitations
  * under the License.
  *
+ * LGPL:
+ *
+ * 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.
+ *
  * The Original Code is Fluendo MPEG Demuxer plugin.
  *
  * The Initial Developer of the Original Code is Fluendo, S.L.
@@ -24,28 +47,31 @@
 
 #include "gstmpegdemux.h"
 #include "gstmpegtsdemux.h"
+#include "mpegtsparse.h"
+#include "mpegtspacketizer.h"
 
 GST_DEBUG_CATEGORY_EXTERN (gstflupesfilter_debug);
 GST_DEBUG_CATEGORY_EXTERN (gstflusectionfilter_debug);
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  GST_DEBUG_CATEGORY_INIT (gstflupesfilter_debug, "flupesfilter", 0,
+  GST_DEBUG_CATEGORY_INIT (gstflupesfilter_debug, "mpegpesfilter", 0,
       "MPEG-TS/PS PES filter output");
-  GST_DEBUG_CATEGORY_INIT (gstflusectionfilter_debug, "flusectionfilter", 0,
+  GST_DEBUG_CATEGORY_INIT (gstflusectionfilter_debug, "mpegsectionfilter", 0,
       "MPEG-TS Section filter output");
 
   if (!gst_flups_demux_plugin_init (plugin))
     return FALSE;
-  if (!gst_fluts_demux_plugin_init (plugin))
+  if (!gst_mpegts_demux_plugin_init (plugin))
+    return FALSE;
+  if (!gst_mpegtsparse_plugin_init (plugin))
     return FALSE;
-
   return TRUE;
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
-    "flumpegdemux",
+    "mpegdemux2",
     "MPEG demuxers",
     plugin_init, VERSION,
-    GST_LICENSE_UNKNOWN, "flumpegdemux", "http://www.fluendo.com/");
+    GST_LICENSE_UNKNOWN, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
diff -uprN gst-fluendo-mpegdemux-0.10.15.old/src/flutspatinfo.c gst-fluendo-mpegdemux-0.10.15/src/flutspatinfo.c
--- gst-fluendo-mpegdemux-0.10.15.old/src/flutspatinfo.c	2007-11-21 12:59:24.000000000 +0000
+++ gst-fluendo-mpegdemux-0.10.15/src/flutspatinfo.c	2009-04-01 12:37:48.000000000 +0100
@@ -1,4 +1,10 @@
-/* 
+/*
+ * This library is licensed under 2 different licenses and you
+ * can choose to use it under the terms of either one of them. The
+ * two licenses are the MPL 1.1 and the LGPL.
+ *
+ * MPL:
+ *
  * 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
@@ -9,6 +15,23 @@
  * License for the specific language governing rights and limitations
  * under the License.
  *
+ * LGPL:
+ *
+ * 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.
+ *
  * The Original Code is Fluendo MPEG Demuxer plugin.
  *
  * The Initial Developer of the Original Code is Fluendo, S.L.
@@ -33,18 +56,19 @@ enum
   PROP_PID
 };
 
-static void fluts_pat_info_set_property (GObject * object, guint prop_id,
+static void mpegts_pat_info_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * spec);
-static void fluts_pat_info_get_property (GObject * object, guint prop_id,
+static void mpegts_pat_info_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * spec);
 
-GST_BOILERPLATE (FluTsPatInfo, fluts_pat_info, GObject, G_TYPE_OBJECT);
+GST_BOILERPLATE (MpegTsPatInfo, mpegts_pat_info, GObject, G_TYPE_OBJECT);
 
-FluTsPatInfo *fluts_pat_info_new (guint16 program_no, guint16 pid)
+MpegTsPatInfo *
+mpegts_pat_info_new (guint16 program_no, guint16 pid)
 {
-  FluTsPatInfo *info;
+  MpegTsPatInfo *info;
 
-  info = g_object_new (FLUTS_TYPE_PAT_INFO, NULL);
+  info = g_object_new (MPEGTS_TYPE_PAT_INFO, NULL);
 
   info->program_no = program_no;
   info->pid = pid;
@@ -53,51 +77,53 @@ FluTsPatInfo *fluts_pat_info_new (guint1
 }
 
 static void
-fluts_pat_info_base_init (gpointer klass)
+mpegts_pat_info_base_init (gpointer klass)
 {
 }
 
 static void
-fluts_pat_info_class_init (FluTsPatInfoClass *klass)
+mpegts_pat_info_class_init (MpegTsPatInfoClass * klass)
 {
-  GObjectClass *gobject_klass = (GObjectClass *)klass;
+  GObjectClass *gobject_klass = (GObjectClass *) klass;
 
-  gobject_klass->set_property = fluts_pat_info_set_property;
-  gobject_klass->get_property = fluts_pat_info_get_property;
+  gobject_klass->set_property = mpegts_pat_info_set_property;
+  gobject_klass->get_property = mpegts_pat_info_get_property;
 
   g_object_class_install_property (gobject_klass, PROP_PROGRAM_NO,
-       g_param_spec_uint ("program-number", "Program Number",
-       "Program Number for this program", 0, G_MAXUINT16, 1,
-       G_PARAM_READABLE));
+      g_param_spec_uint ("program-number", "Program Number",
+          "Program Number for this program", 0, G_MAXUINT16, 1,
+          G_PARAM_READABLE));
 
   g_object_class_install_property (gobject_klass, PROP_PID,
-       g_param_spec_uint ("pid", "PID carrying PMT",
-       "PID which carries the PMT for this program", 1, G_MAXUINT16, 1,
-       G_PARAM_READABLE));
+      g_param_spec_uint ("pid", "PID carrying PMT",
+          "PID which carries the PMT for this program", 1, G_MAXUINT16, 1,
+          G_PARAM_READABLE));
 }
 
 static void
-fluts_pat_info_init (FluTsPatInfo *pat_info, FluTsPatInfoClass *klass)
+mpegts_pat_info_init (MpegTsPatInfo * pat_info, MpegTsPatInfoClass * klass)
 {
 }
 
-static void fluts_pat_info_set_property (GObject * object, guint prop_id,
[...9801 lines suppressed...]
+    } else {
+      /* push the packet downstream */
+      res = mpegts_parse_push (parse, &packet, NULL);
+    }
+
+  next:
+    mpegts_packetizer_clear_packet (parse->packetizer, &packet);
+  }
+
+  gst_object_unref (parse);
+  return res;
+}
+
+static GstStateChangeReturn
+mpegts_parse_change_state (GstElement * element, GstStateChange transition)
+{
+  MpegTSParse *parse;
+  GstStateChangeReturn ret;
+
+  parse = GST_MPEGTS_PARSE (element);
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      mpegts_parse_reset (parse);
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static gboolean
+mpegts_parse_src_pad_query (GstPad * pad, GstQuery * query)
+{
+  MpegTSParse *parse = GST_MPEGTS_PARSE (gst_pad_get_parent (pad));
+  gboolean res;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_LATENCY:
+    {
+      if ((res = gst_pad_peer_query (parse->sinkpad, query))) {
+        gboolean is_live;
+        GstClockTime min_latency, max_latency;
+
+        gst_query_parse_latency (query, &is_live, &min_latency, &max_latency);
+        if (is_live) {
+          min_latency += TS_LATENCY * GST_MSECOND;
+          if (max_latency != GST_CLOCK_TIME_NONE)
+            max_latency += TS_LATENCY * GST_MSECOND;
+        }
+
+        gst_query_set_latency (query, is_live, min_latency, max_latency);
+      }
+
+      break;
+    }
+    default:
+      res = gst_pad_query_default (pad, query);
+  }
+
+  return res;
+}
+
+gboolean
+gst_mpegtsparse_plugin_init (GstPlugin * plugin)
+{
+  GST_DEBUG_CATEGORY_INIT (mpegts_parse_debug, "mpegtsparse", 0,
+      "MPEG transport stream parser");
+
+  mpegts_packetizer_init_debug ();
+  gst_mpegtsdesc_init_debug ();
+
+  return gst_element_register (plugin, "mpegtsparse",
+      GST_RANK_NONE, GST_TYPE_MPEGTS_PARSE);
+}
diff -uprN gst-fluendo-mpegdemux-0.10.15.old/src/mpegtsparse.h gst-fluendo-mpegdemux-0.10.15/src/mpegtsparse.h
--- gst-fluendo-mpegdemux-0.10.15.old/src/mpegtsparse.h	1970-01-01 01:00:00.000000000 +0100
+++ gst-fluendo-mpegdemux-0.10.15/src/mpegtsparse.h	2009-04-01 12:37:48.000000000 +0100
@@ -0,0 +1,83 @@
+/*
+ * mpegts_parse.h - GStreamer MPEG transport stream parser
+ * Copyright (C) 2007 Alessandro Decina
+ * 
+ * Authors:
+ *   Alessandro Decina <alessandro at nnva.org>
+ *
+ * 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_MPEG_TS_PARSE_H
+#define GST_MPEG_TS_PARSE_H
+
+#include <gst/gst.h>
+#include "mpegtspacketizer.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_MPEGTS_PARSE \
+  (mpegts_parse_get_type())
+#define GST_MPEGTS_PARSE(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MPEGTS_PARSE,MpegTSParse))
+#define GST_MPEGTS_PARSE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MPEGTS_PARSE,MpegTSParseClass))
+#define GST_IS_MPEGTS_PARSE(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MPEGTS_PARSE))
+#define GST_IS_MPEGTS_PARSE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MPEGTS_PARSE))
+
+typedef struct _MpegTSParse MpegTSParse;
+typedef struct _MpegTSParseClass MpegTSParseClass;
+
+struct _MpegTSParse {
+  GstElement element;
+
+  GstPad *sinkpad;
+
+  /* the following vars must be protected with the OBJECT_LOCK as they can be
+   * accessed from the application thread and the streaming thread */
+  gchar *program_numbers;
+  GList *pads_to_add;
+  GList *pads_to_remove;
+  GHashTable *programs;
+  guint req_pads;
+
+  GstStructure *pat;
+  MpegTSPacketizer *packetizer;
+  GHashTable *psi_pids;
+  gboolean disposed;
+};
+
+struct _MpegTSParseClass {
+  GstElementClass parent_class;
+
+  /* signals */
+  void (*pat_info) (GstStructure *pat);
+  void (*pmt_info) (GstStructure *pmt);
+  void (*nit_info) (GstStructure *nit);
+  void (*sdt_info) (GstStructure *sdt);
+  void (*eit_info) (GstStructure *eit);
+};
+
+GType gst_mpegts_parse_get_type(void);
+
+gboolean gst_mpegtsparse_plugin_init (GstPlugin * plugin);
+
+G_END_DECLS
+
+#endif /* GST_MPEG_TS_PARSE_H */
--- gst-fluendo-mpegdemux-0.10.15.old/src/Makefile.am	2007-11-21 12:59:24.000000000 +0000
+++ gst-fluendo-mpegdemux-0.10.15/src/Makefile.am	2009-04-01 13:05:25.000000000 +0100
@@ -1,5 +1,4 @@
-# plugindir is set in configure
-
+plugindir = $(libdir)/gstreamer-0.10/
 plugin_LTLIBRARIES = libgstflumpegdemux.la
 
 # for the next set of variables, rename the prefix if you renamed the .la
@@ -14,12 +13,14 @@ libgstflumpegdemux_la_SOURCES = \
 	flutspatinfo.c \
 	flutspmtinfo.c \
 	flutspmtstreaminfo.c \
-	gstsectionfilter.c
+	gstsectionfilter.c \
+	mpegtspacketizer.c \
+	mpegtsparse.c
 
 # flags used to compile this plugin
 # we use the GST_LIBS flags because we might be using plug-in libs
-libgstflumpegdemux_la_CFLAGS = $(GST_CFLAGS)
-libgstflumpegdemux_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
+libgstflumpegdemux_la_CFLAGS = $(GST_CFLAGS) $(LIBOIL_CFLAGS) -DGST_PACKAGE_NAME="\"gst-fluendo-mpegdemux from gst-plugins-bad\"" -DGST_PACKAGE_ORIGIN="\"http://download.fedora.redhat.com/fedora\""
+libgstflumpegdemux_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(LIBOIL_LIBS)
 libgstflumpegdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 
 # headers we need but don't want installed
@@ -32,5 +33,7 @@ noinst_HEADERS =	\
 	flutspatinfo.h \
 	flutspmtinfo.h \
 	flutspmtstreaminfo.h \
-	gstsectionfilter.h
+	gstsectionfilter.h \
+	mpegtspacketizer.h \
+	mpegtsparse.h
 


Index: gstreamer-plugins-flumpegdemux.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gstreamer-plugins-flumpegdemux/devel/gstreamer-plugins-flumpegdemux.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- gstreamer-plugins-flumpegdemux.spec	25 Feb 2009 01:34:47 -0000	1.4
+++ gstreamer-plugins-flumpegdemux.spec	1 Apr 2009 12:20:07 -0000	1.5
@@ -1,16 +1,20 @@
 Summary: MPEG demuxer for GStreamer
 Name: gstreamer-plugins-flumpegdemux
 Version: 0.10.15
-Release: 5%{?dist} 
+Release: 6%{?dist} 
 License: MPLv1.1
 Group: Applications/Multimedia
 Source0: http://core.fluendo.com/gstreamer/src/gst-fluendo-mpegdemux/gst-fluendo-mpegdemux-%{version}.tar.bz2
 Url: http://core.fluendo.com/gstreamer/src/gst-fluendo-mpegdemux/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
 
+# Update code to current from gst-plugins-bad
+Patch0: gst-fmd-update-from-bad.patch
 
 BuildRequires: gcc-c++, pkgconfig
 BuildRequires: gstreamer-devel
+BuildRequires: liboil-devel
+BuildRequires: automake autoconf
 
 %description
 This package contains an MPEG demuxer for the GStreamer multimedia framework.
@@ -19,6 +23,12 @@
 
 %prep
 %setup -q -n gst-fluendo-mpegdemux-%{version}
+%patch0 -p1 -b .bad
+
+aclocal
+cat common/m4/*.m4 >> aclocal.m4
+autoconf
+automake
 
 %build
 %configure
@@ -28,6 +38,8 @@
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 
+mv $RPM_BUILD_ROOT%{_libdir}/gstreamer-0.10/libgstflumpegdemux.so $RPM_BUILD_ROOT%{_libdir}/gstreamer-0.10/libgstmpegdemux.so
+
 # no static libs and libtool archives either
 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.a" -exec rm -f {} ';'
 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.la" -exec rm -f {} ';'
@@ -38,9 +50,12 @@
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING ChangeLog NEWS TODO
-%{_libdir}/gstreamer-0.10/libgstflumpegdemux.so
+%{_libdir}/gstreamer-0.10/libgstmpegdemux.so
 
 %changelog
+* Wed Apr 01 2009 - Bastien Nocera <bnocera at redhat.com> - 0.10.15-6
+- Update code from gst-plugins-bad
+
 * Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.15-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the scm-commits mailing list