Gstreamer:为啥在显示一些过滤器之前我需要一个视频转换?
Posted
技术标签:
【中文标题】Gstreamer:为啥在显示一些过滤器之前我需要一个视频转换?【英文标题】:Gstreamer: Why do I need a videoconvert before displaying some filter?Gstreamer:为什么在显示一些过滤器之前我需要一个视频转换? 【发布时间】:2015-11-09 15:59:11 【问题描述】:我正在 GStreamer 1.0 上编写一个非常基本的管道,我想了解为什么在显示流之前需要一个 videoconvert。
gst-launch-1.0 videotestsrc ! vertigotv ! videoconvert ! autovideosink
如果我从管道中删除 videoconvert,则会出现错误并且流无法播放:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
我不明白为什么不能自动协商上限。
这里是眩晕水槽垫的功能模板:
Capabilities:
video/x-raw
format: RGBx, BGRx
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
这里是autovideosink的src pad的功能模板:
Capabilities:
ANY
谁能解释一下为什么这个元素是播放管道所必需的。为什么在显示管道之前需要切换色彩空间?有没有办法不使用这个元素(也许使用大写字母)?
【问题讨论】:
【参考方案1】:vertigotv
元素can only handle raw video frames in RGBx and BGRx formats。 autovideosink
不能保证支持 RGBx / BGRx 格式。在vertigotv
的源和autovideosink
的接收垫之间,您需要videoconvert
元素到ensure compatibility。
autovideosink
是一个 bin,里面包含实际的视频接收器。 autovideosink
的 sink pad 功能取决于其内部视频 sink 的 sink pad 功能。
它可以使用多种类型的视频接收器。例如,glimagesink
可以在没有videoconvert
的情况下工作(因为它可以读取 RGBx / BGRx 帧)。另一方面,osxvideosink
将无法在没有videoconvert
的情况下工作(因为缺乏对 RGBx / BGRx 的支持)。
如果 autovideosink
将使用支持 RGBx / BGRx 的视频接收器,videoconvert
元素将只传递帧,而不执行任何工作。因此,您可以放心地将其保留在所有情况下。
【讨论】:
酷图!有没有办法自动生成? 是的,在您的命令前添加GST_DEBUG_DUMP_DOR_DIR=.
,例如:GST_DEBUG_DUMP_DOR_DIR=. gst-play-1.0 ~/music.mp3
您将获得.dot 格式的图表。您可以稍后预览或将其转换为 SVG 或 PNG。
@KyryloPolezhaiev 我想你的意思是 GST_DEBUG_DUMP_DOT_DIR【参考方案2】:
我的理解是autovideosink
不充当视频本身的同步器,它只是充当自动检测传递:它会通过搜索可用接收器的注册表找到合适的接收器来使用.
因此,虽然autovideosink
本身可以接受和传递任何类型的视频流,但它实际发送到的最终接收器可能需要转换为支持的格式。
例如,在我的 Ubuntu 14.04 机器上,运行您提供的管道会导致 autovideosink 将数据传递给 an xvimagesink
,而 an xvimagesink
的接收器垫有更具体的要求:
Capabilities:
video/x-raw-rgb
framerate: [ 0/1, 2147483647/1 ]
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
video/x-raw-yuv
framerate: [ 0/1, 2147483647/1 ]
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
编辑:
具体来说,请注意xvimagesink
支持原始 YUV 和原始(每像素 24 位)RGB,而vertigotv
只能提供 BGRx 和 RGBx(即每像素 32 位:8 个红色位,8 个绿色位、8 个蓝色位和 8 个忽略位)。所以需要videoconvert
才能让他们一起玩得很好。
在启用详细调试的情况下运行(我已对相关行进行了注释),您可以获得更多关于 autovideosink
委托给哪个接收器以及它失败的原因的信息:
$ gst-launch-0.10 --gst-debug=3 --verbose videotestsrc ! vertigotv ! autovideosink
0:00:00.000249935 28239 0xd13e00 INFO GST_INIT gstquery.c:107:_gst_query_initialize: init queries
0:00:00.000986921 28239 0xd13e00 INFO GST_INIT gstmessage.c:73:_gst_message_initialize: init messages
0:00:00.001303128 28239 0xd13e00 INFO GST_PLUGIN_LOADING gstplugin.c:350:_gst_plugin_initialize: registering 0 static plugins
0:00:00.001442586 28239 0xd13e00 INFO GST_PLUGIN_LOADING gstplugin.c:255:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.001465363 28239 0xd13e00 INFO GST_PLUGIN_LOADING gstplugin.c:257:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.001492124 28239 0xd13e00 INFO GST_REGISTRY gstregistry.c:1672:ensure_current_registry: reading registry cache: /home/gabriel/.gstreamer-0.10/registry.x86_64.bin
0:00:00.011542619 28239 0xd13e00 INFO GST_REGISTRY gstregistrybinary.c:614:gst_registry_binary_read_cache: loaded /home/gabriel/.gstreamer-0.10/registry.x86_64.bin in 0.010022 seconds
0:00:00.011640443 28239 0xd13e00 INFO GST_REGISTRY gstregistry.c:1522:scan_and_update_registry: Validating plugins from registry cache: /home/gabriel/.gstreamer-0.10/registry.x86_64.bin
0:00:00.012164072 28239 0xd13e00 INFO GST_REGISTRY gstregistry.c:1634:scan_and_update_registry: Registry cache has not changed
0:00:00.012188670 28239 0xd13e00 INFO GST_REGISTRY gstregistry.c:1707:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.012205838 28239 0xd13e00 INFO GST_INIT gst.c:805:init_post: GLib runtime version: 2.40.2
0:00:00.012221254 28239 0xd13e00 INFO GST_INIT gst.c:807:init_post: GLib headers version: 2.39.1
0:00:00.012253325 28239 0xd13e00 INFO GST_PIPELINE gstparse.c:334:gst_parse_launch_full: parsing pipeline description 'videotestsrc ! vertigotv ! autovideosink '
0:00:00.015690495 28239 0xd13e00 INFO GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideotestsrc.so" loaded
0:00:00.015738624 28239 0xd13e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:376:gst_element_factory_create: creating element "videotestsrc"
0:00:00.016500598 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseSrc@0xe26090> adding pad 'src'
0:00:00.017049197 28239 0xd13e00 INFO GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgsteffectv.so" loaded
0:00:00.017083649 28239 0xd13e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:376:gst_element_factory_create: creating element "vertigotv"
0:00:00.017275409 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseTransform@0xe2a180> adding pad 'sink'
0:00:00.017320686 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseTransform@0xe2a180> adding pad 'src'
0:00:00.017507420 28239 0xd13e00 INFO GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstautodetect.so" loaded
0:00:00.017534322 28239 0xd13e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:376:gst_element_factory_create: creating element "autovideosink"
0:00:00.017679118 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstAutoVideoSink@0xe2d040> adding pad 'sink'
0:00:00.018056697 28239 0xd13e00 INFO GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstcoreelements.so" loaded
0:00:00.018088912 28239 0xd13e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:374:gst_element_factory_create: creating element "fakesink" named "tempsink"
0:00:00.018241424 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseSink@0xe061e0> adding pad 'sink'
0:00:00.018298351 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad tempsink:sink
0:00:00.018321334 28239 0xd13e00 INFO GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link sink:proxypad0 and tempsink:sink
0:00:00.018340322 28239 0xd13e00 INFO GST_PADS gstpad.c:2161:gst_pad_link_full: linked sink:proxypad0 and tempsink:sink, successful
0:00:00.018381640 28239 0xd13e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:376:gst_element_factory_create: creating element "pipeline"
0:00:00.018470159 28239 0xd13e00 INFO GST_PIPELINE ./grammar.y:569:gst_parse_perform_link: linking videotestsrc0:(any) to vertigotv0:(any) (0/0) with caps "(NULL)"
0:00:00.018497440 28239 0xd13e00 INFO GST_ELEMENT_PADS gstutils.c:1698:gst_element_link_pads_full: trying to link element videotestsrc0:(any) to element vertigotv0:(any)
0:00:00.018518953 28239 0xd13e00 INFO GST_PADS gstutils.c:1032:gst_pad_check_link: trying to link videotestsrc0:src and vertigotv0:sink
0:00:00.018797589 28239 0xd13e00 INFO GST_PADS gstutils.c:1596:prepare_link_maybe_ghosting: videotestsrc0 and vertigotv0 in same bin, no need for ghost pads
0:00:00.018860383 28239 0xd13e00 INFO GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link videotestsrc0:src and vertigotv0:sink
0:00:00.019111071 28239 0xd13e00 INFO GST_PADS gstpad.c:2161:gst_pad_link_full: linked videotestsrc0:src and vertigotv0:sink, successful
0:00:00.019158154 28239 0xd13e00 INFO GST_PIPELINE ./grammar.y:569:gst_parse_perform_link: linking vertigotv0:(any) to autovideosink0:(any) (0/0) with caps "(NULL)"
0:00:00.019179561 28239 0xd13e00 INFO GST_ELEMENT_PADS gstutils.c:1698:gst_element_link_pads_full: trying to link element vertigotv0:(any) to element autovideosink0:(any)
0:00:00.019201500 28239 0xd13e00 INFO GST_PADS gstutils.c:1032:gst_pad_check_link: trying to link vertigotv0:src and autovideosink0:sink
0:00:00.019477327 28239 0xd13e00 INFO GST_PADS gstutils.c:1596:prepare_link_maybe_ghosting: vertigotv0 and autovideosink0 in same bin, no need for ghost pads
0:00:00.019510644 28239 0xd13e00 INFO GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link vertigotv0:src and autovideosink0:sink
0:00:00.019734010 28239 0xd13e00 INFO GST_PADS gstpad.c:2161:gst_pad_link_full: linked vertigotv0:src and autovideosink0:sink, successful
Setting pipeline to PAUSED ...
0:00:00.019859833 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<tempsink> completed state change to NULL
0:00:00.019886786 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking sink:proxypad0(0xe300c0) and tempsink:sink(0xe28550)
0:00:00.019911274 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked sink:proxypad0 and tempsink:sink
0:00:00.019930233 28239 0xd13e00 INFO GST_PARENTAGE gstbin.c:1465:gst_bin_remove_func:<autovideosink0> removed child "tempsink"
0:00:00.019955357 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3064:gst_element_dispose:<tempsink> dispose
0:00:00.019972245 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:847:gst_element_remove_pad:<tempsink> removing pad 'sink'
0:00:00.020004575 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3088:gst_element_dispose:<tempsink> parent class dispose
0:00:00.020023265 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3119:gst_element_finalize:<tempsink> finalize
0:00:00.020039132 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3130:gst_element_finalize:<tempsink> finalize parent
0:00:00.021132401 28239 0xd13e00 INFO GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstxvimagesink.so" loaded
## Chooses to delegate to xvimagesink:
0:00:00.021161529 28239 0xd13e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:374:gst_element_factory_create: creating element "xvimagesink" named "autovideosink0-actual-sink-xvimage"
0:00:00.021335525 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseSink@0xe441f0> adding pad 'sink'
0:00:00.021369506 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad autovideosink0-actual-sink-xvimage:sink
0:00:00.022368391 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<autovideosink0-actual-sink-xvimage> completed state change to READY
0:00:00.022397669 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<autovideosink0-actual-sink-xvimage> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.022454798 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad autovideosink0-actual-sink-xvimage:sink
0:00:00.022476447 28239 0xd13e00 INFO GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link sink:proxypad0 and autovideosink0-actual-sink-xvimage:sink
0:00:00.022495466 28239 0xd13e00 INFO GST_PADS gstpad.c:2161:gst_pad_link_full: linked sink:proxypad0 and autovideosink0-actual-sink-xvimage:sink, successful
0:00:00.022518658 28239 0xd13e00 INFO GST_STATES gstbin.c:2237:gst_bin_element_set_state:<autovideosink0-actual-sink-xvimage> skipping transition from READY to READY, since bin pending is READY : last change state return follows
0:00:00.022538036 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<autovideosink0> child 'autovideosink0-actual-sink-xvimage' changed state to 2(READY) successfully
0:00:00.022560002 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<autovideosink0> completed state change to READY
0:00:00.022576724 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<autovideosink0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.022601845 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<pipeline0> child 'autovideosink0' changed state to 2(READY) successfully
0:00:00.022625672 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<vertigotv0> completed state change to READY
0:00:00.022643603 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<vertigotv0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.022667598 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<pipeline0> child 'vertigotv0' changed state to 2(READY) successfully
0:00:00.022688986 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<videotestsrc0> completed state change to READY
0:00:00.022706878 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<videotestsrc0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.022731032 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<pipeline0> child 'videotestsrc0' changed state to 2(READY) successfully
0:00:00.022752163 28239 0xd13e00 INFO GST_STATES gstelement.c:2435:gst_element_continue_state:<pipeline0> committing state from NULL to READY, pending PAUSED, next PAUSED
0:00:00.022770552 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed NULL to READY (PAUSED pending)
0:00:00.022813421 28239 0xd13e00 INFO GST_STATES gstelement.c:2442:gst_element_continue_state:<pipeline0> continue state change READY to PAUSED, final PAUSED
0:00:00.022863100 28239 0xd13e00 INFO GST_STATES gstbin.c:2532:gst_bin_change_state_func:<autovideosink0> child 'autovideosink0-actual-sink-xvimage' is changing state asynchronously to PAUSED
0:00:00.022889332 28239 0xd13e00 INFO GST_STATES gstbin.c:2532:gst_bin_change_state_func:<pipeline0> child 'autovideosink0' is changing state asynchronously to PAUSED
0:00:00.022974839 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<vertigotv0> completed state change to PAUSED
0:00:00.022994891 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<vertigotv0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.023018785 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<pipeline0> child 'vertigotv0' changed state to 3(PAUSED) successfully
## Fails:
0:00:00.023202339 28239 0xd13e00 WARN basesrc gstbasesrc.c:2830:gst_base_src_start:<videotestsrc0> error: Could not negotiate format
0:00:00.023224821 28239 0xd13e00 WARN basesrc gstbasesrc.c:2830:gst_base_src_start:<videotestsrc0> error: Check your filtered caps, if any
0:00:00.023251496 28239 0xd13e00 INFO GST_ERROR_SYSTEM gstelement.c:1964:gst_element_message_full:<videotestsrc0> posting message: Could not negotiate format
0:00:00.023277123 28239 0xd13e00 INFO GST_ERROR_SYSTEM gstelement.c:1987:gst_element_message_full:<videotestsrc0> posted error message: Could not negotiate format
0:00:00.023295847 28239 0xd13e00 WARN basesrc gstbasesrc.c:3039:gst_base_src_activate_push:<videotestsrc0> Failed to start in push mode
0:00:00.023310149 28239 0xd13e00 INFO GST_PADS gstpad.c:986:gst_pad_activate_push:<videotestsrc0:src> failed to activate in push mode
0:00:00.023326434 28239 0xd13e00 WARN GST_PADS gstpad.c:737:gst_pad_set_active:<videotestsrc0:src> Failed to activate pad
0:00:00.023342647 28239 0xd13e00 INFO GST_STATES gstelement.c:2768:gst_element_change_state:<videotestsrc0> have FAILURE change_state return
0:00:00.023358781 28239 0xd13e00 INFO GST_STATES gstelement.c:2335:gst_element_abort_state:<videotestsrc0> aborting state from READY to PAUSED
0:00:00.023375516 28239 0xd13e00 INFO GST_STATES gstbin.c:2542:gst_bin_change_state_func:<pipeline0> child 'videotestsrc0' failed to go to state 3(PAUSED)
0:00:00.023394254 28239 0xd13e00 INFO GST_STATES gstelement.c:2768:gst_element_change_state:<pipeline0> have FAILURE change_state return
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Could not negotiate format
Additional debug info:
gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
Check your filtered caps, if any
Setting pipeline to NULL ...
0:00:00.023653104 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<autovideosink0-actual-sink-xvimage> completed state change to READY
0:00:00.023673116 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<autovideosink0-actual-sink-xvimage> notifying about state-changed READY to READY (VOID_PENDING pending)
0:00:00.023695623 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<autovideosink0> child 'autovideosink0-actual-sink-xvimage' changed state to 2(READY) successfully
0:00:00.023721858 28239 0xd13e00 INFO GST_STATES gstelement.c:2435:gst_element_continue_state:<autovideosink0> committing state from READY to READY, pending NULL, next NULL
0:00:00.023739313 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<autovideosink0> notifying about state-changed READY to READY (NULL pending)
0:00:00.023761136 28239 0xd13e00 INFO GST_STATES gstelement.c:2442:gst_element_continue_state:<autovideosink0> continue state change READY to NULL, final NULL
0:00:00.072758482 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<autovideosink0-actual-sink-xvimage> completed state change to NULL
0:00:00.073073115 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<autovideosink0-actual-sink-xvimage> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:00.073145803 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<autovideosink0> child 'autovideosink0-actual-sink-xvimage' changed state to 1(NULL) successfully
0:00:00.073215511 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<autovideosink0-actual-sink-xvimage> completed state change to NULL
0:00:00.073237889 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking sink:proxypad0(0xe300c0) and autovideosink0-actual-sink-xvimage:sink(0xe28550)
0:00:00.073260645 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked sink:proxypad0 and autovideosink0-actual-sink-xvimage:sink
0:00:00.073278021 28239 0xd13e00 INFO GST_PARENTAGE gstbin.c:1465:gst_bin_remove_func:<autovideosink0> removed child "autovideosink0-actual-sink-xvimage"
0:00:00.073305704 28239 0xd13e00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:374:gst_element_factory_create: creating element "fakesink" named "tempsink"
0:00:00.073363921 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseSink@0xe38270> adding pad 'sink'
0:00:00.073434397 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad tempsink:sink
0:00:00.073475704 28239 0xd13e00 INFO GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link sink:proxypad0 and tempsink:sink
0:00:00.073515052 28239 0xd13e00 INFO GST_PADS gstpad.c:2161:gst_pad_link_full: linked sink:proxypad0 and tempsink:sink, successful
0:00:00.073554466 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<autovideosink0> completed state change to NULL
0:00:00.073591737 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<autovideosink0> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:00.073632464 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<pipeline0> child 'autovideosink0' changed state to 1(NULL) successfully
0:00:00.073673611 28239 0xd13e00 INFO GST_STATES gstelement.c:2435:gst_element_continue_state:<vertigotv0> committing state from PAUSED to READY, pending NULL, next NULL
0:00:00.073692871 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<vertigotv0> notifying about state-changed PAUSED to READY (NULL pending)
0:00:00.073716132 28239 0xd13e00 INFO GST_STATES gstelement.c:2442:gst_element_continue_state:<vertigotv0> continue state change READY to NULL, final NULL
0:00:00.073738757 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<vertigotv0> completed state change to NULL
0:00:00.073755238 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<vertigotv0> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:00.073777985 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<pipeline0> child 'vertigotv0' changed state to 1(NULL) successfully
0:00:00.073802545 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<videotestsrc0> completed state change to NULL
0:00:00.073835907 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<videotestsrc0> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:00.073880582 28239 0xd13e00 INFO GST_STATES gstbin.c:2526:gst_bin_change_state_func:<pipeline0> child 'videotestsrc0' changed state to 1(NULL) successfully
0:00:00.073937459 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3064:gst_element_dispose:<autovideosink0-actual-sink-xvimage> dispose
0:00:00.073974764 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:847:gst_element_remove_pad:<autovideosink0-actual-sink-xvimage> removing pad 'sink'
0:00:00.074018963 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3088:gst_element_dispose:<autovideosink0-actual-sink-xvimage> parent class dispose
0:00:00.074062160 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3119:gst_element_finalize:<autovideosink0-actual-sink-xvimage> finalize
0:00:00.074100359 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3130:gst_element_finalize:<autovideosink0-actual-sink-xvimage> finalize parent
0:00:00.074148635 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<pipeline0> completed state change to NULL
0:00:00.074183287 28239 0xd13e00 INFO GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:00.074233570 28239 0xd13e00 INFO GST_STATES gstbin.c:1784:gst_bin_get_state_func:<pipeline0> getting state
Freeing pipeline ...
0:00:00.074307349 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking vertigotv0:src(0xe283d0) and autovideosink0:sink(0xe2f030)
0:00:00.074358755 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked vertigotv0:src and autovideosink0:sink
0:00:00.074414611 28239 0xd13e00 INFO GST_PARENTAGE gstbin.c:1465:gst_bin_remove_func:<pipeline0> removed child "autovideosink0"
0:00:00.074468451 28239 0xd13e00 INFO GST_STATES gstelement.c:2460:gst_element_continue_state:<tempsink> completed state change to NULL
0:00:00.074505388 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking sink:proxypad0(0xe300c0) and tempsink:sink(0xe286d0)
0:00:00.074552141 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked sink:proxypad0 and tempsink:sink
0:00:00.074593560 28239 0xd13e00 INFO GST_PARENTAGE gstbin.c:1465:gst_bin_remove_func:<autovideosink0> removed child "tempsink"
0:00:00.074638443 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3064:gst_element_dispose:<tempsink> dispose
0:00:00.074672764 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:847:gst_element_remove_pad:<tempsink> removing pad 'sink'
0:00:00.074709249 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3088:gst_element_dispose:<tempsink> parent class dispose
0:00:00.074725665 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3119:gst_element_finalize:<tempsink> finalize
0:00:00.074739197 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3130:gst_element_finalize:<tempsink> finalize parent
0:00:00.074756577 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3064:gst_element_dispose:<autovideosink0> dispose
0:00:00.074770399 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:847:gst_element_remove_pad:<autovideosink0> removing pad 'sink'
0:00:00.074813009 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3088:gst_element_dispose:<autovideosink0> parent class dispose
0:00:00.074841876 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3119:gst_element_finalize:<autovideosink0> finalize
0:00:00.074867385 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3130:gst_element_finalize:<autovideosink0> finalize parent
0:00:00.074897325 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking videotestsrc0:src(0xe280d0) and vertigotv0:sink(0xe28250)
0:00:00.074936511 28239 0xd13e00 INFO GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked videotestsrc0:src and vertigotv0:sink
0:00:00.075009187 28239 0xd13e00 INFO GST_PARENTAGE gstbin.c:1465:gst_bin_remove_func:<pipeline0> removed child "vertigotv0"
0:00:00.075044459 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3064:gst_element_dispose:<vertigotv0> dispose
0:00:00.075069941 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:847:gst_element_remove_pad:<vertigotv0> removing pad 'src'
0:00:00.075102707 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:847:gst_element_remove_pad:<vertigotv0> removing pad 'sink'
0:00:00.075135763 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3088:gst_element_dispose:<vertigotv0> parent class dispose
0:00:00.075165136 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3119:gst_element_finalize:<vertigotv0> finalize
0:00:00.075190351 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3130:gst_element_finalize:<vertigotv0> finalize parent
0:00:00.075222928 28239 0xd13e00 INFO GST_PARENTAGE gstbin.c:1465:gst_bin_remove_func:<pipeline0> removed child "videotestsrc0"
0:00:00.075260964 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3064:gst_element_dispose:<videotestsrc0> dispose
0:00:00.075287035 28239 0xd13e00 INFO GST_ELEMENT_PADS gstelement.c:847:gst_element_remove_pad:<videotestsrc0> removing pad 'src'
0:00:00.075322435 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3088:gst_element_dispose:<videotestsrc0> parent class dispose
0:00:00.075340952 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3119:gst_element_finalize:<videotestsrc0> finalize
0:00:00.075357771 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3130:gst_element_finalize:<videotestsrc0> finalize parent
0:00:00.075374378 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3064:gst_element_dispose:<pipeline0> dispose
0:00:00.075409376 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3088:gst_element_dispose:<pipeline0> parent class dispose
0:00:00.075441618 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3119:gst_element_finalize:<pipeline0> finalize
0:00:00.075470418 28239 0xd13e00 INFO GST_REFCOUNTING gstelement.c:3130:gst_element_finalize:<pipeline0> finalize parent
0:00:00.075501764 28239 0xd13e00 INFO GST_INIT gst.c:1023:gst_deinit: deinitializing GStreamer
0:00:00.078065651 28239 0xd13e00 INFO GST_INIT gst.c:1129:gst_deinit: deinitialized GStreamer
【讨论】:
好的,这很有趣,但我认为这只是答案的一部分,因为当我插入 xvimagesink 时,我仍然需要在播放管道之前添加该 videoconvert 元素,而功能似乎同意。 是的,关键是vertigotv
-> xvimagesink
连接需要转换(因为原始 RGB 实际上与 RGBx 不同),无论您是否使用xvimagesink
直接或通过autovideosink
。我已经更新了我的答案,以(希望)更清楚地说明这一点。以上是关于Gstreamer:为啥在显示一些过滤器之前我需要一个视频转换?的主要内容,如果未能解决你的问题,请参考以下文章