import typing

from gi.repository import GLib
from gi.repository import GObject
from gi.repository import Gst
from gi.repository import GstAudio
from gi.repository import GstVideo
from typing_extensions import Self

T = typing.TypeVar("T")

ENCODING_CATEGORY_CAPTURE: str = "capture"
ENCODING_CATEGORY_DEVICE: str = "device"
ENCODING_CATEGORY_FILE_EXTENSION: str = "file-extension"
ENCODING_CATEGORY_ONLINE_SERVICE: str = "online-service"
ENCODING_CATEGORY_STORAGE_EDITING: str = "storage-editing"
PLUGINS_BASE_VERSION_MAJOR: int = 1
PLUGINS_BASE_VERSION_MICRO: int = 11
PLUGINS_BASE_VERSION_MINOR: int = 26
PLUGINS_BASE_VERSION_NANO: int = 1

def codec_utils_aac_caps_set_level_and_profile(
    caps: Gst.Caps, audio_config: typing.Sequence[int]
) -> bool: ...
def codec_utils_aac_get_channels(audio_config: typing.Sequence[int]) -> int: ...
def codec_utils_aac_get_index_from_sample_rate(rate: int) -> int: ...
def codec_utils_aac_get_level(
    audio_config: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_aac_get_profile(
    audio_config: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_aac_get_sample_rate(audio_config: typing.Sequence[int]) -> int: ...
def codec_utils_aac_get_sample_rate_from_index(sr_idx: int) -> int: ...
def codec_utils_av1_create_av1c_from_caps(
    caps: Gst.Caps,
) -> typing.Optional[Gst.Buffer]: ...
def codec_utils_av1_create_caps_from_av1c(
    av1c: Gst.Buffer,
) -> typing.Optional[Gst.Caps]: ...
def codec_utils_av1_get_level(seq_level_idx: int) -> typing.Optional[str]: ...
def codec_utils_av1_get_seq_level_idx(level: str) -> int: ...
def codec_utils_caps_from_mime_codec(
    codecs_field: str,
) -> typing.Optional[Gst.Caps]: ...
def codec_utils_caps_get_mime_codec(caps: Gst.Caps) -> typing.Optional[str]: ...
def codec_utils_h264_caps_set_level_and_profile(
    caps: Gst.Caps, sps: typing.Sequence[int]
) -> bool: ...
def codec_utils_h264_get_level(sps: typing.Sequence[int]) -> typing.Optional[str]: ...
def codec_utils_h264_get_level_idc(level: str) -> int: ...
def codec_utils_h264_get_profile(sps: typing.Sequence[int]) -> typing.Optional[str]: ...
def codec_utils_h264_get_profile_flags_level(
    codec_data: typing.Sequence[int],
) -> typing.Tuple[bool, int, int, int]: ...
def codec_utils_h265_caps_set_level_tier_and_profile(
    caps: Gst.Caps, profile_tier_level: typing.Sequence[int]
) -> bool: ...
def codec_utils_h265_get_level(
    profile_tier_level: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_h265_get_level_idc(level: str) -> int: ...
def codec_utils_h265_get_profile(
    profile_tier_level: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_h265_get_tier(
    profile_tier_level: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_h266_caps_set_level_tier_and_profile(
    caps: Gst.Caps, decoder_configuration: typing.Sequence[int]
) -> bool: ...
def codec_utils_h266_get_level(
    ptl_record: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_h266_get_level_idc(level: str) -> int: ...
def codec_utils_h266_get_profile(
    ptl_record: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_h266_get_tier(
    ptl_record: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_mpeg4video_caps_set_level_and_profile(
    caps: Gst.Caps, vis_obj_seq: typing.Sequence[int]
) -> bool: ...
def codec_utils_mpeg4video_get_level(
    vis_obj_seq: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_mpeg4video_get_profile(
    vis_obj_seq: typing.Sequence[int],
) -> typing.Optional[str]: ...
def codec_utils_opus_create_caps(
    rate: int,
    channels: int,
    channel_mapping_family: int,
    stream_count: int,
    coupled_count: int,
    channel_mapping: typing.Optional[typing.Sequence[int]] = None,
) -> typing.Optional[Gst.Caps]: ...
def codec_utils_opus_create_caps_from_header(
    header: Gst.Buffer, comments: typing.Optional[Gst.Buffer] = None
) -> typing.Optional[Gst.Caps]: ...
def codec_utils_opus_create_header(
    rate: int,
    channels: int,
    channel_mapping_family: int,
    stream_count: int,
    coupled_count: int,
    channel_mapping: typing.Optional[typing.Sequence[int]],
    pre_skip: int,
    output_gain: int,
) -> typing.Optional[Gst.Buffer]: ...
def codec_utils_opus_parse_caps(
    caps: Gst.Caps,
) -> typing.Tuple[bool, int, int, int, int, int, bytes]: ...
def codec_utils_opus_parse_header(
    header: Gst.Buffer,
) -> typing.Tuple[bool, int, int, int, int, int, bytes, int, int]: ...
def encoding_list_all_targets(
    categoryname: typing.Optional[str] = None,
) -> list[EncodingTarget]: ...
def encoding_list_available_categories() -> list[str]: ...
def init(): ...  # FIXME: Override is missing typing annotation
def install_plugins_async(
    details: typing.Sequence[str],
    ctx: typing.Optional[InstallPluginsContext],
    func: typing.Callable[..., None],
    *user_data: typing.Any,
) -> InstallPluginsReturn: ...
def install_plugins_installation_in_progress() -> bool: ...
def install_plugins_return_get_name(ret: InstallPluginsReturn) -> str: ...
def install_plugins_supported() -> bool: ...
def install_plugins_sync(
    details: typing.Sequence[str], ctx: typing.Optional[InstallPluginsContext] = None
) -> InstallPluginsReturn: ...
def is_missing_plugin_message(msg: Gst.Message) -> bool: ...
def missing_decoder_installer_detail_new(decode_caps: Gst.Caps) -> str: ...
def missing_decoder_message_new(
    element: Gst.Element, decode_caps: Gst.Caps
) -> Gst.Message: ...
def missing_element_installer_detail_new(factory_name: str) -> str: ...
def missing_element_message_new(
    element: Gst.Element, factory_name: str
) -> Gst.Message: ...
def missing_encoder_installer_detail_new(encode_caps: Gst.Caps) -> str: ...
def missing_encoder_message_new(
    element: Gst.Element, encode_caps: Gst.Caps
) -> Gst.Message: ...
def missing_plugin_message_get_description(msg: Gst.Message) -> str: ...
def missing_plugin_message_get_installer_detail(
    msg: Gst.Message,
) -> typing.Optional[str]: ...
def missing_plugin_message_get_stream_id(msg: Gst.Message) -> typing.Optional[str]: ...
def missing_plugin_message_set_stream_id(msg: Gst.Message, stream_id: str) -> None: ...
def missing_uri_sink_installer_detail_new(protocol: str) -> str: ...
def missing_uri_sink_message_new(
    element: Gst.Element, protocol: str
) -> Gst.Message: ...
def missing_uri_source_installer_detail_new(protocol: str) -> str: ...
def missing_uri_source_message_new(
    element: Gst.Element, protocol: str
) -> Gst.Message: ...
def pb_utils_add_codec_description_to_tag_list(
    taglist: Gst.TagList, codec_tag: typing.Optional[str], caps: Gst.Caps
) -> bool: ...
def pb_utils_get_caps_description_flags(
    caps: Gst.Caps,
) -> PbUtilsCapsDescriptionFlags: ...
def pb_utils_get_codec_description(caps: Gst.Caps) -> typing.Optional[str]: ...
def pb_utils_get_decoder_description(caps: Gst.Caps) -> str: ...
def pb_utils_get_element_description(factory_name: str) -> str: ...
def pb_utils_get_encoder_description(caps: Gst.Caps) -> str: ...
def pb_utils_get_file_extension_from_caps(caps: Gst.Caps) -> typing.Optional[str]: ...
def pb_utils_get_sink_description(protocol: str) -> str: ...
def pb_utils_get_source_description(protocol: str) -> str: ...
def pb_utils_init(): ...  # FIXME: Override is missing typing annotation
def plugins_base_version() -> typing.Tuple[int, int, int, int]: ...
def plugins_base_version_string() -> str: ...

class AudioVisualizer(Gst.Element):
    """
    :Constructors:

    ::

        AudioVisualizer(**properties)

    Object GstAudioVisualizer

    Properties from GstAudioVisualizer:
      shader -> GstAudioVisualizerShader: shader type
        Shader function to apply on each frame
      shade-amount -> guint: shade amount
        Shading color to use (big-endian ARGB)

    Signals from GstElement:
      pad-added (GstPad)
      pad-removed (GstPad)
      no-more-pads ()

    Signals from GstObject:
      deep-notify (GstObject, GParam)

    Properties from GstObject:
      name -> gchararray: Name
        The name of the object
      parent -> GstObject: Parent
        The parent of the object

    Signals from GObject:
      notify (GParam)
    """
    class Props(Gst.Element.Props):
        shade_amount: int
        shader: AudioVisualizerShader
        name: typing.Optional[str]
        parent: typing.Optional[Gst.Object]

    props: Props = ...
    parent: Gst.Element = ...
    req_spf: int = ...
    vinfo: GstVideo.VideoInfo = ...
    ainfo: GstAudio.AudioInfo = ...
    priv: AudioVisualizerPrivate = ...
    def __init__(
        self,
        *,
        shade_amount: int = ...,
        shader: AudioVisualizerShader = ...,
        name: typing.Optional[str] = ...,
        parent: Gst.Object = ...,
    ) -> None: ...
    def do_decide_allocation(self, query: Gst.Query) -> bool: ...
    def do_render(self, audio: Gst.Buffer, video: GstVideo.VideoFrame) -> bool: ...
    def do_setup(self) -> bool: ...

class AudioVisualizerClass(GObject.GPointer):
    """
    :Constructors:

    ::

        AudioVisualizerClass()
    """

    parent_class: Gst.ElementClass = ...
    setup: typing.Callable[[AudioVisualizer], bool] = ...
    render: typing.Callable[
        [AudioVisualizer, Gst.Buffer, GstVideo.VideoFrame], bool
    ] = ...
    decide_allocation: typing.Callable[[AudioVisualizer, Gst.Query], bool] = ...

class AudioVisualizerPrivate(GObject.GPointer): ...

class Discoverer(GObject.Object):
    """
    :Constructors:

    ::

        Discoverer(**properties)
        new(timeout:int) -> GstPbutils.Discoverer

    Object GstDiscoverer

    Signals from GstDiscoverer:
      finished ()
      starting ()
      discovered (GstDiscovererInfo, GError)
      source-setup (GstElement)
      load-serialized-info (gchararray) -> GstDiscovererInfo

    Properties from GstDiscoverer:
      timeout -> guint64: timeout
        Timeout
      use-cache -> gboolean: use cache
        Use cache

    Signals from GObject:
      notify (GParam)
    """
    class Props(GObject.Object.Props):
        timeout: int
        use_cache: bool

    props: Props = ...
    parent: GObject.Object = ...
    priv: DiscovererPrivate = ...
    def __init__(self, *, timeout: int = ..., use_cache: bool = ...) -> None: ...
    def discover_uri(self, uri: str) -> DiscovererInfo: ...
    def discover_uri_async(self, uri: str) -> bool: ...
    def do_discovered(self, info: DiscovererInfo, err: GLib.Error) -> None: ...
    def do_finished(self) -> None: ...
    def do_load_serialize_info(self, uri: str) -> DiscovererInfo: ...
    def do_source_setup(self, source: Gst.Element) -> None: ...
    def do_starting(self) -> None: ...
    @classmethod
    def new(cls, timeout: int) -> Discoverer: ...
    def start(self) -> None: ...
    def stop(self) -> None: ...

class DiscovererAudioInfo(DiscovererStreamInfo):
    """
    :Constructors:

    ::

        DiscovererAudioInfo(**properties)

    Object GstDiscovererAudioInfo

    Signals from GObject:
      notify (GParam)
    """
    def get_bitrate(self) -> int: ...
    def get_channel_mask(self) -> int: ...
    def get_channels(self) -> int: ...
    def get_depth(self) -> int: ...
    def get_language(self) -> typing.Optional[str]: ...
    def get_max_bitrate(self) -> int: ...
    def get_sample_rate(self) -> int: ...

class DiscovererClass(GObject.GPointer):
    """
    :Constructors:

    ::

        DiscovererClass()
    """

    parentclass: GObject.ObjectClass = ...
    finished: typing.Callable[[Discoverer], None] = ...
    starting: typing.Callable[[Discoverer], None] = ...
    discovered: typing.Callable[[Discoverer, DiscovererInfo, GLib.Error], None] = ...
    source_setup: typing.Callable[[Discoverer, Gst.Element], None] = ...
    load_serialize_info: typing.Callable[[Discoverer, str], DiscovererInfo] = ...

class DiscovererContainerInfo(DiscovererStreamInfo):
    """
    :Constructors:

    ::

        DiscovererContainerInfo(**properties)

    Object GstDiscovererContainerInfo

    Signals from GObject:
      notify (GParam)
    """
    def get_streams(self) -> list[DiscovererStreamInfo]: ...
    def get_tags(self) -> typing.Optional[Gst.TagList]: ...

class DiscovererInfo(GObject.Object):
    """
    :Constructors:

    ::

        DiscovererInfo(**properties)

    Object GstDiscovererInfo

    Signals from GObject:
      notify (GParam)
    """
    def copy(self) -> DiscovererInfo: ...
    @staticmethod
    def from_variant(variant: GLib.Variant) -> DiscovererInfo: ...
    def get_audio_streams(self) -> list[DiscovererAudioInfo]: ...
    def get_container_streams(self) -> list[DiscovererContainerInfo]: ...
    def get_duration(self) -> int: ...
    def get_live(self) -> bool: ...
    def get_misc(self) -> typing.Optional[Gst.Structure]: ...
    def get_missing_elements_installer_details(self) -> list[str]: ...
    def get_result(self) -> DiscovererResult: ...
    def get_seekable(self) -> bool: ...
    def get_stream_info(self) -> typing.Optional[DiscovererStreamInfo]: ...
    def get_stream_list(self) -> list[DiscovererStreamInfo]: ...
    def get_streams(
        self, streamtype: typing.Type[typing.Any]
    ) -> list[DiscovererStreamInfo]: ...
    def get_subtitle_streams(self) -> list[DiscovererSubtitleInfo]: ...
    def get_tags(self) -> typing.Optional[Gst.TagList]: ...
    def get_toc(self) -> typing.Optional[Gst.Toc]: ...
    def get_uri(self) -> str: ...
    def get_video_streams(self) -> list[DiscovererVideoInfo]: ...
    def to_variant(self, flags: DiscovererSerializeFlags) -> GLib.Variant: ...

class DiscovererPrivate(GObject.GPointer): ...

class DiscovererStreamInfo(GObject.Object):
    """
    :Constructors:

    ::

        DiscovererStreamInfo(**properties)

    Object GstDiscovererStreamInfo

    Signals from GObject:
      notify (GParam)
    """
    def get_caps(self) -> typing.Optional[Gst.Caps]: ...
    def get_misc(self) -> typing.Optional[Gst.Structure]: ...
    def get_next(self) -> typing.Optional[DiscovererStreamInfo]: ...
    def get_previous(self) -> typing.Optional[DiscovererStreamInfo]: ...
    def get_stream_id(self) -> typing.Optional[str]: ...
    def get_stream_number(self) -> int: ...
    def get_stream_type_nick(self) -> str: ...
    def get_tags(self) -> typing.Optional[Gst.TagList]: ...
    def get_toc(self) -> typing.Optional[Gst.Toc]: ...
    @staticmethod
    def list_free(infos: list[DiscovererStreamInfo]) -> None: ...

class DiscovererSubtitleInfo(DiscovererStreamInfo):
    """
    :Constructors:

    ::

        DiscovererSubtitleInfo(**properties)

    Object GstDiscovererSubtitleInfo

    Signals from GObject:
      notify (GParam)
    """
    def get_language(self) -> typing.Optional[str]: ...

class DiscovererVideoInfo(DiscovererStreamInfo):
    """
    :Constructors:

    ::

        DiscovererVideoInfo(**properties)

    Object GstDiscovererVideoInfo

    Signals from GObject:
      notify (GParam)
    """
    def get_bitrate(self) -> int: ...
    def get_depth(self) -> int: ...
    def get_framerate_denom(self) -> int: ...
    def get_framerate_num(self) -> int: ...
    def get_height(self) -> int: ...
    def get_max_bitrate(self) -> int: ...
    def get_par_denom(self) -> int: ...
    def get_par_num(self) -> int: ...
    def get_width(self) -> int: ...
    def is_image(self) -> bool: ...
    def is_interlaced(self) -> bool: ...

class EncodingAudioProfile(EncodingProfile):
    """
    :Constructors:

    ::

        EncodingAudioProfile(**properties)
        new(format:Gst.Caps, preset:str=None, restriction:Gst.Caps=None, presence:int) -> GstPbutils.EncodingAudioProfile

    Object GstEncodingAudioProfile

    Properties from GstEncodingProfile:
      restriction-caps -> GstCaps: Restriction caps
        The restriction caps to use
      element-properties -> GstStructure: Element properties
        The element properties to use. Example: {properties,boolean-prop=true,string-prop="hi"}.

    Signals from GObject:
      notify (GParam)
    """
    class Props(EncodingProfile.Props):
        element_properties: typing.Optional[Gst.Structure]
        restriction_caps: Gst.Caps

    props: Props = ...
    def __init__(
        self,
        *,
        element_properties: Gst.Structure = ...,
        restriction_caps: Gst.Caps = ...,
    ) -> None: ...
    @classmethod
    def new(
        cls,
        format: Gst.Caps,
        preset: typing.Optional[str],
        restriction: typing.Optional[Gst.Caps],
        presence: int,
    ) -> EncodingAudioProfile: ...

class EncodingAudioProfileClass(GObject.GPointer): ...

class EncodingContainerProfile(EncodingProfile):
    """
    :Constructors:

    ::

        EncodingContainerProfile(**properties)
        new(name:str=None, description:str=None, format:Gst.Caps, preset:str=None) -> GstPbutils.EncodingContainerProfile

    Object GstEncodingContainerProfile

    Properties from GstEncodingProfile:
      restriction-caps -> GstCaps: Restriction caps
        The restriction caps to use
      element-properties -> GstStructure: Element properties
        The element properties to use. Example: {properties,boolean-prop=true,string-prop="hi"}.

    Signals from GObject:
      notify (GParam)
    """
    class Props(EncodingProfile.Props):
        element_properties: typing.Optional[Gst.Structure]
        restriction_caps: Gst.Caps

    props: Props = ...
    def __init__(
        self,
        *,
        element_properties: Gst.Structure = ...,
        restriction_caps: Gst.Caps = ...,
    ) -> None: ...
    def add_profile(self, profile: EncodingProfile) -> bool: ...
    def contains_profile(self, profile: EncodingProfile) -> bool: ...
    def get_profiles(self) -> list[EncodingProfile]: ...
    @classmethod
    def new(
        cls,
        name: typing.Optional[str],
        description: typing.Optional[str],
        format: Gst.Caps,
        preset: typing.Optional[str] = None,
    ) -> EncodingContainerProfile: ...

class EncodingContainerProfileClass(GObject.GPointer): ...

class EncodingProfile(GObject.Object):
    """
    :Constructors:

    ::

        EncodingProfile(**properties)

    Object GstEncodingProfile

    Properties from GstEncodingProfile:
      restriction-caps -> GstCaps: Restriction caps
        The restriction caps to use
      element-properties -> GstStructure: Element properties
        The element properties to use. Example: {properties,boolean-prop=true,string-prop="hi"}.

    Signals from GObject:
      notify (GParam)
    """
    class Props(GObject.Object.Props):
        element_properties: typing.Optional[Gst.Structure]
        restriction_caps: Gst.Caps

    props: Props = ...
    def __init__(
        self,
        *,
        element_properties: Gst.Structure = ...,
        restriction_caps: Gst.Caps = ...,
    ) -> None: ...
    def copy(self) -> EncodingProfile: ...
    @staticmethod
    def find(
        targetname: str,
        profilename: typing.Optional[str] = None,
        category: typing.Optional[str] = None,
    ) -> typing.Optional[EncodingProfile]: ...
    @staticmethod
    def from_discoverer(info: DiscovererInfo) -> typing.Optional[EncodingProfile]: ...
    @staticmethod
    def from_string(string: str) -> typing.Optional[EncodingProfile]: ...
    def get_allow_dynamic_output(self) -> bool: ...
    def get_description(self) -> typing.Optional[str]: ...
    def get_element_properties(self) -> typing.Optional[Gst.Structure]: ...
    def get_file_extension(self) -> typing.Optional[str]: ...
    def get_format(self) -> Gst.Caps: ...
    def get_input_caps(self) -> Gst.Caps: ...
    def get_name(self) -> typing.Optional[str]: ...
    def get_presence(self) -> int: ...
    def get_preset(self) -> typing.Optional[str]: ...
    def get_preset_name(self) -> typing.Optional[str]: ...
    def get_restriction(self) -> typing.Optional[Gst.Caps]: ...
    def get_single_segment(self) -> bool: ...
    def get_type_nick(self) -> str: ...
    def is_enabled(self) -> bool: ...
    def is_equal(self, b: EncodingProfile) -> bool: ...
    def set_allow_dynamic_output(self, allow_dynamic_output: bool) -> None: ...
    def set_description(self, description: typing.Optional[str] = None) -> None: ...
    def set_element_properties(self, element_properties: Gst.Structure) -> None: ...
    def set_enabled(self, enabled: bool) -> None: ...
    def set_format(self, format: Gst.Caps) -> None: ...
    def set_name(self, name: typing.Optional[str] = None) -> None: ...
    def set_presence(self, presence: int) -> None: ...
    def set_preset(self, preset: typing.Optional[str] = None) -> None: ...
    def set_preset_name(self, preset_name: typing.Optional[str] = None) -> None: ...
    def set_restriction(
        self, restriction: typing.Optional[Gst.Caps] = None
    ) -> None: ...
    def set_single_segment(self, single_segment: bool) -> None: ...
    def to_string(self) -> str: ...

class EncodingProfileClass(GObject.GPointer): ...

class EncodingTarget(GObject.Object):
    """
    :Constructors:

    ::

        EncodingTarget(**properties)
        new(name:str, category:str, description:str, profiles:list) -> GstPbutils.EncodingTarget or None

    Object GstEncodingTarget

    Signals from GObject:
      notify (GParam)
    """
    def add_profile(self, profile: EncodingProfile) -> bool: ...
    def get_category(self) -> str: ...
    def get_description(self) -> str: ...
    def get_name(self) -> str: ...
    def get_path(self) -> typing.Optional[str]: ...
    def get_profile(self, name: str) -> typing.Optional[EncodingProfile]: ...
    def get_profiles(self) -> list[EncodingProfile]: ...
    @staticmethod
    def load(name: str, category: typing.Optional[str] = None) -> EncodingTarget: ...
    @staticmethod
    def load_from_file(filepath: str) -> EncodingTarget: ...
    @classmethod
    def new(
        cls, name: str, category: str, description: str, profiles: list[EncodingProfile]
    ) -> typing.Optional[EncodingTarget]: ...
    def save(self) -> bool: ...
    def save_to_file(self, filepath: str) -> bool: ...

class EncodingVideoProfile(EncodingProfile):
    """
    :Constructors:

    ::

        EncodingVideoProfile(**properties)
        new(format:Gst.Caps, preset:str=None, restriction:Gst.Caps=None, presence:int) -> GstPbutils.EncodingVideoProfile

    Object GstEncodingVideoProfile

    Properties from GstEncodingProfile:
      restriction-caps -> GstCaps: Restriction caps
        The restriction caps to use
      element-properties -> GstStructure: Element properties
        The element properties to use. Example: {properties,boolean-prop=true,string-prop="hi"}.

    Signals from GObject:
      notify (GParam)
    """
    class Props(EncodingProfile.Props):
        element_properties: typing.Optional[Gst.Structure]
        restriction_caps: Gst.Caps

    props: Props = ...
    def __init__(
        self,
        *,
        element_properties: Gst.Structure = ...,
        restriction_caps: Gst.Caps = ...,
    ) -> None: ...
    def get_pass(self) -> int: ...
    def get_variableframerate(self) -> bool: ...
    @classmethod
    def new(
        cls,
        format: Gst.Caps,
        preset: typing.Optional[str],
        restriction: typing.Optional[Gst.Caps],
        presence: int,
    ) -> EncodingVideoProfile: ...
    def set_pass(self, pass_: int) -> None: ...
    def set_variableframerate(self, variableframerate: bool) -> None: ...

class EncodingVideoProfileClass(GObject.GPointer): ...

class InstallPluginsContext(GObject.GBoxed):
    """
    :Constructors:

    ::

        new() -> GstPbutils.InstallPluginsContext
    """
    @staticmethod
    def __new__(cls: type[Self]) -> Self: ...
    def copy(self) -> InstallPluginsContext: ...
    def free(self) -> None: ...
    @classmethod
    def new(cls) -> InstallPluginsContext: ...
    def set_confirm_search(self, confirm_search: bool) -> None: ...
    def set_desktop_id(self, desktop_id: str) -> None: ...
    def set_startup_notification_id(self, startup_id: str) -> None: ...
    def set_xid(self, xid: int) -> None: ...

class DiscovererSerializeFlags(GObject.GFlags):
    ALL = 7
    BASIC = 0
    CAPS = 1
    MISC = 4
    TAGS = 2

class PbUtilsCapsDescriptionFlags(GObject.GFlags):
    AUDIO = 2
    CONTAINER = 1
    GENERIC = 64
    IMAGE = 8
    METADATA = 128
    SUBTITLE = 16
    TAG = 32
    VIDEO = 4

class AudioVisualizerShader(GObject.GEnum):
    FADE = 1
    FADE_AND_MOVE_DOWN = 3
    FADE_AND_MOVE_HORIZ_IN = 7
    FADE_AND_MOVE_HORIZ_OUT = 6
    FADE_AND_MOVE_LEFT = 4
    FADE_AND_MOVE_RIGHT = 5
    FADE_AND_MOVE_UP = 2
    FADE_AND_MOVE_VERT_IN = 9
    FADE_AND_MOVE_VERT_OUT = 8
    NONE = 0

class DiscovererResult(GObject.GEnum):
    BUSY = 4
    ERROR = 2
    MISSING_PLUGINS = 5
    OK = 0
    TIMEOUT = 3
    URI_INVALID = 1

class InstallPluginsReturn(GObject.GEnum):
    CRASHED = 100
    ERROR = 2
    HELPER_MISSING = 202
    INSTALL_IN_PROGRESS = 203
    INTERNAL_FAILURE = 201
    INVALID = 101
    NOT_FOUND = 1
    PARTIAL_SUCCESS = 3
    STARTED_OK = 200
    SUCCESS = 0
    USER_ABORT = 4
    @staticmethod
    def get_name(ret: InstallPluginsReturn) -> str: ...
