GStreamer on Qt for iOS

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

GStreamer on Qt for iOS

GStreamer-devel mailing list
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.

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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
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
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
Thanks for the hint.

I've made smoe progress.

So far I've managed to correctly link the library and successfully run the
project in the Simulator, but when I try to create GStreamer elements it
*fails* at runtime.

Here it is my .pro

#iOS
INCLUDEPATH +=
/Users/user/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework/Headers
LIBS += -F /Users/user/Library/Developer/GStreamer/iPhone.sdk -framework
GStreamer

LIBS +=
-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
-liconv

QMAKE_IOS_DEPLOYMENT_TARGET = 12.0

# Universal target (iPhone and iPad)
QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1,2

QMAKE_APPLE_DEVICE_ARCHS = arm64
QMAKE_APPLE_SIMULATOR_ARCHS = x86_64



And here it is where the application fails:

data.pipeline = gst_pipeline_new ("pipeline");
qDebug() << "pipeline" << data.pipeline;

data.udpsrc = gst_element_factory_make("udpsrc", NULL);
data.rtph264depay = gst_element_factory_make("rtph264depay", NULL);
data.avdec_h264 = gst_element_factory_make("avdec_h264", NULL);
data.videoconvert = gst_element_factory_make("videoconvert", NULL);
data.videoflip = gst_element_factory_make ("videoflip", NULL);

qDebug() << "udpsrc" << data.udpsrc;
qDebug() << "rtph264depay" << data.rtph264depay;
qDebug() << "avdec_h264" << data.avdec_h264;
qDebug() << "videoconvert" << data.videoconvert;
qDebug() << "videoflip" << data.videoflip;



*All the calls to gst_element_factory_make return null.*

Additional Info

    Qt 5.15.2
    Xcode 12.5
    Develop on Big Sur

Any ideas?

Thanks






--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
Are you missing
https://gitlab.freedesktop.org/gstreamer/gst-examples/-/blob/master/playback/player/ios/GstPlay/gst_ios_init.m 
<https://gitlab.freedesktop.org/gstreamer/gst-examples/-/blob/master/playback/player/ios/GstPlay/gst_ios_init.m>
and the corresponding .h file?  Everything is linked in statically on
iOS and you need to manually declare and register each GStreamer plugin
you want to use.

Cheers
-Matt

On 18/5/21 7:04 pm, Luis via gstreamer-devel wrote:

> Thanks for the hint.
>
> I've made smoe progress.
>
> So far I've managed to correctly link the library and successfully run the
> project in the Simulator, but when I try to create GStreamer elements it
> *fails* at runtime.
>
> Here it is my .pro
>
> #iOS
> INCLUDEPATH +=
> /Users/user/Library/Developer/GStreamer/iPhone.sdk/GStreamer.framework/Headers
> LIBS += -F /Users/user/Library/Developer/GStreamer/iPhone.sdk -framework
> GStreamer
>
> LIBS +=
> -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
> -liconv
>
> QMAKE_IOS_DEPLOYMENT_TARGET = 12.0
>
> # Universal target (iPhone and iPad)
> QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1,2
>
> QMAKE_APPLE_DEVICE_ARCHS = arm64
> QMAKE_APPLE_SIMULATOR_ARCHS = x86_64
>
>
>
> And here it is where the application fails:
>
> data.pipeline = gst_pipeline_new ("pipeline");
> qDebug() << "pipeline" << data.pipeline;
>
> data.udpsrc = gst_element_factory_make("udpsrc", NULL);
> data.rtph264depay = gst_element_factory_make("rtph264depay", NULL);
> data.avdec_h264 = gst_element_factory_make("avdec_h264", NULL);
> data.videoconvert = gst_element_factory_make("videoconvert", NULL);
> data.videoflip = gst_element_factory_make ("videoflip", NULL);
>
> qDebug() << "udpsrc" << data.udpsrc;
> qDebug() << "rtph264depay" << data.rtph264depay;
> qDebug() << "avdec_h264" << data.avdec_h264;
> qDebug() << "videoconvert" << data.videoconvert;
> qDebug() << "videoflip" << data.videoflip;
>
>
>
> *All the calls to gst_element_factory_make return null.*
>
> Additional Info
>
>      Qt 5.15.2
>      Xcode 12.5
>      Develop on Big Sur
>
> Any ideas?
>
> Thanks
>
>
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
Yes, I did that, but there were several errors, so I tryed to manually
declare and register the plugins.

This works fine:

// Declar plugins
G_BEGIN_DECLS
GST_PLUGIN_STATIC_DECLARE(coreelements);
GST_PLUGIN_STATIC_DECLARE(videotestsrc);
GST_PLUGIN_STATIC_DECLARE(videoconvert);
GST_PLUGIN_STATIC_DECLARE(playback);
GST_PLUGIN_STATIC_DECLARE(x264);
GST_PLUGIN_STATIC_DECLARE(libav);
GST_PLUGIN_STATIC_DECLARE(encoding);
//...
G_END_DECLS

int main(int argc, char *argv[]) {

    // Initialize the GStreamer library
    if (gst_init_check(&argc, &argv, NULL)) {
        qDebug() << "This program is linked against" <<
gst_version_string();
    }

    // Register plugins
    GST_PLUGIN_STATIC_REGISTER(coreelements);
    GST_PLUGIN_STATIC_REGISTER(videotestsrc);
    GST_PLUGIN_STATIC_REGISTER(videoconvert);
    GST_PLUGIN_STATIC_REGISTER(playback);
    GST_PLUGIN_STATIC_REGISTER(x264);
    GST_PLUGIN_STATIC_REGISTER(libav);
    GST_PLUGIN_STATIC_REGISTER(encoding);
    //...
}

But if I try to register the others plugins, for example by adding

GST_PLUGIN_STATIC_DECLARE(udp);

and

GST_PLUGIN_STATIC_REGISTER(udp);

it gives me this error:

GStreamer(libgio-2_0_a-gresolver.c.o):-1: error: Undefined symbols for
architecture x86_64:
  "_res_9_dn_expand", referenced from:
      _do_lookup_records in GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
  "_res_9_ninit", referenced from:
      _do_lookup_records in GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
  "_res_9_nquery", referenced from:
      _do_lookup_records in GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
  "_res_9_ndestroy", referenced from:
      _do_lookup_records in GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
  "_res_9_init", referenced from:
      _g_resolver_maybe_reload in GStreamer(libgio-2_0_a-gresolver.c.o)

I tried to use directly gst_ios_init.m and gst_ios_init.h, but it seems
missing some pieces. I needed to add

#include <UIKit/UIKit.h>
#include <Foundation/Foundation.h>

so I suspect that some include/import is missing somewhere

Specifically it seems missing the lgio-2.0 library.

Same thread in the Qt Forum:
https://forum.qt.io/topic/126746/gstreamer-on-ios/5



Any hint?

Thanks Matt






--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
If you google any of those functions, you'll find that _res_9_* is in
libresolve.dylib.  Add that to your build definitions.

find, nm and grep are your friends here.

Cheers
-Matt

On 20/5/21 10:11 pm, Luis via gstreamer-devel wrote:

> Yes, I did that, but there were several errors, so I tryed to manually
> declare and register the plugins.
>
> This works fine:
>
> // Declar plugins
> G_BEGIN_DECLS
> GST_PLUGIN_STATIC_DECLARE(coreelements);
> GST_PLUGIN_STATIC_DECLARE(videotestsrc);
> GST_PLUGIN_STATIC_DECLARE(videoconvert);
> GST_PLUGIN_STATIC_DECLARE(playback);
> GST_PLUGIN_STATIC_DECLARE(x264);
> GST_PLUGIN_STATIC_DECLARE(libav);
> GST_PLUGIN_STATIC_DECLARE(encoding);
> //...
> G_END_DECLS
>
> int main(int argc, char *argv[]) {
>
>      // Initialize the GStreamer library
>      if (gst_init_check(&argc, &argv, NULL)) {
>          qDebug() << "This program is linked against" <<
> gst_version_string();
>      }
>
>      // Register plugins
>      GST_PLUGIN_STATIC_REGISTER(coreelements);
>      GST_PLUGIN_STATIC_REGISTER(videotestsrc);
>      GST_PLUGIN_STATIC_REGISTER(videoconvert);
>      GST_PLUGIN_STATIC_REGISTER(playback);
>      GST_PLUGIN_STATIC_REGISTER(x264);
>      GST_PLUGIN_STATIC_REGISTER(libav);
>      GST_PLUGIN_STATIC_REGISTER(encoding);
>      //...
> }
>
> But if I try to register the others plugins, for example by adding
>
> GST_PLUGIN_STATIC_DECLARE(udp);
>
> and
>
> GST_PLUGIN_STATIC_REGISTER(udp);
>
> it gives me this error:
>
> GStreamer(libgio-2_0_a-gresolver.c.o):-1: error: Undefined symbols for
> architecture x86_64:
>    "_res_9_dn_expand", referenced from:
>        _do_lookup_records in GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
>    "_res_9_ninit", referenced from:
>        _do_lookup_records in GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
>    "_res_9_nquery", referenced from:
>        _do_lookup_records in GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
>    "_res_9_ndestroy", referenced from:
>        _do_lookup_records in GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
>    "_res_9_init", referenced from:
>        _g_resolver_maybe_reload in GStreamer(libgio-2_0_a-gresolver.c.o)
>
> I tried to use directly gst_ios_init.m and gst_ios_init.h, but it seems
> missing some pieces. I needed to add
>
> #include <UIKit/UIKit.h>
> #include <Foundation/Foundation.h>
>
> so I suspect that some include/import is missing somewhere
>
> Specifically it seems missing the lgio-2.0 library.
>
> Same thread in the Qt Forum:
> https://forum.qt.io/topic/126746/gstreamer-on-ios/5
>
>
>
> Any hint?
>
> Thanks Matt
>
>
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
Also, you may be missing some core frameworks, like Foundation or
CoreGraphics, or UIKit.  See
https://gitlab.freedesktop.org/gstreamer/gst-examples/-/blob/master/playback/player/ios/GstPlay.xcodeproj/project.pbxproj#L9 
<https://gitlab.freedesktop.org/gstreamer/gst-examples/-/blob/master/playback/player/ios/GstPlay.xcodeproj/project.pbxproj#L9>
for a tentative list.

Cheers
-Matt

On 21/5/21 11:22 am, Matthew Waters wrote:

> If you google any of those functions, you'll find that _res_9_* is in
> libresolve.dylib.  Add that to your build definitions.
>
> find, nm and grep are your friends here.
>
> Cheers
> -Matt
>
> On 20/5/21 10:11 pm, Luis via gstreamer-devel wrote:
>> Yes, I did that, but there were several errors, so I tryed to manually
>> declare and register the plugins.
>>
>> This works fine:
>>
>> // Declar plugins
>> G_BEGIN_DECLS
>> GST_PLUGIN_STATIC_DECLARE(coreelements);
>> GST_PLUGIN_STATIC_DECLARE(videotestsrc);
>> GST_PLUGIN_STATIC_DECLARE(videoconvert);
>> GST_PLUGIN_STATIC_DECLARE(playback);
>> GST_PLUGIN_STATIC_DECLARE(x264);
>> GST_PLUGIN_STATIC_DECLARE(libav);
>> GST_PLUGIN_STATIC_DECLARE(encoding);
>> //...
>> G_END_DECLS
>>
>> int main(int argc, char *argv[]) {
>>
>>      // Initialize the GStreamer library
>>      if (gst_init_check(&argc, &argv, NULL)) {
>>          qDebug() << "This program is linked against" <<
>> gst_version_string();
>>      }
>>
>>      // Register plugins
>>      GST_PLUGIN_STATIC_REGISTER(coreelements);
>>      GST_PLUGIN_STATIC_REGISTER(videotestsrc);
>>      GST_PLUGIN_STATIC_REGISTER(videoconvert);
>>      GST_PLUGIN_STATIC_REGISTER(playback);
>>      GST_PLUGIN_STATIC_REGISTER(x264);
>>      GST_PLUGIN_STATIC_REGISTER(libav);
>>      GST_PLUGIN_STATIC_REGISTER(encoding);
>>      //...
>> }
>>
>> But if I try to register the others plugins, for example by adding
>>
>> GST_PLUGIN_STATIC_DECLARE(udp);
>>
>> and
>>
>> GST_PLUGIN_STATIC_REGISTER(udp);
>>
>> it gives me this error:
>>
>> GStreamer(libgio-2_0_a-gresolver.c.o):-1: error: Undefined symbols for
>> architecture x86_64:
>>    "_res_9_dn_expand", referenced from:
>>        _do_lookup_records in
>> GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
>>    "_res_9_ninit", referenced from:
>>        _do_lookup_records in
>> GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
>>    "_res_9_nquery", referenced from:
>>        _do_lookup_records in
>> GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
>>    "_res_9_ndestroy", referenced from:
>>        _do_lookup_records in
>> GStreamer(libgio-2_0_a-gthreadedresolver.c.o)
>>    "_res_9_init", referenced from:
>>        _g_resolver_maybe_reload in GStreamer(libgio-2_0_a-gresolver.c.o)
>>
>> I tried to use directly gst_ios_init.m and gst_ios_init.h, but it seems
>> missing some pieces. I needed to add
>>
>> #include <UIKit/UIKit.h>
>> #include <Foundation/Foundation.h>
>>
>> so I suspect that some include/import is missing somewhere
>>
>> Specifically it seems missing the lgio-2.0 library.
>>
>> Same thread in the Qt Forum:
>> https://forum.qt.io/topic/126746/gstreamer-on-ios/5
>>
>>
>>
>> Any hint?
>>
>> Thanks Matt
>>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
Great, I added the resolv library and now it compiles and creates all the
elements! Many thanks!

Now it remains the (I hope) last problem. I 'm struggling with the overlay
interface.

The error:
*
0:00:09.823339000  4417 0x7fde43c20900 WARN              autodetect
gstautodetect.c:351:gst_auto_detect_find_best:<autovideosink0> warning:
Failed to find a usable video sink
Could not retrieve videosink!

** (...:4417): CRITICAL **: 10:23:40.058:
gst_video_overlay_set_window_handle: assertion 'overlay != NULL' failed
*

The code (simplified):

data.pipeline = gst_pipeline_new ("pipeline");
data.udpsrc = gst_element_factory_make("udpsrc", NULL);
data.rtph264depay = gst_element_factory_make("rtph264depay", NULL);
data.avdec_h264 = gst_element_factory_make("avdec_h264", NULL);
data.videoconvert = gst_element_factory_make("videoconvert", NULL);
data.videoflip = gst_element_factory_make ("videoflip", NULL);
data.queue = gst_element_factory_make("queue", NULL);
data.videosink = gst_element_factory_make ("autovideosink", NULL); // Tried
also glimagesink but didn't work

 if (!data.pipeline || !data.udpsrc || !data.rtph264depay ||
!data.avdec_h264 || !data.videoconvert || !data.videoflip || !data.queue ||
!data.videosink ) {
     qWarning() << "Not all elements could be created!";
     DisposePipeline();
     return;
}

GstCaps *caps = gst_caps_new_simple("application/x-rtp",
"payload",G_TYPE_INT,96, NULL);

g_object_set(data.udpsrc, "caps", caps, NULL);
gst_caps_unref(caps);

gst_bin_add_many (GST_BIN (data.pipeline), data.udpsrc, data.rtph264depay,
data.avdec_h264, data.videoconvert, data.videoflip, data.queue,
data.videosink, NULL);

// Link the pipeline
if (!gst_element_link_many (data.udpsrc, data.rtph264depay, data.avdec_h264,
data.videoconvert, data.videoflip,  data.queue, data.videosink, NULL)) {
            qWarning() << "Error: not all elements could be linked!";
            DisposePipeline();
            return;
}

gst_element_set_state(data.pipeline, GST_STATE_READY);

GstElement* sink = gst_bin_get_by_interface(GST_BIN(data.pipeline),
GST_TYPE_VIDEO_OVERLAY);
if (!sink) {
    qDebug() << "*Could not retrieve videosink!*";
}

gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink),
window->winId());


I tried to replicate as close as possible the tutorial 3
(https://gstreamer.freedesktop.org/documentation/tutorials/ios/video.html?gi-language=c).

Any suggestions?
Thyaks for the help




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
Actually, could be another issue:

I saw that in the tutorial was enabled GST_IOS_PLUGINS_SYS (maybe for
glimagesink?). When I try to load the plugins, I have this error:

:-1: error: linker command failed with exit code 1 (use -v to see
invocation)
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

** BUILD FAILED **


The following build commands failed:
        Ld Debug-iphonesimulator/QTcpClientTest.app/QTcpClientTest normal x86_64
(1 failure)
make: *** [xcodebuild-debug-simulator] Error 65

And nothing else



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer on Qt for iOS

GStreamer-devel mailing list
Nevermind, I found the error. Was missing GST_STATIC_REGISTER(opengl). Now it
works pretty well.

:)



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel