diff options
Diffstat (limited to 'gst')
-rw-r--r-- | gst/aacparse/gstbaseparse.c | 10 | ||||
-rw-r--r-- | gst/amrparse/gstbaseparse.c | 10 | ||||
-rw-r--r-- | gst/camerabin/Makefile.am | 2 | ||||
-rw-r--r-- | gst/camerabin/gstcamerabin-marshal.list | 2 | ||||
-rw-r--r-- | gst/camerabin/gstcamerabin.c | 11 | ||||
-rw-r--r-- | gst/flacparse/gstbaseparse.c | 10 | ||||
-rw-r--r-- | gst/rawparse/gstvideoparse.c | 15 | ||||
-rw-r--r-- | gst/rtpmanager/gstrtpsession.c | 4 |
8 files changed, 31 insertions, 33 deletions
diff --git a/gst/aacparse/gstbaseparse.c b/gst/aacparse/gstbaseparse.c index baa56826..6d0e7f8d 100644 --- a/gst/aacparse/gstbaseparse.c +++ b/gst/aacparse/gstbaseparse.c @@ -838,7 +838,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) parse = GST_BASE_PARSE (GST_OBJECT_PARENT (pad)); bclass = GST_BASE_PARSE_GET_CLASS (parse); - if (parse->pending_segment) { + if (G_UNLIKELY (parse->pending_segment)) { GST_DEBUG_OBJECT (parse, "chain pushing a pending segment"); gst_pad_push_event (parse->srcpad, parse->pending_segment); parse->pending_segment = NULL; @@ -854,7 +854,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) gst_adapter_clear (parse->adapter); } - if (parse->priv->pending_events) { + if (G_UNLIKELY (parse->priv->pending_events)) { GList *l; for (l = parse->priv->pending_events; l != NULL; l = l->next) { @@ -864,11 +864,9 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) parse->priv->pending_events = NULL; } - if (buffer) { + if (G_LIKELY (buffer)) { GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld", GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer)); - - gst_adapter_push (parse->adapter, buffer); } @@ -899,7 +897,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) if (parse->priv->discont) { GST_DEBUG_OBJECT (parse, "marking DISCONT"); - GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); + GST_BUFFER_FLAG_SET (tmpbuf, GST_BUFFER_FLAG_DISCONT); } skip = -1; diff --git a/gst/amrparse/gstbaseparse.c b/gst/amrparse/gstbaseparse.c index dc82472d..673f7169 100644 --- a/gst/amrparse/gstbaseparse.c +++ b/gst/amrparse/gstbaseparse.c @@ -838,7 +838,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) parse = GST_BASE_PARSE (GST_OBJECT_PARENT (pad)); bclass = GST_BASE_PARSE_GET_CLASS (parse); - if (parse->pending_segment) { + if (G_UNLIKELY (parse->pending_segment)) { GST_DEBUG_OBJECT (parse, "chain pushing a pending segment"); gst_pad_push_event (parse->srcpad, parse->pending_segment); parse->pending_segment = NULL; @@ -854,7 +854,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) gst_adapter_clear (parse->adapter); } - if (parse->priv->pending_events) { + if (G_UNLIKELY (parse->priv->pending_events)) { GList *l; for (l = parse->priv->pending_events; l != NULL; l = l->next) { @@ -864,11 +864,9 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) parse->priv->pending_events = NULL; } - if (buffer) { + if (G_LIKELY (buffer)) { GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld", GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer)); - - gst_adapter_push (parse->adapter, buffer); } @@ -899,7 +897,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) if (parse->priv->discont) { GST_DEBUG_OBJECT (parse, "marking DISCONT"); - GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); + GST_BUFFER_FLAG_SET (tmpbuf, GST_BUFFER_FLAG_DISCONT); } skip = -1; diff --git a/gst/camerabin/Makefile.am b/gst/camerabin/Makefile.am index 583b2c55..376d6787 100644 --- a/gst/camerabin/Makefile.am +++ b/gst/camerabin/Makefile.am @@ -1,4 +1,4 @@ -glib_enum_prefix = gst_camerabin +glib_enum_prefix = __gst_camerabin include $(top_srcdir)/common/glib-gen.mak diff --git a/gst/camerabin/gstcamerabin-marshal.list b/gst/camerabin/gstcamerabin-marshal.list index 40829e54..4c1670ef 100644 --- a/gst/camerabin/gstcamerabin-marshal.list +++ b/gst/camerabin/gstcamerabin-marshal.list @@ -3,4 +3,4 @@ VOID:INT,INT,INT,INT VOID:INT,INT -BOOLEAN:STRING +BOOLEAN:POINTER diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 5dbd386f..905a8c9c 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -882,7 +882,7 @@ gst_camerabin_image_capture_continue (GstCameraBin * camera, GString * filename, g_signal_emit (G_OBJECT (camera), camerabin_signals[IMG_DONE_SIGNAL], 0, filename, cont); - GST_DEBUG_OBJECT (camera, "emitted img_done, new filename:%s, continue:%d", + GST_DEBUG_OBJECT (camera, "emitted img_done, new filename: %s, continue: %d", filename->str, *cont); } @@ -2265,7 +2265,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass) G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstCameraBinClass, user_res_fps), - NULL, NULL, gst_camerabin_marshal_VOID__INT_INT_INT_INT, G_TYPE_NONE, 4, + NULL, NULL, __gst_camerabin_marshal_VOID__INT_INT_INT_INT, G_TYPE_NONE, 4, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT); /** @@ -2284,13 +2284,13 @@ gst_camerabin_class_init (GstCameraBinClass * klass) G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstCameraBinClass, user_image_res), - NULL, NULL, gst_camerabin_marshal_VOID__INT_INT, G_TYPE_NONE, 2, + NULL, NULL, __gst_camerabin_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); /** * GstCameraBin::img-done: * @camera: the camera bin element - * @filename: the name of the file just saved + * @filename: the name of the file just saved as a GString* * * Signal emited when the file has just been saved. To continue taking * pictures just update @filename and return TRUE, otherwise return FALSE. @@ -2303,7 +2303,8 @@ gst_camerabin_class_init (GstCameraBinClass * klass) g_signal_new ("img-done", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstCameraBinClass, img_done), g_signal_accumulator_true_handled, NULL, - gst_camerabin_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_GSTRING); + __gst_camerabin_marshal_BOOLEAN__POINTER, G_TYPE_BOOLEAN, 1, + G_TYPE_POINTER); klass->user_start = gst_camerabin_user_start; klass->user_stop = gst_camerabin_user_stop; diff --git a/gst/flacparse/gstbaseparse.c b/gst/flacparse/gstbaseparse.c index 9b4a9f13..ea06474e 100644 --- a/gst/flacparse/gstbaseparse.c +++ b/gst/flacparse/gstbaseparse.c @@ -982,18 +982,16 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) /* Make sure that adapter doesn't have any old data after newsegment has been received and update our offset */ - if (parse->pending_segment) { - gst_adapter_clear (parse->priv->adapter); + if (G_UNLIKELY (parse->pending_segment)) { parse->priv->offset = parse->priv->pending_offset; + gst_adapter_clear (parse->priv->adapter); } gst_base_parse_update_upstream_durations (parse); - if (buffer) { + if (G_LIKELY (buffer)) { GST_LOG_OBJECT (parse, "buffer size: %d, offset = %lld", GST_BUFFER_SIZE (buffer), GST_BUFFER_OFFSET (buffer)); - - gst_adapter_push (parse->priv->adapter, buffer); } @@ -1025,7 +1023,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) if (parse->priv->discont) { GST_DEBUG_OBJECT (parse, "marking DISCONT"); - GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); + GST_BUFFER_FLAG_SET (tmpbuf, GST_BUFFER_FLAG_DISCONT); } skip = -1; diff --git a/gst/rawparse/gstvideoparse.c b/gst/rawparse/gstvideoparse.c index e3b4b780..ac520160 100644 --- a/gst/rawparse/gstvideoparse.c +++ b/gst/rawparse/gstvideoparse.c @@ -37,6 +37,7 @@ typedef enum GST_VIDEO_PARSE_FORMAT_YV12, GST_VIDEO_PARSE_FORMAT_YUY2, GST_VIDEO_PARSE_FORMAT_UYVY, + GST_VIDEO_PARSE_FORMAT_v210, GST_VIDEO_PARSE_FORMAT_RGB = 10, GST_VIDEO_PARSE_FORMAT_GRAY } GstVideoParseFormat; @@ -94,6 +95,7 @@ gst_video_parse_format_get_type (void) {GST_VIDEO_PARSE_FORMAT_YV12, "YV12", "YV12"}, {GST_VIDEO_PARSE_FORMAT_YUY2, "YUY2", "YUY2"}, {GST_VIDEO_PARSE_FORMAT_UYVY, "UYVY", "UYVY"}, + {GST_VIDEO_PARSE_FORMAT_v210, "v210", "v210"}, {GST_VIDEO_PARSE_FORMAT_RGB, "RGB", "RGB"}, {GST_VIDEO_PARSE_FORMAT_GRAY, "GRAY", "GRAY"}, {0, NULL, NULL} @@ -143,7 +145,8 @@ gst_video_parse_base_init (gpointer g_class) caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV - ("{ I420, YV12, YUY2, UYVY }") ";" "video/x-raw-rgb; video/x-raw-gray"); + ("{ I420, YV12, YUY2, UYVY, v210 }") ";" + "video/x-raw-rgb; video/x-raw-gray"); gst_raw_parse_class_set_src_pad_template (rp_class, caps); gst_raw_parse_class_set_multiple_frames_per_buffer (rp_class, FALSE); @@ -348,6 +351,8 @@ gst_video_parse_format_to_fourcc (GstVideoParseFormat format) return GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'); case GST_VIDEO_PARSE_FORMAT_UYVY: return GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'); + case GST_VIDEO_PARSE_FORMAT_v210: + return GST_MAKE_FOURCC ('v', '2', '1', '0'); default: g_assert_not_reached (); } @@ -368,6 +373,8 @@ gst_video_parse_update_frame_size (GstVideoParse * vp) } else if (vp->format == GST_VIDEO_PARSE_FORMAT_YUY2 || vp->format == GST_VIDEO_PARSE_FORMAT_UYVY) { framesize = GST_ROUND_UP_4 (vp->width * 2) * vp->height; + } else if (vp->format == GST_VIDEO_PARSE_FORMAT_v210) { + framesize = ((vp->width + 47) / 48) * 128 * vp->height; } else if (vp->format == GST_VIDEO_PARSE_FORMAT_RGB) { framesize = GST_ROUND_UP_4 (vp->width * vp->bpp / 8) * vp->height; } else { @@ -393,7 +400,7 @@ gst_video_parse_get_caps (GstRawParse * rp) "height", G_TYPE_INT, vp->height, "format", GST_TYPE_FOURCC, gst_video_parse_format_to_fourcc (vp->format), "framerate", - GST_TYPE_FRACTION, fps_n, fps_d, "pixel_aspect_ratio", + GST_TYPE_FRACTION, fps_n, fps_d, "pixel-aspect-ratio", GST_TYPE_FRACTION, vp->par_n, vp->par_d, NULL); } else if (vp->format == GST_VIDEO_PARSE_FORMAT_RGB) { caps = gst_caps_new_simple ("video/x-raw-rgb", @@ -402,7 +409,7 @@ gst_video_parse_get_caps (GstRawParse * rp) "bpp", G_TYPE_INT, vp->bpp, "depth", G_TYPE_INT, vp->depth, "framerate", GST_TYPE_FRACTION, fps_n, fps_d, - "pixel_aspect_ratio", GST_TYPE_FRACTION, vp->par_n, vp->par_d, + "pixel-aspect-ratio", GST_TYPE_FRACTION, vp->par_n, vp->par_d, "red_mask", G_TYPE_INT, vp->red_mask, "green_mask", G_TYPE_INT, vp->green_mask, "blue_mask", G_TYPE_INT, vp->blue_mask, @@ -415,7 +422,7 @@ gst_video_parse_get_caps (GstRawParse * rp) "bpp", G_TYPE_INT, vp->bpp, "depth", G_TYPE_INT, vp->depth, "framerate", GST_TYPE_FRACTION, fps_n, fps_d, - "pixel_aspect_ratio", GST_TYPE_FRACTION, vp->par_n, vp->par_d, NULL); + "pixel-aspect-ratio", GST_TYPE_FRACTION, vp->par_n, vp->par_d, NULL); } return caps; } diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 615dc15a..06d64a45 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1483,10 +1483,6 @@ gst_rtp_session_event_recv_rtcp_sink (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { default: - if (rtpsession->send_rtcp_src) { - gst_event_ref (event); - ret = gst_pad_push_event (rtpsession->send_rtcp_src, event); - } ret = gst_pad_push_event (rtpsession->sync_src, event); break; } |