我正在使用以下管道播放传输流文件 (*.ts):
gst-launch-0.10 playbin2 uri=file:///c:/bbb.ts
Run Code Online (Sandbox Code Playgroud)
但我需要自己将其转换为管道。我不确定如何实现这一目标。
到目前为止,我已经尝试过:(工作正常)
gst-launch-0.10 -v filesrc location=c:/bbb.ts ! tsdemux ! audio/x-ac3 ! fakesink
Run Code Online (Sandbox Code Playgroud)
但是,如果我用 autoaudiosink 替换 fakesink,它会因未链接错误而失败。
甚至 fakesink 也不适用于视频:
gst-launch-0.10 -v filesrc location=c:/bbb.ts ! tsdemux ! video/x-mpeg2 ! fakesink
Run Code Online (Sandbox Code Playgroud)
所以我有两个问题:
我目前正在尝试将GStreamer集成到iOS项目中.
我已经下载了gstreamer-1.0-devel-1.2.1-ios-universal.pkg并将GStreamer.framework添加到项目中.我在http://docs.gstreamer.com/display/GstSDK/iOS+tutorial+4%3A+A+basic+media+player上关注iOS 教程,上一篇教程工作正常但是在创建基本媒体时播放器,我一直有启动管道的问题,下面是我使用的代码
-(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;
}
....
}
Run Code Online (Sandbox Code Playgroud)
我得到错误:无法构建管道:没有元素"playbin2"
我同样下载GStreamer for mac,使用相同的方法(gst_parse_launch()),我可以启动一个内部视频播放器来播放视频.
我想也许插件(playbin2)没有很好地安装或配置,我到处寻找希望找到解决方案,但我没有找到...任何帮助将不胜感激.
提前致谢