gst-editing-services: add input channels reorder

- whitelist corresponding properties from audioconvert
- add input channels reorder validation test in gst-integration-testsuites/ges/scenarios

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5923>
This commit is contained in:
Loïc Le Page 2024-02-08 20:36:19 +01:00
parent 8fb96253be
commit 9fd0f44492
5 changed files with 113 additions and 2 deletions

View file

@ -128,7 +128,10 @@ ges_audio_source_create_element (GESTrackElement * trksrc)
GPtrArray *elements;
GESSourceClass *source_class = GES_SOURCE_GET_CLASS (trksrc);
const gchar *volume_props[] = { "volume", "mute", NULL };
const gchar *audioconvert_props[] = { "mix-matrix", NULL };
const gchar *audioconvert_props[] = {
"mix-matrix", "input-channels-reorder",
"input-channels-reorder-mode", NULL
};
GESAudioSource *self = GES_AUDIO_SOURCE (trksrc);
g_assert (source_class->create_source);

View file

@ -0,0 +1,58 @@
set-globals, media_file="$(test_dir)/../../medias/defaults/ogg/audio_5.1_separated_frequencies.ogg"
meta,
tool = "ges-launch-$(gst_api_version)",
handles-states=true,
seek=true,
needs_preroll=true,
args = {
--track-types, audio,
--audio-caps, "audio/x-raw, channels=2",
--audiosink, "$(audiosink) name=audiosink",
},
configs = {
"$(validateflow), pad=audiosink:sink, buffers-checksum=true, ignored-fields=\"stream-start={stream-id,group-id,stream}\"",
}
# Add a 5.1 audio clip with forced default order (gst)
add-clip, name=clip, asset-id="file://$(media_file)", layer-priority=0, type=GESUriClip
set-child-properties, element-name=clip, input-channels-reorder-mode=force
checkpoint, text="Checking default GST order."
pause
# Change order to smpte
checkpoint, text="Checking SMPTE order."
set-state, state=null
set-child-properties, element-name=clip, input-channels-reorder=smpte
pause
# Change order to cine
checkpoint, text="Checking CINE order."
set-state, state=null
set-child-properties, element-name=clip, input-channels-reorder=cine
pause
# Change order to ac3
checkpoint, text="Checking AC3 order."
set-state, state=null
set-child-properties, element-name=clip, input-channels-reorder=ac3
pause
# Change order to aac
checkpoint, text="Checking AAC order."
set-state, state=null
set-child-properties, element-name=clip, input-channels-reorder=aac
pause
# Change order to mono
checkpoint, text="Checking MONO order."
set-state, state=null
set-child-properties, element-name=clip, input-channels-reorder=mono
pause
# Change order to alternate
checkpoint, text="Checking ALTERNATE order."
set-state, state=null
set-child-properties, element-name=clip, input-channels-reorder=alternate
pause
stop

View file

@ -0,0 +1,49 @@
CHECKPOINT: Checking default GST order.
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE;
event caps: audio/x-raw, channel-mask=(bitmask)0x0000000000000003, channels=(int)2, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:30.000000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: checksum=a8466458c3dc435159d9df2f7ca37345017013fb, pts=0:00:00.000000000, dur=0:00:00.010000000
CHECKPOINT: Checking SMPTE order.
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE;
event caps: audio/x-raw, channel-mask=(bitmask)0x0000000000000003, channels=(int)2, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:30.000000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: checksum=a8466458c3dc435159d9df2f7ca37345017013fb, pts=0:00:00.000000000, dur=0:00:00.010000000
CHECKPOINT: Checking CINE order.
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE;
event caps: audio/x-raw, channel-mask=(bitmask)0x0000000000000003, channels=(int)2, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:30.000000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: checksum=203fce4efef89b9526b608b0d4f5f5c0097be3a3, pts=0:00:00.000000000, dur=0:00:00.010000000
CHECKPOINT: Checking AC3 order.
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE;
event caps: audio/x-raw, channel-mask=(bitmask)0x0000000000000003, channels=(int)2, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:30.000000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: checksum=18ea51cc5086625305ea18e4d0abbabc66616136, pts=0:00:00.000000000, dur=0:00:00.010000000
CHECKPOINT: Checking AAC order.
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE;
event caps: audio/x-raw, channel-mask=(bitmask)0x0000000000000003, channels=(int)2, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:30.000000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: checksum=70620194e45b76eb1469b7221f8dec05a5505c93, pts=0:00:00.000000000, dur=0:00:00.010000000
CHECKPOINT: Checking MONO order.
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE;
event caps: audio/x-raw, channel-mask=(bitmask)0x0000000000000003, channels=(int)2, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:30.000000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: checksum=3cffd73a8ddcafa0d0cd17151af4d2bd6c26f620, pts=0:00:00.000000000, dur=0:00:00.010000000
CHECKPOINT: Checking ALTERNATE order.
event stream-start: GstEventStreamStart, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE;
event caps: audio/x-raw, channel-mask=(bitmask)0x0000000000000003, channels=(int)2, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000;
event segment: format=TIME, start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:30.000000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position=0:00:00.000000000
buffer: checksum=e1472a1300859dea1e3ecf4ac6a16298d6fb4e63, pts=0:00:00.000000000, dur=0:00:00.010000000

@ -1 +1 @@
Subproject commit cba2a17a35049f76b5a1501da877b550dd795bef
Subproject commit fa0b7ec4a3e48371ff25d608ff5278e6fac1060c

View file

@ -764,3 +764,4 @@ ges.test.videoscale_effect
ges.test.backward_playback_with_start
ges.test.check_reverse_source
ges.test.timelineelement.set_child_prop_on_all_instances
ges.test.input_audio_channels_reorder