Firefly开源社区
标题:
lubuntu 16.04 下 gstreamer 软解 h264 的问题
[打印本页]
作者:
huoooooo
时间:
2017-9-28 11:00
标题:
lubuntu 16.04 下 gstreamer 软解 h264 的问题
用的gstreamer1.8.3,以下是相关配置:
source = gst_element_factory_make ("filesrc", "file-source");
parse = gst_element_factory_make ("h264parse"/*"vaapiparse_h264"*/, "vaapiparse");
decoder = gst_element_factory_make ("avdec_h264", "decoder");
sink = gst_element_factory_make ("xvimagesink", "sink");
g_object_set (G_OBJECT (vdp->source), "location", DATA_FIFO, NULL);
g_object_set (G_OBJECT (vdp->source), "blocksize", TOTAL_DATA_LEN, NULL);
g_object_set (G_OBJECT (vdp->sink), "sync", 0, NULL);
//g_object_set (G_OBJECT (vdp->sink), "display", 2, NULL); //va/glx display
//g_object_set (G_OBJECT (vdp->sink), "fullscreen", 1, NULL);
以下是跑了两帧数据的打印信息:
----- file ./h264_1920x1080/1.h264 [133260]---------
gstavviddec.c --- frame 0 to call gst_ffmpegviddec_handle_frame, size = 133262
gstavviddec.c --- frame 0 to call gst_ffmpegviddec_frame, size = 133262
gstavviddec.c --- frame 0 to call gst_ffmpegviddec_video_frame, size = 133262
gst_ffmpegviddec_video_frame --- 1362 --- len < 0 or data is NULL, goto beach!
gsth264parse.c --- frame 0 to call gst_h264_parse_handle_frame, size = 133260
gstbaseparse.c --- frame 0 to call gst_base_parse_handle_buffer, skipped = 915316, flushed = 133260
----- file ./h264_1920x1080/2.h264 [131296]---------
gstavviddec.c --- frame 1 to call gst_ffmpegviddec_handle_frame, size = 131298
gstavviddec.c --- frame 1 to call gst_ffmpegviddec_frame, size = 131298
gstavviddec.c --- frame 1 to call gst_ffmpegviddec_video_frame, size = 131298
gsth264parse.c --- frame 1 to call gst_h264_parse_handle_frame, size = 131296
gstbaseparse.c --- frame 1 to call gst_base_parse_handle_buffer, skipped = 917280, flushed = 131296
解码器自己下了源码包:gst-libav-1.8.3.tar.xz,gstavviddec.c 里面加了一些打印信息。
解析器自己下了源码包:gst-plugins-bad-1.8.3.tar.xz,改了 gsth264parse.c 里面 gst_h264_parse_handle_frame 函数的处理,加了打印。
gstreamer-1.8.3.tar.xz 的 gstbaseparse.c 里面加了打印。
现在的问题就是不管跑多少帧,第一帧都会打印这个: gst_ffmpegviddec_video_frame --- 1362 --- len < 0 or data is NULL, goto beach!,所以只跑一帧的话不会有任何显示。在实际应用中会出现卡在最后一帧,只有下一帧来了才会恢复正常,见楼下图。当然也不确定是不是这个原因,才接触编解码不久,希望各位前辈们能指点一下,先谢谢了。
作者:
huoooooo
时间:
2017-9-28 11:06
微信传过来就变这质量了,大家包涵一下
webwxgetmsgimg.jpg
(27.71 KB, 下载次数: 481)
下载附件
2017-9-28 11:05 上传
作者:
huoooooo
时间:
2017-10-11 11:25
zhe me leng qing? --- SOS --- up!up!up!
作者:
huoooooo
时间:
2017-10-16 14:23
http://blog.csdn.net/h514434485/article/details/52164087
谢博主。
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/)
Powered by Discuz! X3.1