mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-22 02:13:46 +00:00
osxvideosink: Fix build. Fixes #571038
This commit is contained in:
parent
e5644f0ab3
commit
309c651286
1 changed files with 7 additions and 8 deletions
|
@ -83,7 +83,6 @@ gst_osx_video_sink_osxwindow_new (GstOSXVideoSink * osxvideosink, gint width,
|
||||||
GstOSXWindow *osxwindow = NULL;
|
GstOSXWindow *osxwindow = NULL;
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
GstMessage *msg;
|
GstMessage *msg;
|
||||||
guint8 *viewdata;
|
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_OSX_VIDEO_SINK (osxvideosink), NULL);
|
g_return_val_if_fail (GST_IS_OSX_VIDEO_SINK (osxvideosink), NULL);
|
||||||
|
@ -120,8 +119,10 @@ gst_osx_video_sink_osxwindow_new (GstOSXVideoSink * osxvideosink, gint width,
|
||||||
static void
|
static void
|
||||||
gst_osx_video_sink_osxwindow_destroy (GstOSXVideoSink * osxvideosink)
|
gst_osx_video_sink_osxwindow_destroy (GstOSXVideoSink * osxvideosink)
|
||||||
{
|
{
|
||||||
|
NSAutoreleasePool *pool;
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_OSX_VIDEO_SINK (osxvideosink));
|
g_return_if_fail (GST_IS_OSX_VIDEO_SINK (osxvideosink));
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
if (osxvideosink->osxwindow) {
|
if (osxvideosink->osxwindow) {
|
||||||
[osxvideosink->osxwindow->gstview release];
|
[osxvideosink->osxwindow->gstview release];
|
||||||
|
@ -211,17 +212,13 @@ gst_osx_video_sink_change_state (GstElement * element,
|
||||||
GST_VIDEO_SINK_WIDTH (osxvideosink),
|
GST_VIDEO_SINK_WIDTH (osxvideosink),
|
||||||
GST_VIDEO_SINK_HEIGHT (osxvideosink));
|
GST_VIDEO_SINK_HEIGHT (osxvideosink));
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
default:
|
||||||
break;
|
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = (GST_ELEMENT_CLASS (parent_class))->change_state (element, transition);
|
ret = (GST_ELEMENT_CLASS (parent_class))->change_state (element, transition);
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
|
||||||
break;
|
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
GST_VIDEO_SINK_WIDTH (osxvideosink) = 0;
|
GST_VIDEO_SINK_WIDTH (osxvideosink) = 0;
|
||||||
GST_VIDEO_SINK_HEIGHT (osxvideosink) = 0;
|
GST_VIDEO_SINK_HEIGHT (osxvideosink) = 0;
|
||||||
|
@ -229,6 +226,8 @@ gst_osx_video_sink_change_state (GstElement * element,
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
gst_osx_video_sink_osxwindow_destroy (osxvideosink);
|
gst_osx_video_sink_osxwindow_destroy (osxvideosink);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -242,7 +241,7 @@ gst_osx_video_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
osxvideosink = GST_OSX_VIDEO_SINK (bsink);
|
osxvideosink = GST_OSX_VIDEO_SINK (bsink);
|
||||||
viewdata = [osxvideosink->osxwindow->gstview getTextureBuffer];
|
viewdata = (guint8 *) [osxvideosink->osxwindow->gstview getTextureBuffer];
|
||||||
|
|
||||||
GST_DEBUG ("show_frame");
|
GST_DEBUG ("show_frame");
|
||||||
memcpy (viewdata, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
|
memcpy (viewdata, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
|
||||||
|
|
Loading…
Reference in a new issue