Вопрос

I'm currently trying to integrate GStreamer on iOS project.

I've downloaded gstreamer-1.0-devel-1.2.1-ios-universal.pkg and add GStreamer.framework into the project. I followed tutorials iOS on http://docs.gstreamer.com/display/GstSDK/iOS+tutorial+4%3A+A+basic+media+player, the previous tutorial works fine, but when it comes to create a basic media player, I have always problem with initiating pipeline, below is the code I use

-(void) app_function{
GstBus *bus;
GSource *timeout_source;
GSource *bus_source;
GError *error = NULL;

GST_DEBUG ("Creating pipeline");

/* Create our own GLib Main Context and make it the default one */
context = g_main_context_new ();
g_main_context_push_thread_default(context);

/* Build pipeline */
pipeline = gst_parse_launch("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", &error);
if (error) {
    gchar *message = g_strdup_printf("Unable to build pipeline: %s", error->message);
    g_clear_error (&error);
    [self setUIMessage:message];
    g_free (message);
    return;
}
....
}

And I got the error: Unable to build pipeline: no element "playbin2"

I equally download the GStreamer for mac, with the same method (gst_parse_launch()), I can launch a internal video player to play a video.

I think maybe the plugin (playbin2) is not well installed or configured, I searched everywhere hoping to find a solution, but I didn't find... Any help will be appreciated.

Thanks in advance

Это было полезно?

Решение

In 1.0, playbin2 was renamed to playbin

Другие советы

I added gst_ios_init.h to main.m file.

#import "gst_ios_init.h"

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

Both gst_ios_init.h and gst_ios_init.m are located in gstreamer tutorial. You should add the files to project before, by file->add files to "project name".

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top