Edit online

测试指南

31 Jan 2024
Read time: 1 minute(s)
Gstreamer 自带两个测试用例:
  • gst-inspect-1.0:用于查询 Gstreamer 支持的插件。
    [aic@] # gst-inspect-1.0
    autodetect:  autoaudiosrc: Auto audio source
    autodetect:  autoaudiosink: Auto audio sink
    autodetect:  autovideosrc: Auto video source
    autodetect:  autovideosink: Auto video sink
    ipcpipeline:  ipcslavepipeline: Inter-process slave pipeline
    ipcpipeline:  ipcpipelinesink: Inter-process Pipeline Sink
    ipcpipeline:  ipcpipelinesrc: Inter-process Pipeline Source
    typefindfunctions: audio/x-tap-dmp: dmp
    typefindfunctions: audio/x-tap-tap: tap
    ...
    Total count: 25 plugins, 237 features
  • gst-launch-1.0:播放音视频文件。
    • 使用 playbin 播放视频文件
      gst-launch-1.0 playbin uri=file:///sdcard/test.mp4
    • 只播放视频,不播放音频
      gst-launch-1.0 filesrc location=/sdcard/test.mp4 typefind=true ! video/quicktime ! qtdemux ! vedec ! fbsink
    • 增加 debug 信息,–gst-debug-level 参数:1 表示只打印 ERROR 级别,9 表示所有类型打印
      gst-launch-1.0 playbin uri=file:///sdcard/test.mp4 --gst-debug-level=1