GStreamer on Qt for iOS

Matthew Waters ystreet00 at gmail.com
Fri May 14 15:30:19 UTC 2021


On 13/5/21 7:18 pm, Luis via gstreamer-devel wrote:
> I'm trying to develop an iOS application (iPad should be the main target) for
> controlling a device (Linux embedded) connected to the same network.
>
> Basically it is a remote desktop application.
>
> The application must be multi-platform, so it has be built within a
> multi-platform framework. This requirement is fulfilled by developing the
> app with **Qt** and **Qt Creator**.
>
> The application should play a stream video stream transmitted over the
> network from the Linux device. I use **GStreamer** for that. I already
> downloaded and succesfully installed the iOS package from the official site
> (https://gstreamer.freedesktop.org/documentation/installing/for-ios-development.html?gi-language=c.).
>
> Now, I have some trouble linking the GStreamer framework in the .pro file.
>
> In desktop environments (Windows, Linux and macOS) all I need to do is to
> use pkg-config
>
> ```
> mac {
>      QT_CONFIG -= no-pkg-config
>      PKG_CONFIG = /usr/local/bin/pkg-config
> }
>
> CONFIG += link_pkgconfig
> PKGCONFIG += gstreamer-1.0
> PKGCONFIG += gstreamer-pbutils-1.0
> ```
> and it works just fine. In iOS I don't have pkg-config (afik), so I manually
> added the framework:
>
> ```
> LIBS += -F$$PWD/../../Library/Developer/GStreamer/iPhone.sdk/ -framework
> GStreamer
>
> INCLUDEPATH +=
> $$PWD/../../Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework/Versions/1.0/Headers
> DEPENDPATH +=
> $$PWD/../../Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework/Versions/1.0/Headers
> ```
> When I try to build, it gives me this error:
>
> ```
> GStreamer(libglib-2_0_a-gconvert.c.o):-1: error: Undefined symbols for
> architecture x86_64:
>    "___darwin_check_fd_set_overflow", referenced from:
>        _gst_poll_wait in GStreamer(libgstreamer-1_0_a-gstpoll.c.o)
>    "_iconv_close", referenced from:
>        _g_convert in GStreamer(libglib-2_0_a-gconvert.c.o)
>        _g_convert_with_fallback in GStreamer(libglib-2_0_a-gconvert.c.o)
>       (maybe you meant: _g_iconv_close)
>    "_iconv", referenced from:
>        _g_convert_with_iconv in GStreamer(libglib-2_0_a-gconvert.c.o)
>        _g_convert_with_fallback in GStreamer(libglib-2_0_a-gconvert.c.o)
>       (maybe you meant: _g_iconv_close, _g_iconv , _g_iconv_open ,
> _g_convert_with_iconv )
>    "_iconv_open", referenced from:
>        _try_conversion in GStreamer(libglib-2_0_a-gconvert.c.o)
>       (maybe you meant: _g_iconv_open)
>
> ```
> Tried to link the apparently missing liconv, but no luck.
>
> ```
> macx: LIBS +=
> -L$$PWD/../../../../Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
> -liconv
>
> INCLUDEPATH +=
> $$PWD/../../../../Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr
> DEPENDPATH +=
> $$PWD/../../../../Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr
>
> ```
>
> I'm aware of the existence of a similar question on nabble.com
> (http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-on-Qt-iOS-td4676773.html)
> but I still couldn't figure out the problem.

This answer is on the right track.  However Apple has moved to .tbd 
files instead of providing .dylibs directly so you may need to find that 
instead of the dylib.  The answer is still the same though, you need to 
figure out how to link to the libiconv provided by the iOS SDK (or 
figure out if Qt also ships/uses it's own version of iconv and use that).

Your iOS SDK path looks wrong though and should be something of the 
form: 
'/Applications/Xcode.app/Contents/Developer/Platforms/$PLATFORM.platform/Developer/SDKs/$PLATFORM$MAJOR.$MINOR.sdk' 
going off 
https://gitlab.freedesktop.org/gstreamer/cerbero/-/blob/master/config/ios.config#L40 
<https://gitlab.freedesktop.org/gstreamer/cerbero/-/blob/master/config/ios.config#L40>.

Cheers
-Matt

> Any thoughts?
> Thanks
>
> **Additional info**
>
> * The application must be multi-platform, so it must be built in Qt Creator.
> It already works on Windows, Linux and macOS.
> * developing machine macOS 11.3.1
> * Xcode version 11.2.1
> * Qt version 5.15.2
>
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210515/c745e322/attachment.sig>


More information about the gstreamer-devel mailing list