Gstreamer on Qt iOS

doon don-prog at mail.ru
Sun Apr 10 23:49:48 UTC 2016


Sebastian Dröge-3 wrote
> On Mi, 2016-04-06 at 15:49 -0700, doon wrote:
>> Yes, thanks, I already use linking with -liconv.
>> Now I try to register some plugins for playback test but get an issue
>> with
>> this - I can't register any plugin. Code:
>> GST_PLUGIN_STATIC_DECLARE(videotestsrc);
>> GST_PLUGIN_STATIC_REGISTER(videotestsrc);
>> 
>> Output:
>> Undefined symbols for architecture x86_64:
>>   "gst_plugin_videotestsrc_register()", referenced from:
>>       MainWindow::play() in mainwindow.o
>> ld: symbol(s) not found for architecture x86_64
> 
> Are you linking to GStreamer.framework? Does it work with the examples at
> https://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials/xcode%20iOS
> ?
> 
> -- 
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> 
> 
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> signature.asc (968 bytes)
> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4676795/0/signature.asc>

Ok, I resolved previous problem by adding G_BEGIN_DECLS and G_END_DECLS, but
I still don't know how to run a test pipelines:

1. On Android

Code(video test):
G_BEGIN_DECLS
GST_PLUGIN_STATIC_DECLARE(coreelements);
GST_PLUGIN_STATIC_DECLARE(videotestsrc);
GST_PLUGIN_STATIC_DECLARE(playback);
G_END_DECLS
//...
    GST_PLUGIN_STATIC_REGISTER(coreelements);
    GST_PLUGIN_STATIC_REGISTER(videotestsrc);
    GST_PLUGIN_STATIC_REGISTER(playback);

      GstElement *pipeline;
      GError *error = NULL;

      pipeline = gst_parse_launch("videotestsrc ! autovideosink", &error);

      gst_element_set_state(pipeline, GST_STATE_PLAYING);

Output(video test):
descriptions.c:828: error: undefined reference to
'gst_audio_format_from_string'
descriptions.c:832: error: undefined reference to
'gst_audio_format_get_info'
___________________________________________________________________________________________

Code(audio test):
G_BEGIN_DECLS
GST_PLUGIN_STATIC_DECLARE(coreelements);
GST_PLUGIN_STATIC_DECLARE(audiotestsrc);
GST_PLUGIN_STATIC_DECLARE(playback);
G_END_DECLS
//...
    GST_PLUGIN_STATIC_REGISTER(coreelements);
    GST_PLUGIN_STATIC_REGISTER(audiotestsrc);
    GST_PLUGIN_STATIC_REGISTER(playback);

      GstElement *pipeline;
      GError *error = NULL;

      pipeline = gst_parse_launch("audiotestsrc ! autoaudiosink", &error);
      if (!pipeline) {
          ui->label->setText("error");
          return;
      }
      gst_element_set_state(pipeline, GST_STATE_PLAYING);
      ui->label->setText("Playing...");

Output(audio test):
Label set to "Playing...", but I can't hear any sound(but your tutorial
works fine).
___________________________________________________________________________________________

2. On iOS:

Code(video test):
G_BEGIN_DECLS
GST_PLUGIN_STATIC_DECLARE(coreelements);
GST_PLUGIN_STATIC_DECLARE(videotestsrc);
GST_PLUGIN_STATIC_DECLARE(videoconvert);
GST_PLUGIN_STATIC_DECLARE(playback);

G_END_DECLS
//…
  GST_PLUGIN_STATIC_REGISTER(coreelements);
  GST_PLUGIN_STATIC_REGISTER(videotestsrc);
  GST_PLUGIN_STATIC_REGISTER(videoconvert);
  GST_PLUGIN_STATIC_REGISTER(playback);

    GstElement *pipeline, *video_sink;
    GError *error = NULL;

    pipeline = gst_parse_launch("videotestsrc ! videoconvert !
autovideosink", &error);

    gst_element_set_state(pipeline, GST_STATE_READY);

    video_sink = gst_bin_get_by_interface(GST_BIN(pipeline),
GST_TYPE_VIDEO_OVERLAY);
    if (!video_sink) {
        GST_ERROR ("Could not retrieve video sink");
        ui->label->setText("error");
        return;
    }

    gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(video_sink),
this->ui->play_widget->winId());

    gst_element_set_state(pipeline, GST_STATE_PLAYING);
    ui->label->setText("Playing...");

Output(video test):
I just get an “error” string in the label without any Application Output and
playback.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-on-Qt-iOS-tp4676773p4676814.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list