mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
gst/playback/gstplaybin.c: Fix up caps on the frame buffer before we save it and potentially make it accessible to ot...
Original commit message from CVS: * 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().
This commit is contained in:
parent
d289e2d55c
commit
dab1309f32
2 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2007-01-25 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/playback/gstplaybin.c: (gst_play_bin_get_property):
|
* gst/playback/gstplaybin.c: (gst_play_bin_get_property):
|
||||||
|
|
|
@ -782,21 +782,19 @@ static void
|
||||||
handoff (GstElement * identity, GstBuffer * frame, gpointer data)
|
handoff (GstElement * identity, GstBuffer * frame, gpointer data)
|
||||||
{
|
{
|
||||||
GstPlayBin *play_bin = GST_PLAY_BIN (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,
|
/* applications need to know the buffer caps,
|
||||||
* make sure they are always set on the frame */
|
* 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;
|
GstPad *pad;
|
||||||
|
|
||||||
if ((pad = gst_element_get_pad (identity, "sink"))) {
|
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_object_unref (pad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_buffer_replace (&play_bin->frame, frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue