Appsink discovery and media-type classification from a pipeline string. More...
Detailed Description
Appsink discovery and media-type classification from a pipeline string.
A live source has no negotiated caps when the pipeline is built, so the only thing that can say whether an appsink carries audio or video – and at what geometry – is the pipeline description itself. Kept out of GStreamerDevice.cpp so it can be exercised without a GStreamer library: this is ctre over a string plus Video::gstreamerToLibav().
Go to the source code of this file.
Classes | |
| struct | Gfx::GStreamer::AppsinkInfo |
Namespaces | |
| namespace | Gfx |
| Binds the rendering pipeline to ossia processes. | |
Functions | |
| std::vector< std::string > | Gfx::GStreamer::find_appsink_names (const std::string &pipeline) |
| std::vector< std::string > | Gfx::GStreamer::find_all_named_elements (const std::string &pipeline) |
| template<ctll::fixed_string Rexp> | |
| int | Gfx::GStreamer::last_int_of (std::string_view str, int fallback) |
| void | Gfx::GStreamer::classify_from_pipeline_string (const std::string &pipeline, const std::string &sink_name, AppsinkInfo &info) |
| std::string | Gfx::GStreamer::resample_audio_sinks (const std::string &pipeline, const std::vector< std::string > &audio_sinks, int rate) |
| The pipeline with the given audio appsinks fed through a resampler. | |
Function Documentation
◆ resample_audio_sinks()
|
inline |
The pipeline with the given audio appsinks fed through a resampler.
The engine reads an appsink's samples at its own rate, whatever rate the pipeline produces them at: a 48 kHz pipeline into a 44.1 kHz engine plays 8% flat. Each listed sink gets audioconvert ! audioresample and caps for F32LE at rate in front of it, so the samples arrive at the engine's rate in the format it reads.
Only a sink linked with ! is handled; one linked by name elsewhere in the description would be left with an unlinked converter in front of it.