projects
/
platform
/
upstream
/
gstreamer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
macos: Add wrapper API to run a NSApplication in the main thread
[platform/upstream/gstreamer.git]
/
subprojects
/
gst-docs
/
examples
/
tutorials
/
basic-tutorial-5.c
diff --git
a/subprojects/gst-docs/examples/tutorials/basic-tutorial-5.c
b/subprojects/gst-docs/examples/tutorials/basic-tutorial-5.c
index
34c75c9
..
7aab34c
100644
(file)
--- a/
subprojects/gst-docs/examples/tutorials/basic-tutorial-5.c
+++ b/
subprojects/gst-docs/examples/tutorials/basic-tutorial-5.c
@@
-4,6
+4,10
@@
#include <gst/gst.h>
#include <gst/video/videooverlay.h>
#include <gst/gst.h>
#include <gst/video/videooverlay.h>
+#ifdef __APPLE__
+#include <TargetConditionals.h>
+#endif
+
#include <gdk/gdk.h>
#if defined (GDK_WINDOWING_X11)
#include <gdk/gdkx.h>
#include <gdk/gdk.h>
#if defined (GDK_WINDOWING_X11)
#include <gdk/gdkx.h>
@@
-372,7
+376,7
@@
application_cb (GstBus * bus, GstMessage * msg, CustomData * data)
}
int
}
int
-main (int argc, char *argv[])
+
tutorial_
main (int argc, char *argv[])
{
CustomData data;
GstStateChangeReturn ret;
{
CustomData data;
GstStateChangeReturn ret;
@@
-443,3
+447,13
@@
main (int argc, char *argv[])
gst_object_unref (data.playbin);
return 0;
}
gst_object_unref (data.playbin);
return 0;
}
+
+int
+main (int argc, char *argv[])
+{
+#if defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE
+ return gst_macos_main (tutorial_main, argc, argv, NULL);
+#else
+ return tutorial_main (argc, argv);
+#endif
+}