The `videosink` refernce in main() is a floating one, so it should not
be unref'ed (the playbin practically takes ownership of it).
This prevents a "gst_object_unref: assertion '((GObject *)
object)->ref_count > 0' failed" at runtime.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6883>
Using g_error() crashes the application, producing a coredump e.g. when
the user closes the video window, which can be confusing (especially on
the very first tutorial).
Let's change this to log the error message without crashing, using
g_printerr(), like subsequent tutorials.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6883>
- Fixes a crash in tutorial 5, which happened when going back from video playback to the 'library' view, due to
ui_delegate already being destroyed at that point.
- Updates layouts to avoid navigation bar overlapping play/pause buttons. Colours are now correctly updated
based on light/dark mode being enabled, overall look and feel is improved with bigger buttons and paddings.
New button types are used, so target version is now iOS 15.0.
- Disables debug log coloring, as the default terminal in XCode does not render that anyway, so logs are now
more readable there.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5473>
On macOS, a Cocoa event loop is needed in the main thread to ensure
things like opening a GL window work correctly. In the past, this was
patched into glib via Cerbero, but that prevented us from updating it.
This workaround simply runs an NSApplication and then calls the
main function on a secondary thread, allowing GStreamer to correctly
display windows and/or system permission prompts, for example.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3532>