From: Wim Taymans Date: Tue, 17 May 2011 14:13:59 +0000 (+0200) Subject: Merge branch 'master' into 0.11 X-Git-Tag: RELEASE-0.11.1~595 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e15651816e8420ee7e4584a161699be4cd81cdef;p=platform%2Fupstream%2Fgst-plugins-good.git Merge branch 'master' into 0.11 --- e15651816e8420ee7e4584a161699be4cd81cdef diff --cc gst/rtsp/gstrtspsrc.c index 365a461,86ba69b..3a46360 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@@ -262,14 -265,57 +265,27 @@@ static gboolean gst_rtspsrc_push_event gboolean source); /* commands we send to out loop to notify it of events */ - #define CMD_WAIT 0 - #define CMD_RECONNECT 1 - #define CMD_STOP 2 + #define CMD_OPEN 0 + #define CMD_PLAY 1 + #define CMD_PAUSE 2 + #define CMD_CLOSE 3 + #define CMD_WAIT 4 + #define CMD_RECONNECT 5 + #define CMD_LOOP 6 + + #define GST_ELEMENT_PROGRESS(el, type, code, text) \ + G_STMT_START { \ + gchar *__txt = _gst_element_error_printf text; \ + gst_element_post_message (GST_ELEMENT_CAST (el), \ + gst_message_new_progress (GST_OBJECT_CAST (el), \ + GST_PROGRESS_TYPE_ ##type, code, __txt)); \ + g_free (__txt); \ + } G_STMT_END /*static guint gst_rtspsrc_signals[LAST_SIGNAL] = { 0 }; */ - -static void -_do_init (GType rtspsrc_type) -{ - static const GInterfaceInfo urihandler_info = { - gst_rtspsrc_uri_handler_init, - NULL, - NULL - }; - - GST_DEBUG_CATEGORY_INIT (rtspsrc_debug, "rtspsrc", 0, "RTSP src"); - - g_type_add_interface_static (rtspsrc_type, GST_TYPE_URI_HANDLER, - &urihandler_info); -} - -GST_BOILERPLATE_FULL (GstRTSPSrc, gst_rtspsrc, GstBin, GST_TYPE_BIN, _do_init); - -static void -gst_rtspsrc_base_init (gpointer g_class) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&rtptemplate)); - - gst_element_class_set_details_simple (element_class, "RTSP packet receiver", - "Source/Network", - "Receive data over the network via RTSP (RFC 2326)", - "Wim Taymans , " - "Thijs Vermeir , " - "Lutz Mueller "); -} +#define gst_rtspsrc_parent_class parent_class +G_DEFINE_TYPE_WITH_CODE (GstRTSPSrc, gst_rtspsrc, GST_TYPE_BIN, + G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_rtspsrc_uri_handler_init)); static void gst_rtspsrc_class_init (GstRTSPSrcClass * klass)