mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
sys/osxvideo/osxvideosink.m: Emit 'have-ns-view' message when working in embedded mode. The message will contain a po...
Original commit message from CVS: * sys/osxvideo/osxvideosink.m: Emit 'have-ns-view' message when working in embedded mode. The message will contain a pointer to the newly created NSView.
This commit is contained in:
parent
1ff2df1d5f
commit
559d4e9f44
2 changed files with 23 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-03-16 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* sys/osxvideo/osxvideosink.m:
|
||||||
|
Emit 'have-ns-view' message when working in embedded mode. The message
|
||||||
|
will contain a pointer to the newly created NSView.
|
||||||
|
|
||||||
2007-03-16 Jan Schmidt <thaytan@mad.scientist.com>
|
2007-03-16 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/mpegvideoparse/mpegpacketiser.c: (mpeg_util_find_start_code),
|
* gst/mpegvideoparse/mpegpacketiser.c: (mpeg_util_find_start_code),
|
||||||
|
|
|
@ -256,6 +256,9 @@ gst_osx_video_sink_osxwindow_new (GstOSXVideoSink * osxvideosink, gint width,
|
||||||
// insert event dispatch in the glib main loop
|
// insert event dispatch in the glib main loop
|
||||||
g_idle_add ((GSourceFunc) cocoa_event_loop, osxvideosink);
|
g_idle_add ((GSourceFunc) cocoa_event_loop, osxvideosink);
|
||||||
} else {
|
} else {
|
||||||
|
GstStructure *s;
|
||||||
|
GstMessage *msg;
|
||||||
|
gchar * tmp;
|
||||||
/* Needs to be embedded */
|
/* Needs to be embedded */
|
||||||
|
|
||||||
rect.origin.x = 0.0;
|
rect.origin.x = 0.0;
|
||||||
|
@ -264,11 +267,20 @@ gst_osx_video_sink_osxwindow_new (GstOSXVideoSink * osxvideosink, gint width,
|
||||||
rect.size.height = (float) osxwindow->height;
|
rect.size.height = (float) osxwindow->height;
|
||||||
osxwindow->gstview =[[GstGLView alloc] initWithFrame:rect];
|
osxwindow->gstview =[[GstGLView alloc] initWithFrame:rect];
|
||||||
[osxwindow->gstview autorelease];
|
[osxwindow->gstview autorelease];
|
||||||
/* send signal
|
|
||||||
FIXME: need to send a bus message */
|
s = gst_structure_new ("have-ns-view",
|
||||||
/*g_signal_emit (G_OBJECT(osxvideosink),
|
"nsview", G_TYPE_POINTER, osxwindow,
|
||||||
gst_osx_video_sink_signals[SIGNAL_VIEW_CREATED], 0,
|
nil);
|
||||||
osxwindow->gstview); */
|
|
||||||
|
tmp = gst_structure_to_string (s);
|
||||||
|
GST_DEBUG_OBJECT (osxvideosink, "Sending message %s",
|
||||||
|
tmp);
|
||||||
|
g_free (tmp);
|
||||||
|
|
||||||
|
msg = gst_message_new_element (GST_OBJECT (osxvideosink), s);
|
||||||
|
gst_element_post_message (GST_ELEMENT (osxvideosink), msg);
|
||||||
|
|
||||||
|
GST_LOG_OBJECT (osxvideosink, "'have-ns-view' message sent");
|
||||||
}
|
}
|
||||||
return osxwindow;
|
return osxwindow;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue