summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-04-10 09:14:07 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-04-10 09:14:07 +0000
commit8db0d2bcab91315deaf53f97fb8e3213d7e6ff6d (patch)
tree988fa38cd6bfa85662df0ecf51eddd78f55f6f5b
parent9894c6ad51e860fbc4474703c0a3e67a950ac359 (diff)
downloadgst-plugins-bad-8db0d2bcab91315deaf53f97fb8e3213d7e6ff6d.tar.gz
gst-plugins-bad-8db0d2bcab91315deaf53f97fb8e3213d7e6ff6d.tar.bz2
gst-plugins-bad-8db0d2bcab91315deaf53f97fb8e3213d7e6ff6d.zip
gst/rtpmanager/: Added custom marshallers for signals.
Original commit message from CVS: * gst/rtpmanager/.cvsignore: * gst/rtpmanager/Makefile.am: * gst/rtpmanager/gstrtpbin-marshal.list: Added custom marshallers for signals. * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_class_init): * gst/rtpmanager/gstrtpbin.h: Prepare for emiting pt map signals. * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init): * gst/rtpmanager/gstrtpssrcdemux.c: (gst_rtp_ssrc_demux_class_init): Fix signals.
-rw-r--r--ChangeLog16
m---------common0
-rw-r--r--gst/rtpmanager/.gitignore2
-rw-r--r--gst/rtpmanager/Makefile.am19
-rw-r--r--gst/rtpmanager/gstrtpbin-marshal.list2
-rw-r--r--gst/rtpmanager/gstrtpbin.c11
-rw-r--r--gst/rtpmanager/gstrtpbin.h3
-rw-r--r--gst/rtpmanager/gstrtpptdemux.c8
-rw-r--r--gst/rtpmanager/gstrtpssrcdemux.c6
9 files changed, 58 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d4732a7..51b44dba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2007-04-10 Wim Taymans <wim@fluendo.com>
+
+ * gst/rtpmanager/.cvsignore:
+ * gst/rtpmanager/Makefile.am:
+ * gst/rtpmanager/gstrtpbin-marshal.list:
+ Added custom marshallers for signals.
+
+ * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_class_init):
+ * gst/rtpmanager/gstrtpbin.h:
+ Prepare for emiting pt map signals.
+
+ * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_class_init):
+ * gst/rtpmanager/gstrtpssrcdemux.c:
+ (gst_rtp_ssrc_demux_class_init):
+ Fix signals.
+
2007-04-06 Wim Taymans <wim@fluendo.com>
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_class_init),
diff --git a/common b/common
-Subproject 57d4a1587556bd42c850601773c662211694c5a
+Subproject 9097e252e477e18182f08a032d8860bdee9a041
diff --git a/gst/rtpmanager/.gitignore b/gst/rtpmanager/.gitignore
new file mode 100644
index 00000000..0962d997
--- /dev/null
+++ b/gst/rtpmanager/.gitignore
@@ -0,0 +1,2 @@
+gstrtpbin-marshal.h
+gstrtpbin-marshal.c
diff --git a/gst/rtpmanager/Makefile.am b/gst/rtpmanager/Makefile.am
index dc7f2a72..f844e47c 100644
--- a/gst/rtpmanager/Makefile.am
+++ b/gst/rtpmanager/Makefile.am
@@ -1,6 +1,15 @@
-
plugin_LTLIBRARIES = libgstrtpmanager.la
+glib_enum_define = GST_RTP_BIN
+glib_enum_prefix = gst_rtp_bin
+
+include $(top_srcdir)/common/glib-gen.mak
+
+built_sources = gstrtpbin-marshal.c
+built_headers = gstrtpbin-marshal.h
+
+BUILT_SOURCES = $(built_sources) $(built_headers)
+
libgstrtpmanager_la_SOURCES = gstrtpmanager.c \
gstrtpbin.c \
gstrtpclient.c \
@@ -10,6 +19,9 @@ libgstrtpmanager_la_SOURCES = gstrtpmanager.c \
gstrtpssrcdemux.c \
gstrtpsession.c
+nodist_libgstrtpmanager_la_SOURCES = \
+ $(built_sources)
+
noinst_HEADERS = gstrtpbin.h \
gstrtpclient.h \
async_jitter_queue.h \
@@ -22,5 +34,8 @@ libgstrtpmanager_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(ERROR_CF
libgstrtpmanager_la_LIBADD = $(GST_LIBS_LIBS)
libgstrtpmanager_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstrtp-@GST_MAJORMINOR@
-EXTRA_DIST =
+CLEANFILES = $(BUILT_SOURCES)
+
+EXTRA_DIST = gstrtpbin-marshal.list
+
diff --git a/gst/rtpmanager/gstrtpbin-marshal.list b/gst/rtpmanager/gstrtpbin-marshal.list
new file mode 100644
index 00000000..7ad3f168
--- /dev/null
+++ b/gst/rtpmanager/gstrtpbin-marshal.list
@@ -0,0 +1,2 @@
+BOXED:UINT
+VOID:UINT,OBJECT
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 5f6551bb..68d97f7c 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -41,6 +41,7 @@
#endif
#include <string.h>
+#include "gstrtpbin-marshal.h"
#include "gstrtpbin.h"
GST_DEBUG_CATEGORY_STATIC (gst_rtp_bin_debug);
@@ -108,7 +109,7 @@ struct _GstRTPBinPrivate
/* signals and args */
enum
{
- /* FILL ME */
+ SIGNAL_REQUEST_PT_MAP,
LAST_SIGNAL
};
@@ -319,7 +320,7 @@ static GstPad *gst_rtp_bin_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * name);
static void gst_rtp_bin_release_pad (GstElement * element, GstPad * pad);
-/*static guint gst_rtp_bin_signals[LAST_SIGNAL] = { 0 }; */
+static guint gst_rtp_bin_signals[LAST_SIGNAL] = { 0 };
GST_BOILERPLATE (GstRTPBin, gst_rtp_bin, GstBin, GST_TYPE_BIN);
@@ -362,6 +363,12 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
gobject_class->set_property = gst_rtp_bin_set_property;
gobject_class->get_property = gst_rtp_bin_get_property;
+ gst_rtp_bin_signals[SIGNAL_REQUEST_PT_MAP] =
+ g_signal_new ("request-pt-map", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPBinClass, request_pt_map),
+ NULL, NULL, gst_rtp_bin_marshal_BOXED__UINT, GST_TYPE_CAPS, 1,
+ G_TYPE_UINT);
+
gstelement_class->provide_clock =
GST_DEBUG_FUNCPTR (gst_rtp_bin_provide_clock);
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_bin_change_state);
diff --git a/gst/rtpmanager/gstrtpbin.h b/gst/rtpmanager/gstrtpbin.h
index f9cfdf2d..53a1e5af 100644
--- a/gst/rtpmanager/gstrtpbin.h
+++ b/gst/rtpmanager/gstrtpbin.h
@@ -50,6 +50,9 @@ struct _GstRTPBin {
struct _GstRTPBinClass {
GstBinClass parent_class;
+
+ /* get the caps for pt */
+ GstCaps (*request_pt_map) (GstRTPBin *rtpbin, guint pt);
};
GType gst_rtp_bin_get_type (void);
diff --git a/gst/rtpmanager/gstrtpptdemux.c b/gst/rtpmanager/gstrtpptdemux.c
index d7ff34d9..705210b6 100644
--- a/gst/rtpmanager/gstrtpptdemux.c
+++ b/gst/rtpmanager/gstrtpptdemux.c
@@ -48,9 +48,11 @@
#include <string.h>
#include <gst/gst.h>
-#include "gstrtpptdemux.h"
#include <gst/rtp/gstrtpbuffer.h>
+#include "gstrtpbin-marshal.h"
+#include "gstrtpptdemux.h"
+
/* generic templates */
static GstStaticPadTemplate rtp_pt_demux_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
@@ -138,14 +140,14 @@ gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstRTPPtDemuxClass, new_payload_type),
NULL, NULL,
- g_cclosure_marshal_VOID__UINT_POINTER,
+ gst_rtp_bin_marshal_VOID__UINT_OBJECT,
G_TYPE_NONE, 2, G_TYPE_INT, GST_TYPE_PAD);
gst_rtp_pt_demux_signals[SIGNAL_PAYLOAD_TYPE_CHANGE] =
g_signal_new ("payload-type-change",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstRTPPtDemuxClass, payload_type_change),
- NULL, NULL, gst_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
+ NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_rtp_pt_demux_finalize);
diff --git a/gst/rtpmanager/gstrtpssrcdemux.c b/gst/rtpmanager/gstrtpssrcdemux.c
index 3237100c..17e421fe 100644
--- a/gst/rtpmanager/gstrtpssrcdemux.c
+++ b/gst/rtpmanager/gstrtpssrcdemux.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <gst/rtp/gstrtpbuffer.h>
+#include "gstrtpbin-marshal.h"
#include "gstrtpssrcdemux.h"
GST_DEBUG_CATEGORY_STATIC (gst_rtp_ssrc_demux_debug);
@@ -87,6 +88,7 @@ struct _GstRTPSsrcDemuxPad
{
GstPad *pad;
guint32 ssrc;
+ GstCaps *caps;
};
/* find a src pad for a given SSRC, returns NULL if the SSRC was not found
@@ -167,8 +169,8 @@ gst_rtp_ssrc_demux_class_init (GstRTPSsrcDemuxClass * klass)
g_signal_new ("new-ssrc-pad",
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstRTPSsrcDemuxClass, new_ssrc_pad),
- NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER,
- G_TYPE_NONE, 2, G_TYPE_INT, GST_TYPE_PAD);
+ NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_OBJECT,
+ G_TYPE_NONE, 2, G_TYPE_UINT, GST_TYPE_PAD);
gstelement_klass->change_state =
GST_DEBUG_FUNCPTR (gst_rtp_ssrc_demux_change_state);