summaryrefslogtreecommitdiffstats
path: root/gst/mpegtsparse
diff options
context:
space:
mode:
authorZaheer Abbas Merali <zaheerabbas@merali.org>2007-12-03 18:28:32 +0000
committerZaheer Abbas Merali <zaheerabbas@merali.org>2007-12-03 18:28:32 +0000
commitcef8e5fe609ea6af4beae2f84d7d3fcd62d0a62f (patch)
tree7bc256835d930eda86c8dba5baddce81e3f1ec1d /gst/mpegtsparse
parente415aeeb4f0e0bf7a622328ee9a2b36804c50d29 (diff)
downloadgst-plugins-bad-cef8e5fe609ea6af4beae2f84d7d3fcd62d0a62f.tar.gz
gst-plugins-bad-cef8e5fe609ea6af4beae2f84d7d3fcd62d0a62f.tar.bz2
gst-plugins-bad-cef8e5fe609ea6af4beae2f84d7d3fcd62d0a62f.zip
gst/mpegtsparse/: Remove signals for pat, pmt, nit, eit, sdt. Replace with bus messages.
Original commit message from CVS: * gst/mpegtsparse/Makefile.am: * gst/mpegtsparse/mpegtspacketizer.c: * gst/mpegtsparse/mpegtsparse.c: Remove signals for pat, pmt, nit, eit, sdt. Replace with bus messages. * sys/dvb/dvbbasebin.c: Instead of attaching to signals, use the bus messages. Also fix up so the dvbsrc starts only outputting the info tables like PAT, CAT, NIT, SDT, EIT instead of the whole ts.
Diffstat (limited to 'gst/mpegtsparse')
-rw-r--r--gst/mpegtsparse/Makefile.am19
-rw-r--r--gst/mpegtsparse/mpegtspacketizer.c2
-rw-r--r--gst/mpegtsparse/mpegtsparse.c58
3 files changed, 19 insertions, 60 deletions
diff --git a/gst/mpegtsparse/Makefile.am b/gst/mpegtsparse/Makefile.am
index 3324a32b..8da696e3 100644
--- a/gst/mpegtsparse/Makefile.am
+++ b/gst/mpegtsparse/Makefile.am
@@ -3,35 +3,16 @@ plugin_LTLIBRARIES = libgstmpegtsparse.la
libgstmpegtsparse_la_SOURCES = \
mpegtsparse.c \
mpegtspacketizer.c\
- mpegtsparsemarshal.c \
flutspatinfo.c \
flutspmtinfo.c \
flutspmtstreaminfo.c
-BUILT_SOURCES = \
- mpegtsparsemarshal.h \
- mpegtsparsemarshal.c
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_libgstmpegtsparse_la_SOURCES = \
- mpegtsparsemarshal.list
-
-mpegtsparsemarshal.h: mpegtsparsemarshal.list
- glib-genmarshal --header --prefix=mpegts_parse_marshal $(srcdir)/mpegtsparsemarshal.list > mpegtsparsemarshal.h.tmp
- mv mpegtsparsemarshal.h.tmp mpegtsparsemarshal.h
-
-mpegtsparsemarshal.c: mpegtsparsemarshal.list mpegtsparsemarshal.h
- echo "#include \"mpegtsparsemarshal.h\"" >> mpegtsparsemarshal.c.tmp
- glib-genmarshal --body --prefix=mpegts_parse_marshal $(srcdir)/mpegtsparsemarshal.list >> mpegtsparsemarshal.c.tmp
- mv mpegtsparsemarshal.c.tmp mpegtsparsemarshal.c
-
libgstmpegtsparse_la_CFLAGS = $(GST_CFLAGS)
libgstmpegtsparse_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS)
libgstmpegtsparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = \
mpegtsparse.h \
- mpegtsparsemarshal.h \
mpegtspacketizer.h \
flutspatinfo.h \
flutspmtinfo.h \
diff --git a/gst/mpegtsparse/mpegtspacketizer.c b/gst/mpegtsparse/mpegtspacketizer.c
index af759eeb..f3994e87 100644
--- a/gst/mpegtsparse/mpegtspacketizer.c
+++ b/gst/mpegtsparse/mpegtspacketizer.c
@@ -398,7 +398,7 @@ mpegts_packetizer_parse_pmt (MpegTSPacketizer * packetizer,
program_info_length = GST_READ_UINT16_BE (data) & 0x0FFF;
data += 2;
- struct_name = g_strdup_printf ("program-%d", program_number);
+ struct_name = g_strdup ("pmt");
pmt = gst_structure_new (struct_name,
"program-number", G_TYPE_UINT, program_number,
"pcr-pid", G_TYPE_UINT, pcr_pid,
diff --git a/gst/mpegtsparse/mpegtsparse.c b/gst/mpegtsparse/mpegtsparse.c
index 0cfeaa17..f0f5a7e2 100644
--- a/gst/mpegtsparse/mpegtsparse.c
+++ b/gst/mpegtsparse/mpegtsparse.c
@@ -28,7 +28,6 @@
#include <stdlib.h>
#include "mpegtsparse.h"
-#include "mpegtsparsemarshal.h"
GST_DEBUG_CATEGORY_STATIC (mpegts_parse_debug);
#define GST_CAT_DEFAULT mpegts_parse_debug
@@ -95,17 +94,6 @@ GST_STATIC_PAD_TEMPLATE ("program_%d", GST_PAD_SRC,
enum
{
- SIGNAL_PAT,
- SIGNAL_PMT,
- SIGNAL_NIT,
- SIGNAL_SDT,
- SIGNAL_EIT,
- /* FILL ME */
- LAST_SIGNAL
-};
-
-enum
-{
ARG_0,
PROP_PROGRAM_NUMBERS,
/* FILL ME */
@@ -138,8 +126,6 @@ static gboolean mpegts_parse_sink_event (GstPad * pad, GstEvent * event);
static GstStateChangeReturn mpegts_parse_change_state (GstElement * element,
GstStateChange transition);
-static guint signals[LAST_SIGNAL] = { 0 };
-
GST_BOILERPLATE (MpegTSParse, mpegts_parse, GstElement, GST_TYPE_ELEMENT);
static guint32 crc_tab[256] = {
@@ -238,27 +224,6 @@ mpegts_parse_class_init (MpegTSParseClass * klass)
g_param_spec_string ("program-numbers",
"Program Numbers",
"Colon separated list of programs", "", G_PARAM_READWRITE));
-
- signals[SIGNAL_PAT] =
- g_signal_new ("pat-info", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (MpegTSParseClass, pat_info), NULL, NULL,
- g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, GST_TYPE_STRUCTURE);
- signals[SIGNAL_PMT] =
- g_signal_new ("pmt-info", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (MpegTSParseClass, pmt_info), NULL, NULL,
- g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, GST_TYPE_STRUCTURE);
- signals[SIGNAL_NIT] =
- g_signal_new ("nit-info", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (MpegTSParseClass, nit_info), NULL, NULL,
- g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, GST_TYPE_STRUCTURE);
- signals[SIGNAL_SDT] =
- g_signal_new ("sdt-info", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (MpegTSParseClass, sdt_info), NULL, NULL,
- g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, GST_TYPE_STRUCTURE);
- signals[SIGNAL_EIT] =
- g_signal_new ("eit-info", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (MpegTSParseClass, eit_info), NULL, NULL,
- g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, GST_TYPE_STRUCTURE);
}
static gboolean
@@ -808,7 +773,9 @@ mpegts_parse_apply_pat (MpegTSParse * parse, GstStructure * pat_info)
GST_INFO_OBJECT (parse, "PAT %s", dbg);
g_free (dbg);
- g_signal_emit (parse, signals[SIGNAL_PAT], 0, pat_info);
+ gst_element_post_message (GST_ELEMENT_CAST (parse),
+ gst_message_new_element (GST_OBJECT (parse),
+ gst_structure_copy (pat_info)));
GST_OBJECT_LOCK (parse);
programs = gst_structure_get_value (pat_info, "programs");
@@ -964,28 +931,39 @@ mpegts_parse_apply_pmt (MpegTSParse * parse,
g_free (dbg);
}
- g_signal_emit (parse, signals[SIGNAL_PMT], 0, pmt_info);
+ gst_element_post_message (GST_ELEMENT_CAST (parse),
+ gst_message_new_element (GST_OBJECT (parse),
+ gst_structure_copy (pmt_info)));
}
static void
mpegts_parse_apply_nit (MpegTSParse * parse,
guint16 pmt_pid, GstStructure * nit_info)
{
- g_signal_emit (parse, signals[SIGNAL_NIT], 0, nit_info);
+ /*gst_element_post_message(GST_ELEMENT_CAST(parse),
+ * gst_message_new_element (GST_OBJECT(parse),
+ * gst_structure_copy(nit_info)));
+ */
}
static void
mpegts_parse_apply_sdt (MpegTSParse * parse,
guint16 pmt_pid, GstStructure * sdt_info)
{
- g_signal_emit (parse, signals[SIGNAL_SDT], 0, sdt_info);
+ /*gst_element_post_message(GST_ELEMENT_CAST(parse),
+ * gst_message_new_element (GST_OBJECT(parse),
+ * gst_structure_copy(sdt_info)));
+ */
}
static void
mpegts_parse_apply_eit (MpegTSParse * parse,
guint16 pmt_pid, GstStructure * eit_info)
{
- g_signal_emit (parse, signals[SIGNAL_EIT], 0, eit_info);
+ /*gst_element_post_message(GST_ELEMENT_CAST(parse),
+ * gst_message_new_element (GST_OBJECT(parse),
+ * gst_structure_copy(eit_info)));
+ */
}
static gboolean