transcriberbin: register pad templates for unsynced source pads

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1963>
This commit is contained in:
Mathieu Duponchelle 2024-12-02 17:16:11 +01:00 committed by GStreamer Marge Bot
parent 4e722d6dcc
commit 39a8db51de
2 changed files with 54 additions and 0 deletions

View file

@ -7962,6 +7962,26 @@
"caps": "video/x-raw(ANY):\n", "caps": "video/x-raw(ANY):\n",
"direction": "src", "direction": "src",
"presence": "always" "presence": "always"
},
"unsynced_src": {
"caps": "application/x-json:\n",
"direction": "src",
"presence": "sometimes"
},
"unsynced_src_%%u": {
"caps": "application/x-json:\n",
"direction": "src",
"presence": "sometimes"
},
"unsynced_translate_src_%%u": {
"caps": "application/x-json:\n",
"direction": "src",
"presence": "sometimes"
},
"unsynced_translate_src_%%u_%%u": {
"caps": "application/x-json:\n",
"direction": "src",
"presence": "sometimes"
} }
}, },
"properties": { "properties": {

View file

@ -1904,6 +1904,36 @@ impl ElementImpl for TranscriberBin {
) )
.unwrap(); .unwrap();
let src_caps = gst::Caps::builder("application/x-json").build();
let unsynced_src_pad_template = gst::PadTemplate::new(
"unsynced_src",
gst::PadDirection::Src,
gst::PadPresence::Sometimes,
&src_caps,
)
.unwrap();
let unsynced_translate_src_pad_template = gst::PadTemplate::new(
"unsynced_translate_src_%u",
gst::PadDirection::Src,
gst::PadPresence::Sometimes,
&src_caps,
)
.unwrap();
let unsynced_secondary_src_pad_template = gst::PadTemplate::new(
"unsynced_src_%u",
gst::PadDirection::Src,
gst::PadPresence::Sometimes,
&src_caps,
)
.unwrap();
let unsynced_secondary_translate_src_pad_template = gst::PadTemplate::new(
"unsynced_translate_src_%u_%u",
gst::PadDirection::Src,
gst::PadPresence::Sometimes,
&src_caps,
)
.unwrap();
vec![ vec![
video_src_pad_template, video_src_pad_template,
video_sink_pad_template, video_sink_pad_template,
@ -1911,6 +1941,10 @@ impl ElementImpl for TranscriberBin {
audio_sink_pad_template, audio_sink_pad_template,
secondary_audio_sink_pad_template, secondary_audio_sink_pad_template,
secondary_audio_src_pad_template, secondary_audio_src_pad_template,
unsynced_src_pad_template,
unsynced_translate_src_pad_template,
unsynced_secondary_src_pad_template,
unsynced_secondary_translate_src_pad_template,
] ]
}); });