我已经使用以下链接中的 .msi 文件在 Windows 上安装了 GStreamer -
gstreamer-1.0-x86-1.2.0.msi
和
gstreamer-1.0-devel-x86-1.2.0.msi
我可以运行以下命令并播放 .webm视频文件没有任何问题。gst-launch-1.0 playbin uri="file:///D:/gstreamer_sample_media/sintel_trailer-480p.webm"
但是当我尝试使用以下命令播放测试 .mts 文件时:
gst-launch-1.0 playbin uri="file:///D:/MyTestMedia/Test1.mts"
Run Code Online (Sandbox Code Playgroud)
出现以下错误:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Missing element: MPEG-2 Transport Stream demuxer
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No dec
oder available for type 'video/mpegts, systemstream=(boolean)true, packetsize=(i
nt)192'.
Additional debug info:
gsturidecodebin.c(930): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin
:uridecodebin0
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecode
Bin:decodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gstdecodebin2.c(3896): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDeco
deBin:uridecodebin0/GstDecodeBin:decodebin0:
no …Run Code Online (Sandbox Code Playgroud) 有没有人试图将http://docs.gstreamer.com/display/GstSDK/Tutorials中提供的Gstreamer SDK教程移植 到gstreamer 1.0?
我试图将Basic-tutorial-8.c从GstSDK移植到gstreamer 1.0.最终结果不起作用,并在运行时退出并出现错误.
这是我到目前为止所做的.我的主要帮助来源如下:http: //gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-porting-1.0.html#section-porting-objects-1.0
用audio/x-raw替换了audio/x-raw-int
用data.app_sink替换了data.app_sink,"new-buffer","new-sample"
更换
tee_src_pad_template = gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (data.tee), "src%d");
Run Code Online (Sandbox Code Playgroud)
同
tee_src_pad_template = gst_element_class_get_pad_template( GST_ELEMENT_GET_CLASS( data.tee ), "src_%u" );
Run Code Online (Sandbox Code Playgroud)更换
raw = (gint16 *)GST_BUFFER_DATA (buffer);
Run Code Online (Sandbox Code Playgroud)同
GstMapInfo stGstMapInfo1;
gst_buffer_map( buffer, &stGstMapInfo1, (GstMapFlags)( GST_MAP_READ | GST_MAP_WRITE ) );
raw = (gint16 *)stGstMapInfo1.data;
Run Code Online (Sandbox Code Playgroud)
...
/* Free the buffer now that we are done with it */
gst_buffer_unmap( buffer, &stGstMapInfo1 );
Run Code Online (Sandbox Code Playgroud)
在上述更改之后,我可以构建并运行该程序,但它会在一段时间后出现以下错误:从元素audio_source收到错误:内部数据流错误.调试信息:gstbasesrc.c(2865):gst_base_src_loop():/ GstPipeline:test-pipeline/GstAppSrc:audio_source:流任务暂停,原因未协商(-4)
我想我必须更多地学习本教程的new_buffer和push_data函数.
预先感谢您的帮助.