mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
audiovisualizers: fix input buffer handling
Use _replace instead of _append to fix growing buffers.
This commit is contained in:
parent
2f15ebca96
commit
65fa897f93
2 changed files with 9 additions and 2 deletions
|
@ -75,6 +75,7 @@ GST_DEBUG="*:2,*scope*:4"
|
|||
|
||||
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-inspect scopes
|
||||
|
||||
== 0.10 ==
|
||||
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch audiotestsrc ! audioconvert ! wavescope ! colorspace ! ximagesink
|
||||
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! audioconvert ! wavescope ! colorspace ! ximagesink
|
||||
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! audioconvert ! wavescope style=lines shade-amount=0x00080402 ! edgetv ! vertigotv ! ximagesink
|
||||
|
@ -87,5 +88,11 @@ GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.
|
|||
|
||||
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! tee name=t ! queue ! audioconvert ! synaesthesia ! ximagesink t. ! queue ! synaescope shade-amount=0x00040404 ! colorspace ! ximagesink
|
||||
|
||||
gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! tee name=t ! queue ! audioconvert ! wavescope style=color-lines shade-amount=0x00080402 ! alpha alpha=0.5 ! videomixer2 name=m background=black ! colorspace ! vertigotv ! ximagesink t. ! queue ! audioconvert ! spacescope style=color-lines shade-amount=0x00080402 ! alpha alpha=0.5 ! m. t. ! queue ! pulsesink
|
||||
== 0.11/1.0 ==
|
||||
gst-launch-1.0 audiotestsrc ! audioconvert ! wavescope ! videoconvert ! ximagesink
|
||||
|
||||
gst-launch-1.0 filesrc location=$HOME/Music/1.mp3 ! decodebin ! audioconvert ! spectrascope ! videoconvert ! ximagesink
|
||||
|
||||
gst-launch-1.0 filesrc location=$HOME/Music/1.mp3 ! decodebin ! tee name=t ! queue ! audioconvert ! wavescope style=color-lines shade-amount=0x00080402 ! alpha alpha=0.5 ! videomixer name=m background=black ! videoconvert ! vertigotv ! ximagesink t. ! queue ! audioconvert ! spacescope style=color-lines shade-amount=0x00080402 ! alpha alpha=0.5 ! m. t. ! queue ! autoaudiosink
|
||||
|
||||
|
||||
|
|
|
@ -881,7 +881,7 @@ gst_base_audio_visualizer_chain (GstPad * pad, GstObject * parent,
|
|||
if (!(adata = (gpointer) gst_adapter_map (scope->adapter, sbpf)))
|
||||
break;
|
||||
|
||||
gst_buffer_append_memory (inbuf,
|
||||
gst_buffer_replace_all_memory (inbuf,
|
||||
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, adata, sbpf, 0,
|
||||
sbpf, NULL, NULL));
|
||||
|
||||
|
|
Loading…
Reference in a new issue