Function gstreamer_base::functions::type_find_helper_for_data

source ·
pub fn type_find_helper_for_data(
    obj: Option<&impl IsA<Object>>,
    data: impl AsRef<[u8]>,
) -> Result<(Caps, TypeFindProbability), BoolError>
Expand description

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of gst::TypeFindProbability::Maximum, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or None if the content of data could not be identified.

Free-function: gst_caps_unref


object doing the typefinding, or None (used for logging)


  • a pointer with data to typefind


the gst::Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref().


location to store the probability of the found caps, or None