mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
xvimagesink: do not call _xwindow_clear on ready->paused.
Calling clear at that transition does things like stopping xvideo (which is not running at that time) and also clearing anything what the application might have drawn. This breaks handle-expose and autopaint-colorkey features.
This commit is contained in:
parent
76112f9f04
commit
26e4e3dcfe
1 changed files with 9 additions and 10 deletions
|
@ -277,8 +277,8 @@ beach:
|
||||||
xvimage->xvimagesink = NULL;
|
xvimage->xvimagesink = NULL;
|
||||||
gst_object_unref (xvimagesink);
|
gst_object_unref (xvimagesink);
|
||||||
|
|
||||||
GST_MINI_OBJECT_CLASS (xvimage_buffer_parent_class)->
|
GST_MINI_OBJECT_CLASS (xvimage_buffer_parent_class)->finalize (GST_MINI_OBJECT
|
||||||
finalize (GST_MINI_OBJECT (xvimage));
|
(xvimage));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -592,14 +592,17 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps)
|
||||||
pitches[0] = GST_ROUND_UP_4 (xvimage->width);
|
pitches[0] = GST_ROUND_UP_4 (xvimage->width);
|
||||||
offsets[1] = offsets[0] + pitches[0] * GST_ROUND_UP_2 (xvimage->height);
|
offsets[1] = offsets[0] + pitches[0] * GST_ROUND_UP_2 (xvimage->height);
|
||||||
pitches[1] = GST_ROUND_UP_8 (xvimage->width) / 2;
|
pitches[1] = GST_ROUND_UP_8 (xvimage->width) / 2;
|
||||||
offsets[2] = offsets[1] + pitches[1] * GST_ROUND_UP_2 (xvimage->height) / 2;
|
offsets[2] =
|
||||||
|
offsets[1] + pitches[1] * GST_ROUND_UP_2 (xvimage->height) / 2;
|
||||||
pitches[2] = GST_ROUND_UP_8 (pitches[0]) / 2;
|
pitches[2] = GST_ROUND_UP_8 (pitches[0]) / 2;
|
||||||
|
|
||||||
expected_size = offsets[2] + pitches[2] * GST_ROUND_UP_2 (xvimage->height) / 2;
|
expected_size =
|
||||||
|
offsets[2] + pitches[2] * GST_ROUND_UP_2 (xvimage->height) / 2;
|
||||||
|
|
||||||
for (plane = 0; plane < xvimage->xvimage->num_planes; plane++) {
|
for (plane = 0; plane < xvimage->xvimage->num_planes; plane++) {
|
||||||
GST_DEBUG_OBJECT (xvimagesink, "Plane %u has a expected pitch of %d bytes, "
|
GST_DEBUG_OBJECT (xvimagesink,
|
||||||
"offset of %d", plane, pitches[plane], offsets[plane]);
|
"Plane %u has a expected pitch of %d bytes, " "offset of %d",
|
||||||
|
plane, pitches[plane], offsets[plane]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2206,10 +2209,6 @@ gst_xvimagesink_change_state (GstElement * element, GstStateChange transition)
|
||||||
gst_xvimagesink_update_colorbalance (xvimagesink);
|
gst_xvimagesink_update_colorbalance (xvimagesink);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
g_mutex_lock (xvimagesink->flow_lock);
|
|
||||||
if (xvimagesink->xwindow)
|
|
||||||
gst_xvimagesink_xwindow_clear (xvimagesink, xvimagesink->xwindow);
|
|
||||||
g_mutex_unlock (xvimagesink->flow_lock);
|
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue