From: <tp...@ke...> - 2007-01-25 12:24:32
|
CVS Root: /cvs/gstreamer Module: gst-plugins-base Changes by: tpm Date: Thu Jan 25 2007 12:24:30 UTC Log message: * gst/playback/gstplaybin.c: (handoff): Fix up caps on the frame buffer before we save it and potentially make it accessible to other threads via g_object_get; also use gst_buffer_replace() instead of gst_mini_object_replace(). Modified files: . : ChangeLog gst/playback : gstplaybin.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.3109&r2=1.3110 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/playback/gstplaybin.c.diff?r1=1.102&r2=1.103 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v retrieving revision 1.3109 retrieving revision 1.3110 diff -u -d -r1.3109 -r1.3110 --- ChangeLog 25 Jan 2007 12:06:59 -0000 1.3109 +++ ChangeLog 25 Jan 2007 12:24:17 -0000 1.3110 @@ -1,5 +1,12 @@ 2007-01-25 Tim-Philipp Müller <tim at centricular dot net> + * gst/playback/gstplaybin.c: (handoff): + Fix up caps on the frame buffer before we save it and potentially + make it accessible to other threads via g_object_get; also use + gst_buffer_replace() instead of gst_mini_object_replace(). + +2007-01-25 Tim-Philipp Müller <tim at centricular dot net> * gst/playback/gstplaybin.c: (gst_play_bin_get_property): Make getting the current frame thread-safe. Index: gstplaybin.c RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaybin.c,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- gstplaybin.c 25 Jan 2007 12:06:59 -0000 1.102 +++ gstplaybin.c 25 Jan 2007 12:24:18 -0000 1.103 @@ -782,21 +782,19 @@ handoff (GstElement * identity, GstBuffer * frame, gpointer data) { GstPlayBin *play_bin = GST_PLAY_BIN (data); - GstBuffer **frame_p = &play_bin->frame; - - gst_mini_object_replace ((GstMiniObject **) frame_p, - GST_MINI_OBJECT_CAST (frame)); /* applications need to know the buffer caps, * make sure they are always set on the frame */ - if (GST_BUFFER_CAPS (play_bin->frame) == NULL) { + if (GST_BUFFER_CAPS (frame) == NULL) { GstPad *pad; if ((pad = gst_element_get_pad (identity, "sink"))) { - gst_buffer_set_caps (play_bin->frame, GST_PAD_CAPS (pad)); + gst_buffer_set_caps (frame, GST_PAD_CAPS (pad)); gst_object_unref (pad); } } + gst_buffer_replace (&play_bin->frame, frame); } static void |