import typing

from gi.repository import GLib
from gi.repository import GObject
from typing_extensions import Self

T = typing.TypeVar("T")

ALLOCATOR_SYSMEM: str = "SystemMemory"
BUFFER_COPY_ALL: int = 0
BUFFER_COPY_METADATA: int = 0
BUFFER_OFFSET_NONE: int = 18446744073709551615
CAN_INLINE: int = 1
CAPS_FEATURE_MEMORY_SYSTEM_MEMORY: str = "memory:SystemMemory"
CLOCK_TIME_NONE: int = 18446744073709551615
DEBUG_BG_MASK: int = 240
DEBUG_FG_MASK: int = 15
DEBUG_FORMAT_MASK: int = 65280
ELEMENT_FACTORY_KLASS_DECODER: str = "Decoder"
ELEMENT_FACTORY_KLASS_DECRYPTOR: str = "Decryptor"
ELEMENT_FACTORY_KLASS_DEMUXER: str = "Demuxer"
ELEMENT_FACTORY_KLASS_DEPAYLOADER: str = "Depayloader"
ELEMENT_FACTORY_KLASS_ENCODER: str = "Encoder"
ELEMENT_FACTORY_KLASS_ENCRYPTOR: str = "Encryptor"
ELEMENT_FACTORY_KLASS_FORMATTER: str = "Formatter"
ELEMENT_FACTORY_KLASS_HARDWARE: str = "Hardware"
ELEMENT_FACTORY_KLASS_MEDIA_AUDIO: str = "Audio"
ELEMENT_FACTORY_KLASS_MEDIA_IMAGE: str = "Image"
ELEMENT_FACTORY_KLASS_MEDIA_METADATA: str = "Metadata"
ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE: str = "Subtitle"
ELEMENT_FACTORY_KLASS_MEDIA_VIDEO: str = "Video"
ELEMENT_FACTORY_KLASS_MUXER: str = "Muxer"
ELEMENT_FACTORY_KLASS_PARSER: str = "Parser"
ELEMENT_FACTORY_KLASS_PAYLOADER: str = "Payloader"
ELEMENT_FACTORY_KLASS_SINK: str = "Sink"
ELEMENT_FACTORY_KLASS_SRC: str = "Source"
ELEMENT_FACTORY_TYPE_ANY: int = 562949953421311
ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS: int = 3940649673949188
ELEMENT_FACTORY_TYPE_AUDIO_ENCODER: int = 1125899906842626
ELEMENT_FACTORY_TYPE_DECODABLE: int = 1377
ELEMENT_FACTORY_TYPE_DECODER: int = 1
ELEMENT_FACTORY_TYPE_DECRYPTOR: int = 1024
ELEMENT_FACTORY_TYPE_DEMUXER: int = 32
ELEMENT_FACTORY_TYPE_DEPAYLOADER: int = 256
ELEMENT_FACTORY_TYPE_ENCODER: int = 2
ELEMENT_FACTORY_TYPE_ENCRYPTOR: int = 2048
ELEMENT_FACTORY_TYPE_FORMATTER: int = 512
ELEMENT_FACTORY_TYPE_HARDWARE: int = 4096
ELEMENT_FACTORY_TYPE_MAX_ELEMENTS: int = 281474976710656
ELEMENT_FACTORY_TYPE_MEDIA_ANY: int = 18446462598732840960
ELEMENT_FACTORY_TYPE_MEDIA_AUDIO: int = 1125899906842624
ELEMENT_FACTORY_TYPE_MEDIA_IMAGE: int = 2251799813685248
ELEMENT_FACTORY_TYPE_MEDIA_METADATA: int = 9007199254740992
ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE: int = 4503599627370496
ELEMENT_FACTORY_TYPE_MEDIA_VIDEO: int = 562949953421312
ELEMENT_FACTORY_TYPE_MUXER: int = 16
ELEMENT_FACTORY_TYPE_PARSER: int = 64
ELEMENT_FACTORY_TYPE_PAYLOADER: int = 128
ELEMENT_FACTORY_TYPE_SINK: int = 4
ELEMENT_FACTORY_TYPE_SRC: int = 8
ELEMENT_FACTORY_TYPE_TIMESTAMPER: int = 8192
ELEMENT_FACTORY_TYPE_VIDEO_ENCODER: int = 2814749767106562
ELEMENT_METADATA_AUTHOR: str = "author"
ELEMENT_METADATA_DESCRIPTION: str = "description"
ELEMENT_METADATA_DOC_URI: str = "doc-uri"
ELEMENT_METADATA_ICON_NAME: str = "icon-name"
ELEMENT_METADATA_KLASS: str = "klass"
ELEMENT_METADATA_LONGNAME: str = "long-name"
EVENT_NUM_SHIFT: int = 8
EVENT_TYPE_BOTH: int = 0
FLAG_SET_MASK_EXACT: int = 4294967295
FORMAT_PERCENT_MAX: int = 1000000
FORMAT_PERCENT_SCALE: int = 10000
GROUP_ID_INVALID: int = 0
LICENSE_UNKNOWN: str = "unknown"
LOCK_FLAG_READWRITE: int = 0
MAP_READWRITE: int = 0
META_TAG_MEMORY_REFERENCE_STR: str = "memory-reference"
META_TAG_MEMORY_STR: str = "memory"
MSECOND: int = 1000000
NSECOND: int = 1
PARAM_CONDITIONALLY_AVAILABLE: int = 16384
PARAM_CONTROLLABLE: int = 512
PARAM_DOC_SHOW_DEFAULT: int = 8192
PARAM_MUTABLE_PAUSED: int = 2048
PARAM_MUTABLE_PLAYING: int = 4096
PARAM_MUTABLE_READY: int = 1024
PARAM_USER_SHIFT: int = 65536
PROTECTION_SYSTEM_ID_CAPS_FIELD: str = "protection-system"
PROTECTION_UNSPECIFIED_SYSTEM_ID: str = "unspecified-system-id"
QUERY_NUM_SHIFT: int = 8
QUERY_TYPE_BOTH: int = 0
SECOND: int = 1000000000
SEGMENT_INSTANT_FLAGS: int = 912
SEQNUM_INVALID: int = 0
TAG_ALBUM: str = "album"
TAG_ALBUM_ARTIST: str = "album-artist"
TAG_ALBUM_ARTIST_SORTNAME: str = "album-artist-sortname"
TAG_ALBUM_GAIN: str = "replaygain-album-gain"
TAG_ALBUM_PEAK: str = "replaygain-album-peak"
TAG_ALBUM_SORTNAME: str = "album-sortname"
TAG_ALBUM_VOLUME_COUNT: str = "album-disc-count"
TAG_ALBUM_VOLUME_NUMBER: str = "album-disc-number"
TAG_APPLICATION_DATA: str = "application-data"
TAG_APPLICATION_NAME: str = "application-name"
TAG_ARTIST: str = "artist"
TAG_ARTIST_SORTNAME: str = "artist-sortname"
TAG_ATTACHMENT: str = "attachment"
TAG_AUDIO_CODEC: str = "audio-codec"
TAG_BEATS_PER_MINUTE: str = "beats-per-minute"
TAG_BITRATE: str = "bitrate"
TAG_CODEC: str = "codec"
TAG_COMMENT: str = "comment"
TAG_COMPOSER: str = "composer"
TAG_COMPOSER_SORTNAME: str = "composer-sortname"
TAG_CONDUCTOR: str = "conductor"
TAG_CONTACT: str = "contact"
TAG_CONTAINER_FORMAT: str = "container-format"
TAG_CONTAINER_SPECIFIC_TRACK_ID: str = "container-specific-track-id"
TAG_COPYRIGHT: str = "copyright"
TAG_COPYRIGHT_URI: str = "copyright-uri"
TAG_DATE: str = "date"
TAG_DATE_TIME: str = "datetime"
TAG_DESCRIPTION: str = "description"
TAG_DEVICE_MANUFACTURER: str = "device-manufacturer"
TAG_DEVICE_MODEL: str = "device-model"
TAG_DURATION: str = "duration"
TAG_ENCODED_BY: str = "encoded-by"
TAG_ENCODER: str = "encoder"
TAG_ENCODER_VERSION: str = "encoder-version"
TAG_EXTENDED_COMMENT: str = "extended-comment"
TAG_GENRE: str = "genre"
TAG_GEO_LOCATION_CAPTURE_DIRECTION: str = "geo-location-capture-direction"
TAG_GEO_LOCATION_CITY: str = "geo-location-city"
TAG_GEO_LOCATION_COUNTRY: str = "geo-location-country"
TAG_GEO_LOCATION_ELEVATION: str = "geo-location-elevation"
TAG_GEO_LOCATION_HORIZONTAL_ERROR: str = "geo-location-horizontal-error"
TAG_GEO_LOCATION_LATITUDE: str = "geo-location-latitude"
TAG_GEO_LOCATION_LONGITUDE: str = "geo-location-longitude"
TAG_GEO_LOCATION_MOVEMENT_DIRECTION: str = "geo-location-movement-direction"
TAG_GEO_LOCATION_MOVEMENT_SPEED: str = "geo-location-movement-speed"
TAG_GEO_LOCATION_NAME: str = "geo-location-name"
TAG_GEO_LOCATION_SUBLOCATION: str = "geo-location-sublocation"
TAG_GROUPING: str = "grouping"
TAG_HOMEPAGE: str = "homepage"
TAG_IMAGE: str = "image"
TAG_IMAGE_ORIENTATION: str = "image-orientation"
TAG_INTERPRETED_BY: str = "interpreted-by"
TAG_ISRC: str = "isrc"
TAG_KEYWORDS: str = "keywords"
TAG_LANGUAGE_CODE: str = "language-code"
TAG_LANGUAGE_NAME: str = "language-name"
TAG_LICENSE: str = "license"
TAG_LICENSE_URI: str = "license-uri"
TAG_LOCATION: str = "location"
TAG_LYRICS: str = "lyrics"
TAG_MAXIMUM_BITRATE: str = "maximum-bitrate"
TAG_MIDI_BASE_NOTE: str = "midi-base-note"
TAG_MINIMUM_BITRATE: str = "minimum-bitrate"
TAG_NOMINAL_BITRATE: str = "nominal-bitrate"
TAG_ORGANIZATION: str = "organization"
TAG_PERFORMER: str = "performer"
TAG_PREVIEW_IMAGE: str = "preview-image"
TAG_PRIVATE_DATA: str = "private-data"
TAG_PUBLISHER: str = "publisher"
TAG_REFERENCE_LEVEL: str = "replaygain-reference-level"
TAG_SERIAL: str = "serial"
TAG_SHOW_EPISODE_NUMBER: str = "show-episode-number"
TAG_SHOW_NAME: str = "show-name"
TAG_SHOW_SEASON_NUMBER: str = "show-season-number"
TAG_SHOW_SORTNAME: str = "show-sortname"
TAG_SUBTITLE_CODEC: str = "subtitle-codec"
TAG_TITLE: str = "title"
TAG_TITLE_SORTNAME: str = "title-sortname"
TAG_TRACK_COUNT: str = "track-count"
TAG_TRACK_GAIN: str = "replaygain-track-gain"
TAG_TRACK_NUMBER: str = "track-number"
TAG_TRACK_PEAK: str = "replaygain-track-peak"
TAG_USER_RATING: str = "user-rating"
TAG_VERSION: str = "version"
TAG_VIDEO_CODEC: str = "video-codec"
TOC_REPEAT_COUNT_INFINITE: int = -1
URI_NO_PORT: int = 0
USECOND: int = 1000
VALUE_EQUAL: int = 0
VALUE_GREATER_THAN: int = 1
VALUE_LESS_THAN: int = -1
VALUE_UNORDERED: int = 2
VERSION_MAJOR: int = 1
VERSION_MICRO: int = 11
VERSION_MINOR: int = 26
VERSION_NANO: int = 1

def TIME_ARGS(time: int) -> str: ...
def buffer_get_max_memory() -> int: ...
def buffer_list_replace(
    new_list: typing.Optional[BufferList] = None,
) -> typing.Tuple[bool, BufferList]: ...
def buffer_list_take(
    new_list: typing.Optional[BufferList] = None,
) -> typing.Tuple[bool, BufferList]: ...
def caps_features_from_string(features: str) -> typing.Optional[CapsFeatures]: ...
def caps_from_string(string: str) -> typing.Optional[Caps]: ...
def context_replace(
    new_context: typing.Optional[Context] = None,
) -> typing.Tuple[bool, Context]: ...
def core_error_quark() -> int: ...
def debug(*args, **kwargs): ...  # FIXME: Override is missing typing annotation
def debug_add_log_function(
    func: typing.Callable[..., None], *user_data: typing.Any
) -> None: ...
def debug_add_ring_buffer_logger(
    max_size_per_thread: int, thread_timeout: int
) -> None: ...
def debug_bin_to_dot_data(bin: Bin, details: DebugGraphDetails) -> str: ...
def debug_bin_to_dot_file(
    bin: Bin, details: DebugGraphDetails, file_name: str
) -> None: ...
def debug_bin_to_dot_file_with_ts(
    bin: Bin, details: DebugGraphDetails, file_name: str
) -> None: ...
def debug_construct_term_color(colorinfo: int) -> str: ...
def debug_construct_win_color(colorinfo: int) -> int: ...
def debug_get_all_categories() -> list[DebugCategory]: ...
def debug_get_color_mode() -> DebugColorMode: ...
def debug_get_default_threshold() -> DebugLevel: ...
def debug_get_stack_trace(flags: StackTraceFlags) -> typing.Optional[str]: ...
def debug_is_active() -> bool: ...
def debug_is_colored() -> bool: ...
def debug_level_get_name(level: DebugLevel) -> str: ...
def debug_log_default(
    category: DebugCategory,
    level: DebugLevel,
    file: str,
    function: str,
    line: int,
    object: typing.Optional[GObject.Object],
    message: DebugMessage,
    user_data: None,
) -> None: ...
def debug_log_get_line(
    category: DebugCategory,
    level: DebugLevel,
    file: str,
    function: str,
    line: int,
    object: typing.Optional[GObject.Object],
    message: DebugMessage,
) -> str: ...
def debug_log_id_literal(
    category: DebugCategory,
    level: DebugLevel,
    file: str,
    function: str,
    line: int,
    id: typing.Optional[str],
    message_string: str,
) -> None: ...
def debug_log_literal(
    category: DebugCategory,
    level: DebugLevel,
    file: str,
    function: str,
    line: int,
    object: typing.Optional[GObject.Object],
    message_string: str,
) -> None: ...
def debug_print_object(ptr: None) -> str: ...
def debug_print_segment(segment: typing.Optional[Segment] = None) -> str: ...
def debug_print_stack_trace() -> None: ...
def debug_remove_log_function(
    func: typing.Optional[typing.Callable[..., None]] = None,
) -> int: ...
def debug_remove_log_function_by_data(data: None) -> int: ...
def debug_remove_ring_buffer_logger() -> None: ...
def debug_ring_buffer_logger_get_logs() -> list[str]: ...
def debug_set_active(active: bool) -> None: ...
def debug_set_color_mode(mode: DebugColorMode) -> None: ...
def debug_set_color_mode_from_string(mode: str) -> None: ...
def debug_set_colored(colored: bool) -> None: ...
def debug_set_default_threshold(level: DebugLevel) -> None: ...
def debug_set_threshold_for_name(name: str, level: DebugLevel) -> None: ...
def debug_set_threshold_from_string(list: str, reset: bool) -> None: ...
def debug_unset_threshold_for_name(name: str) -> None: ...
def deinit() -> None: ...
def dynamic_type_register(plugin: Plugin, type: typing.Type[typing.Any]) -> bool: ...
def error(*args, **kwargs): ...  # FIXME: Override is missing typing annotation
def error_get_message(domain: int, code: int) -> str: ...
def event_type_get_flags(type: EventType) -> EventTypeFlags: ...
def event_type_get_name(type: EventType) -> str: ...
def event_type_to_quark(type: EventType) -> int: ...
def event_type_to_sticky_ordering(type: EventType) -> int: ...
def filename_to_uri(filename: str) -> typing.Optional[str]: ...
def fixme(*args, **kwargs): ...  # FIXME: Override is missing typing annotation
def flow_get_name(ret: FlowReturn) -> str: ...
def flow_to_quark(ret: FlowReturn) -> int: ...
def format_get_by_nick(nick: str) -> Format: ...
def format_get_details(format: Format) -> typing.Optional[FormatDefinition]: ...
def format_get_name(format: Format) -> typing.Optional[str]: ...
def format_iterate_definitions() -> Iterator: ...
def format_register(nick: str, description: str) -> Format: ...
def format_to_quark(format: Format) -> int: ...
def formats_contains(formats: typing.Sequence[Format], format: Format) -> bool: ...
def get_main_executable_path() -> typing.Optional[str]: ...
def info(*args, **kwargs): ...  # FIXME: Override is missing typing annotation
def init(argv: typing.Optional[list[str]] = None) -> None: ...
def init_check(
    argv: typing.Optional[list[str]] = None,
) -> typing.Tuple[bool, typing.Optional[list[str]]]: ...
def init_python(): ...  # FIXME: Override is missing typing annotation
def is_caps_features(obj: None) -> bool: ...
def is_initialized() -> bool: ...
def library_error_quark() -> int: ...
def log(*args, **kwargs): ...  # FIXME: Override is missing typing annotation
def memdump(*args, **kwargs): ...  # FIXME: Override is missing typing annotation
def message_take(
    new_message: typing.Optional[Message] = None,
) -> typing.Tuple[bool, Message]: ...
def message_type_get_name(type: MessageType) -> str: ...
def message_type_to_quark(type: MessageType) -> int: ...
def meta_api_type_aggregate_params(
    api: typing.Type[typing.Any],
    aggregated_params: Structure,
    params0: Structure,
    params1: Structure,
) -> bool: ...
def meta_api_type_get_tags(api: typing.Type[typing.Any]) -> list[str]: ...
def meta_api_type_has_tag(api: typing.Type[typing.Any], tag: int) -> bool: ...
def meta_api_type_register(
    api: str, tags: typing.Sequence[str]
) -> typing.Type[typing.Any]: ...
def meta_api_type_set_params_aggregator(
    api: typing.Type[typing.Any],
    aggregator: typing.Callable[[Structure, Structure, Structure], bool],
) -> None: ...
def meta_deserialize(
    buffer: Buffer, data: int, size: int
) -> typing.Tuple[typing.Optional[Meta], int]: ...
def meta_get_info(impl: str) -> typing.Optional[MetaInfo]: ...
def meta_register_custom(
    name: str,
    tags: typing.Sequence[str],
    transform_func: typing.Optional[typing.Callable[..., bool]] = None,
    *user_data: typing.Any,
) -> MetaInfo: ...
def meta_register_custom_simple(name: str) -> MetaInfo: ...
def mini_object_replace(
    newdata: typing.Optional[MiniObject] = None,
) -> typing.Tuple[bool, MiniObject]: ...
def mini_object_take(newdata: MiniObject) -> typing.Tuple[bool, MiniObject]: ...
def pad_mode_get_name(mode: PadMode) -> str: ...
def param_spec_array(
    name: str,
    nick: str,
    blurb: str,
    element_spec: GObject.ParamSpec,
    flags: GObject.ParamFlags,
) -> GObject.ParamSpec: ...
def param_spec_fraction(
    name: str,
    nick: str,
    blurb: str,
    min_num: int,
    min_denom: int,
    max_num: int,
    max_denom: int,
    default_num: int,
    default_denom: int,
    flags: GObject.ParamFlags,
) -> typing.Optional[GObject.ParamSpec]: ...
def parent_buffer_meta_api_get_type() -> typing.Type[typing.Any]: ...
def parent_buffer_meta_get_info() -> MetaInfo: ...
def parse_bin_from_description(
    bin_description: str, ghost_unlinked_pads: bool
) -> Bin: ...
def parse_bin_from_description_full(
    bin_description: str,
    ghost_unlinked_pads: bool,
    context: typing.Optional[ParseContext],
    flags: ParseFlags,
) -> Element: ...
def parse_error_quark() -> int: ...
def parse_launch(pipeline_description: str) -> Element: ...
def parse_launch_full(
    pipeline_description: str, context: typing.Optional[ParseContext], flags: ParseFlags
) -> Element: ...
def parse_launchv(argv: typing.Sequence[str]) -> Element: ...
def parse_launchv_full(
    argv: typing.Sequence[str],
    context: typing.Optional[ParseContext],
    flags: ParseFlags,
) -> Element: ...
def plugin_error_quark() -> int: ...
def preset_get_app_dir() -> typing.Optional[str]: ...
def preset_set_app_dir(app_dir: str) -> bool: ...
def protection_filter_systems_by_available_decryptors(
    system_identifiers: typing.Sequence[str],
) -> typing.Optional[list[str]]: ...
def protection_meta_api_get_type() -> typing.Type[typing.Any]: ...
def protection_meta_get_info() -> MetaInfo: ...
def protection_select_system(
    system_identifiers: typing.Sequence[str],
) -> typing.Optional[str]: ...
def query_take(
    new_query: typing.Optional[Query] = None,
) -> typing.Tuple[bool, Query]: ...
def query_type_get_flags(type: QueryType) -> QueryTypeFlags: ...
def query_type_get_name(type: QueryType) -> str: ...
def query_type_to_quark(type: QueryType) -> int: ...
def reference_timestamp_meta_api_get_type() -> typing.Type[typing.Any]: ...
def reference_timestamp_meta_get_info() -> MetaInfo: ...
def resource_error_quark() -> int: ...
def segtrap_is_enabled() -> bool: ...
def segtrap_set_enabled(enabled: bool) -> None: ...
def state_change_get_name(transition: StateChange) -> str: ...
def stream_error_quark() -> int: ...
def stream_type_get_name(stype: StreamType) -> str: ...
def structure_take(
    newstr: typing.Optional[Structure] = None,
) -> typing.Tuple[bool, Structure]: ...
def tag_exists(tag: str) -> bool: ...
def tag_get_description(tag: str) -> str: ...
def tag_get_flag(tag: str) -> TagFlag: ...
def tag_get_nick(tag: str) -> str: ...
def tag_get_type(tag: str) -> typing.Type[typing.Any]: ...
def tag_is_fixed(tag: str) -> bool: ...
def tag_list_copy_value(list: TagList, tag: str) -> typing.Tuple[bool, typing.Any]: ...
def tag_list_replace(
    new_taglist: typing.Optional[TagList] = None,
) -> typing.Tuple[bool, TagList]: ...
def tag_list_take(
    new_taglist: typing.Optional[TagList] = None,
) -> typing.Tuple[bool, TagList]: ...
def tag_merge_strings_with_comma(src: typing.Any) -> typing.Any: ...
def tag_merge_use_first(src: typing.Any) -> typing.Any: ...
def toc_entry_type_get_nick(type: TocEntryType) -> str: ...
def trace(*args, **kwargs): ...  # FIXME: Override is missing typing annotation
def tracing_get_active_tracers() -> list[Tracer]: ...
def tracing_register_hook(
    tracer: Tracer, detail: str, func: typing.Callable[[], None]
) -> None: ...
def type_find_register(
    plugin: typing.Optional[Plugin],
    name: str,
    rank: int,
    func: typing.Callable[..., None],
    extensions: typing.Optional[str] = None,
    possible_caps: typing.Optional[Caps] = None,
    *data: typing.Any,
) -> bool: ...
def type_is_plugin_api(
    type: typing.Type[typing.Any],
) -> typing.Tuple[bool, PluginAPIFlags]: ...
def type_mark_as_plugin_api(
    type: typing.Type[typing.Any], flags: PluginAPIFlags
) -> None: ...
def update_registry() -> bool: ...
def uri_construct(protocol: str, location: str) -> str: ...
def uri_error_quark() -> int: ...
def uri_from_string(uri: str) -> typing.Optional[Uri]: ...
def uri_from_string_escaped(uri: str) -> typing.Optional[Uri]: ...
def uri_get_location(uri: str) -> typing.Optional[str]: ...
def uri_get_protocol(uri: str) -> typing.Optional[str]: ...
def uri_has_protocol(uri: str, protocol: str) -> bool: ...
def uri_is_valid(uri: str) -> bool: ...
def uri_join_strings(base_uri: str, ref_uri: str) -> typing.Optional[str]: ...
def uri_protocol_is_supported(type: URIType, protocol: str) -> bool: ...
def uri_protocol_is_valid(protocol: str) -> bool: ...
def util_array_binary_search(
    array: None,
    num_elements: int,
    element_size: int,
    search_func: typing.Callable[..., int],
    mode: SearchMode,
    search_data: None,
    *user_data: typing.Any,
) -> None: ...
def util_ceil_log2(v: int) -> int: ...
def util_double_to_fraction(src: float) -> typing.Tuple[int, int]: ...
def util_dump_buffer(buf: Buffer) -> None: ...
def util_dump_mem(mem: typing.Sequence[int]) -> None: ...
def util_filename_compare(a: str, b: str) -> int: ...
def util_floor_log2(v: int) -> int: ...
def util_fraction_add(
    a_n: int, a_d: int, b_n: int, b_d: int
) -> typing.Tuple[bool, int, int]: ...
def util_fraction_compare(a_n: int, a_d: int, b_n: int, b_d: int) -> int: ...
def util_fraction_multiply(
    a_n: int, a_d: int, b_n: int, b_d: int
) -> typing.Tuple[bool, int, int]: ...
def util_fraction_multiply_int64(
    a_n: int, a_d: int, b_n: int, b_d: int
) -> typing.Tuple[bool, int, int]: ...
def util_fraction_to_double(src_n: int, src_d: int) -> float: ...
def util_gdouble_to_guint64(value: float) -> int: ...
def util_get_object_array(
    object: GObject.Object, name: str
) -> typing.Tuple[bool, GObject.ValueArray]: ...
def util_get_timestamp() -> int: ...
def util_greatest_common_divisor(a: int, b: int) -> int: ...
def util_greatest_common_divisor_int64(a: int, b: int) -> int: ...
def util_group_id_next() -> int: ...
def util_guint64_to_gdouble(value: int) -> float: ...
def util_seqnum_compare(s1: int, s2: int) -> int: ...
def util_seqnum_next() -> int: ...
def util_set_object_arg(object: GObject.Object, name: str, value: str) -> None: ...
def util_set_object_array(
    object: GObject.Object, name: str, array: GObject.ValueArray
) -> bool: ...
def util_set_value_from_string(value_str: str) -> typing.Any: ...
def util_simplify_fraction(
    numerator: int, denominator: int, n_terms: int, threshold: int
) -> None: ...
def util_uint64_scale(val: int, num: int, denom: int) -> int: ...
def util_uint64_scale_ceil(val: int, num: int, denom: int) -> int: ...
def util_uint64_scale_int(val: int, num: int, denom: int) -> int: ...
def util_uint64_scale_int_ceil(val: int, num: int, denom: int) -> int: ...
def util_uint64_scale_int_round(val: int, num: int, denom: int) -> int: ...
def util_uint64_scale_round(val: int, num: int, denom: int) -> int: ...
def value_can_compare(value1: typing.Any, value2: typing.Any) -> bool: ...
def value_can_intersect(value1: typing.Any, value2: typing.Any) -> bool: ...
def value_can_subtract(minuend: typing.Any, subtrahend: typing.Any) -> bool: ...
def value_can_union(value1: typing.Any, value2: typing.Any) -> bool: ...
def value_compare(value1: typing.Any, value2: typing.Any) -> int: ...
def value_deserialize(src: str) -> typing.Tuple[bool, typing.Any]: ...
def value_deserialize_with_pspec(
    src: str, pspec: typing.Optional[GObject.ParamSpec] = None
) -> typing.Tuple[bool, typing.Any]: ...
def value_fixate(dest: typing.Any, src: typing.Any) -> bool: ...
def value_fraction_multiply(
    product: typing.Any, factor1: typing.Any, factor2: typing.Any
) -> bool: ...
def value_fraction_subtract(
    dest: typing.Any, minuend: typing.Any, subtrahend: typing.Any
) -> bool: ...
def value_get_bitmask(value: typing.Any) -> int: ...
def value_get_caps(value: typing.Any) -> Caps: ...
def value_get_caps_features(value: typing.Any) -> CapsFeatures: ...
def value_get_double_range_max(value: typing.Any) -> float: ...
def value_get_double_range_min(value: typing.Any) -> float: ...
def value_get_flagset_flags(value: typing.Any) -> int: ...
def value_get_flagset_mask(value: typing.Any) -> int: ...
def value_get_fraction_denominator(value: typing.Any) -> int: ...
def value_get_fraction_numerator(value: typing.Any) -> int: ...
def value_get_fraction_range_max(value: typing.Any) -> typing.Optional[typing.Any]: ...
def value_get_fraction_range_min(value: typing.Any) -> typing.Optional[typing.Any]: ...
def value_get_int64_range_max(value: typing.Any) -> int: ...
def value_get_int64_range_min(value: typing.Any) -> int: ...
def value_get_int64_range_step(value: typing.Any) -> int: ...
def value_get_int_range_max(value: typing.Any) -> int: ...
def value_get_int_range_min(value: typing.Any) -> int: ...
def value_get_int_range_step(value: typing.Any) -> int: ...
def value_get_structure(value: typing.Any) -> Structure: ...
def value_init_and_copy(src: typing.Any) -> typing.Any: ...
def value_intersect(
    value1: typing.Any, value2: typing.Any
) -> typing.Tuple[bool, typing.Any]: ...
def value_is_fixed(value: typing.Any) -> bool: ...
def value_is_subset(value1: typing.Any, value2: typing.Any) -> bool: ...
def value_register(table: ValueTable) -> None: ...
def value_serialize(value: typing.Any) -> typing.Optional[str]: ...
def value_set_bitmask(value: typing.Any, bitmask: int) -> None: ...
def value_set_caps(value: typing.Any, caps: Caps) -> None: ...
def value_set_caps_features(value: typing.Any, features: CapsFeatures) -> None: ...
def value_set_double_range(value: typing.Any, start: float, end: float) -> None: ...
def value_set_flagset(value: typing.Any, flags: int, mask: int) -> None: ...
def value_set_fraction(value: typing.Any, numerator: int, denominator: int) -> None: ...
def value_set_fraction_range(
    value: typing.Any, start: typing.Any, end: typing.Any
) -> None: ...
def value_set_fraction_range_full(
    value: typing.Any,
    numerator_start: int,
    denominator_start: int,
    numerator_end: int,
    denominator_end: int,
) -> None: ...
def value_set_int64_range(value: typing.Any, start: int, end: int) -> None: ...
def value_set_int64_range_step(
    value: typing.Any, start: int, end: int, step: int
) -> None: ...
def value_set_int_range(value: typing.Any, start: int, end: int) -> None: ...
def value_set_int_range_step(
    value: typing.Any, start: int, end: int, step: int
) -> None: ...
def value_set_structure(value: typing.Any, structure: Structure) -> None: ...
def value_subtract(
    minuend: typing.Any, subtrahend: typing.Any
) -> typing.Tuple[bool, typing.Any]: ...
def value_union(
    value1: typing.Any, value2: typing.Any
) -> typing.Tuple[bool, typing.Any]: ...
def version() -> typing.Tuple[int, int, int, int]: ...
def version_string() -> str: ...
def warning(*args, **kwargs): ...  # FIXME: Override is missing typing annotation

class AddError(Exception): ...

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

    ::

        AllocationParams()
        new() -> Gst.AllocationParams
    """

    flags: MemoryFlags = ...
    align: int = ...
    prefix: int = ...
    padding: int = ...
    @staticmethod
    def __new__(cls: type[Self]) -> Self: ...
    def copy(self) -> typing.Optional[AllocationParams]: ...
    def free(self) -> None: ...
    def init(self) -> None: ...
    @classmethod
    def new(cls) -> AllocationParams: ...

class Allocator(Object):
    """
    :Constructors:

    ::

        Allocator(**properties)

    Object GstAllocator

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    mem_type: str = ...
    mem_map: typing.Callable[[Memory, int, MapFlags], None] = ...
    mem_unmap: typing.Callable[[Memory], None] = ...
    mem_copy: typing.Callable[[Memory, int, int], Memory] = ...
    mem_share: typing.Callable[[Memory, int, int], Memory] = ...
    mem_is_span: typing.Callable[[Memory, Memory, int], bool] = ...
    mem_map_full: typing.Callable[[Memory, MapInfo, int], None] = ...
    mem_unmap_full: typing.Callable[[Memory, MapInfo], None] = ...
    priv: AllocatorPrivate = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def alloc(
        self, size: int, params: typing.Optional[AllocationParams] = None
    ) -> typing.Optional[Memory]: ...
    def do_alloc(
        self, size: int, params: typing.Optional[AllocationParams] = None
    ) -> typing.Optional[Memory]: ...
    def do_free(self, memory: Memory) -> None: ...
    @staticmethod
    def find(name: typing.Optional[str] = None) -> typing.Optional[Allocator]: ...
    def free(self, memory: Memory) -> None: ...
    @staticmethod
    def register(name: str, allocator: Allocator) -> None: ...
    def set_default(self) -> None: ...

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

    ::

        AllocatorClass()
    """

    object_class: ObjectClass = ...
    alloc: typing.Callable[
        [typing.Optional[Allocator], int, typing.Optional[AllocationParams]],
        typing.Optional[Memory],
    ] = ...
    free: typing.Callable[[Allocator, Memory], None] = ...

class AllocatorPrivate(GObject.GPointer): ...

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

    ::

        new(initial_size:int) -> Gst.AtomicQueue
    """
    @staticmethod
    def __new__(cls: type[Self], initial_size: int) -> Self: ...
    def length(self) -> int: ...
    @classmethod
    def new(cls, initial_size: int) -> AtomicQueue: ...
    def peek(self) -> None: ...
    def pop(self) -> None: ...
    def push(self, data: None) -> None: ...
    def ref(self) -> None: ...
    def unref(self) -> None: ...

class Bin(Element, ChildProxy):
    """
    :Constructors:

    ::

        Bin(**properties)
        new(name:str=None) -> Gst.Element

    Object GstBin

    Signals from GstBin:
      element-added (GstElement)
      element-removed (GstElement)
      deep-element-added (GstBin, GstElement)
      deep-element-removed (GstBin, GstElement)
      do-latency () -> gboolean

    Properties from GstBin:
      async-handling -> gboolean: Async Handling
        The bin will handle Asynchronous state changes
      message-forward -> gboolean: Message Forward
        Forwards all children messages

    Signals from GstChildProxy:
      child-added (GObject, gchararray)
      child-removed (GObject, gchararray)

    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(Element.Props):
        async_handling: bool
        message_forward: bool
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    element: Element = ...
    numchildren: int = ...
    children: list[Element] = ...
    children_cookie: int = ...
    child_bus: Bus = ...
    messages: list[Message] = ...
    polling: bool = ...
    state_dirty: bool = ...
    clock_dirty: bool = ...
    provided_clock: Clock = ...
    clock_provider: Element = ...
    priv: BinPrivate = ...
    def __init__(
        self,
        *,
        async_handling: bool = ...,
        message_forward: bool = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def add(self, *args: Element) -> None: ...
    def do_add_element(self, element: Element) -> bool: ...
    def do_deep_element_added(self, sub_bin: Bin, child: Element) -> None: ...
    def do_deep_element_removed(self, sub_bin: Bin, child: Element) -> None: ...
    def do_do_latency(self) -> bool: ...
    def do_element_added(self, child: Element) -> None: ...
    def do_element_removed(self, child: Element) -> None: ...
    def do_handle_message(self, message: Message) -> None: ...
    def do_remove_element(self, element: Element) -> bool: ...
    def find_unlinked_pad(self, direction: PadDirection) -> typing.Optional[Pad]: ...
    def get_by_interface(
        self, iface: typing.Type[typing.Any]
    ) -> typing.Optional[Element]: ...
    def get_by_name(self, name: str) -> typing.Optional[Element]: ...
    def get_by_name_recurse_up(self, name: str) -> typing.Optional[Element]: ...
    def get_suppressed_flags(self) -> ElementFlags: ...
    def iterate_all_by_element_factory_name(
        self, factory_name: str
    ) -> Iterator[Element]: ...
    def iterate_all_by_interface(self, iface: typing.Type[typing.Any]) -> Iterator: ...
    def iterate_elements(self) -> Iterator[Element]: ...
    def iterate_recurse(self) -> Iterator[Element]: ...
    def iterate_sinks(self) -> Iterator[Element]: ...
    def iterate_sorted(self) -> Iterator[Element]: ...
    def iterate_sources(self) -> Iterator[Element]: ...
    def make_and_add(
        self, factoryname: str, name: typing.Optional[str] = None
    ) -> Element:
        """
        :raises Gst.AddError:
        """
    @classmethod
    def new(cls, name: typing.Optional[str] = None) -> Bin: ...
    def recalculate_latency(self) -> bool: ...
    def remove(self, element: Element) -> bool: ...
    def set_suppressed_flags(self, flags: ElementFlags) -> None: ...
    def sync_children_states(self) -> bool: ...

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

    ::

        BinClass()
    """

    parent_class: ElementClass = ...
    pool: GLib.ThreadPool = ...
    element_added: typing.Callable[[Bin, Element], None] = ...
    element_removed: typing.Callable[[Bin, Element], None] = ...
    add_element: typing.Callable[[Bin, Element], bool] = ...
    remove_element: typing.Callable[[Bin, Element], bool] = ...
    handle_message: typing.Callable[[Bin, Message], None] = ...
    do_latency: typing.Callable[[Bin], bool] = ...
    deep_element_added: typing.Callable[[Bin, Bin, Element], None] = ...
    deep_element_removed: typing.Callable[[Bin, Bin, Element], None] = ...

class BinPrivate(GObject.GPointer): ...

class Bitmask:
    """
    :Constructors:

    ::

        Bitmask(**properties)
    """

    v: int

    def __init__(self, v: int) -> None: ...

class Buffer(MiniObjectMixin, GObject.GBoxed):
    """
    :Constructors:

    ::

        Buffer()
        new() -> Gst.Buffer
        new_allocate(allocator:Gst.Allocator=None, size:int, params:Gst.AllocationParams=None) -> Gst.Buffer or None
        new_memdup(data:list) -> Gst.Buffer
        new_wrapped(data:list) -> Gst.Buffer
        new_wrapped_bytes(bytes:GLib.Bytes) -> Gst.Buffer
        new_wrapped_full(flags:Gst.MemoryFlags, data:list, maxsize:int, offset:int, user_data=None, notify:GLib.DestroyNotify=None) -> Gst.Buffer
    """

    mini_object: MiniObject = ...
    pool: BufferPool = ...
    pts: int = ...
    dts: int = ...
    duration: int = ...
    offset: int = ...
    offset_end: int = ...
    flags = ...  # FIXME: Constant is missing typing annotation

    @staticmethod
    def __new__(cls: type[Self]) -> Self: ...
    def add_custom_meta(self, name: str) -> typing.Optional[CustomMeta]: ...
    def add_meta(self, info: MetaInfo, params: None) -> typing.Optional[Meta]: ...
    def add_parent_buffer_meta(
        self, ref: Buffer
    ) -> typing.Optional[ParentBufferMeta]: ...
    def add_protection_meta(self, info: Structure) -> ProtectionMeta: ...
    def add_reference_timestamp_meta(
        self, reference: Caps, timestamp: int, duration: int
    ) -> typing.Optional[ReferenceTimestampMeta]: ...
    def append(self, buf2: Buffer) -> Buffer: ...
    def append_memory(self, mem: Memory) -> None: ...
    def append_region(self, buf2: Buffer, offset: int, size: int) -> Buffer: ...
    def copy_deep(self) -> typing.Optional[Buffer]: ...
    def copy_into(
        self, src: Buffer, flags: BufferCopyFlags, offset: int, size: int
    ) -> bool: ...
    def copy_region(
        self, flags: BufferCopyFlags, offset: int, size: int
    ) -> typing.Optional[Buffer]: ...
    def extract(self, offset: int) -> typing.Tuple[int, bytes]: ...
    def extract_dup(self, offset: int, size: int) -> bytes: ...
    def fill(self, offset: int, src: typing.Sequence[int]) -> int: ...
    def find_memory(
        self, offset: int, size: int
    ) -> typing.Tuple[bool, int, int, int]: ...
    def foreach_meta(
        self,
        func: typing.Callable[..., typing.Tuple[bool, Meta]],
        *user_data: typing.Any,
    ) -> bool: ...
    def get_all_memory(self) -> typing.Optional[Memory]: ...
    def get_custom_meta(self, name: str) -> typing.Optional[CustomMeta]: ...
    def get_flags(self) -> BufferFlags: ...
    @staticmethod
    def get_max_memory() -> int: ...
    def get_memory(self, idx: int) -> typing.Optional[Memory]: ...
    def get_memory_range(self, idx: int, length: int) -> typing.Optional[Memory]: ...
    def get_meta(self, api: typing.Type[typing.Any]) -> typing.Optional[Meta]: ...
    def get_n_meta(self, api_type: typing.Type[typing.Any]) -> int: ...
    def get_reference_timestamp_meta(
        self, reference: typing.Optional[Caps] = None
    ) -> typing.Optional[ReferenceTimestampMeta]: ...
    def get_size(self) -> int: ...
    def get_sizes(self) -> typing.Tuple[int, int, int]: ...
    def get_sizes_range(self, idx: int, length: int) -> typing.Tuple[int, int, int]: ...
    def has_flags(self, flags: BufferFlags) -> bool: ...
    def insert_memory(self, idx: int, mem: Memory) -> None: ...
    def is_all_memory_writable(self) -> bool: ...
    def is_memory_range_writable(self, idx: int, length: int) -> bool: ...
    def map(self, flags: MapFlags) -> MapInfo: ...
    def map_range(self, idx: int, length: int, flags: MapFlags) -> MapInfo: ...
    def memcmp(self, offset: int, mem: typing.Sequence[int]) -> int: ...
    def memset(self, offset: int, val: int, size: int) -> int: ...
    def n_memory(self) -> int: ...
    @classmethod
    def new(cls) -> Buffer: ...
    @classmethod
    def new_allocate(
        cls,
        allocator: typing.Optional[Allocator],
        size: int,
        params: typing.Optional[AllocationParams] = None,
    ) -> typing.Optional[Buffer]: ...
    @classmethod
    def new_memdup(cls, data: typing.Sequence[int]) -> Buffer: ...
    @classmethod
    def new_wrapped(cls, data: typing.Sequence[int]) -> Buffer: ...
    @classmethod
    def new_wrapped_bytes(cls, bytes: GLib.Bytes) -> Buffer: ...
    @classmethod
    def new_wrapped_full(
        cls,
        flags: MemoryFlags,
        data: typing.Sequence[int],
        maxsize: int,
        offset: int,
        notify: typing.Optional[typing.Callable[..., None]] = None,
        *user_data: typing.Any,
    ) -> Buffer: ...
    def peek_memory(self, idx: int) -> typing.Optional[Memory]: ...
    def prepend_memory(self, mem: Memory) -> None: ...
    def remove_all_memory(self) -> None: ...
    def remove_memory(self, idx: int) -> None: ...
    def remove_memory_range(self, idx: int, length: int) -> None: ...
    def remove_meta(self, meta: Meta) -> bool: ...
    def replace_all_memory(self, mem: Memory) -> None: ...
    def replace_memory(self, idx: int, mem: Memory) -> None: ...
    def replace_memory_range(self, idx: int, length: int, mem: Memory) -> None: ...
    def resize(self, offset: int, size: int) -> None: ...
    def resize_range(self, idx: int, length: int, offset: int, size: int) -> bool: ...
    def set_flags(self, flags: BufferFlags) -> bool: ...
    def set_size(self, size: int) -> None: ...
    def unmap(self, mapinfo: MapInfo) -> bool: ...
    def unset_flags(self, flags: BufferFlags) -> bool: ...

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

    ::

        new() -> Gst.BufferList
        new_sized(size:int) -> Gst.BufferList
    """
    @staticmethod
    def __new__(cls: type[Self]) -> Self: ...
    def calculate_size(self) -> int: ...
    def copy_deep(self) -> BufferList: ...
    def foreach(
        self,
        func: typing.Callable[..., typing.Tuple[bool, Buffer]],
        *user_data: typing.Any,
    ) -> bool: ...
    def get(self, idx: int) -> Buffer: ...
    def get_writable(self, idx: int) -> Buffer: ...
    def insert(self, idx: int, buffer: Buffer) -> None: ...
    def length(self) -> int: ...
    @classmethod
    def new(cls) -> BufferList: ...
    @classmethod
    def new_sized(cls, size: int) -> BufferList: ...
    def remove(self, idx: int, length: int) -> None: ...
    @staticmethod
    def replace(
        new_list: typing.Optional[BufferList] = None,
    ) -> typing.Tuple[bool, BufferList]: ...
    @staticmethod
    def take(
        new_list: typing.Optional[BufferList] = None,
    ) -> typing.Tuple[bool, BufferList]: ...

class BufferPool(Object):
    """
    :Constructors:

    ::

        BufferPool(**properties)
        new() -> Gst.BufferPool

    Object GstBufferPool

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    flushing: int = ...
    priv: BufferPoolPrivate = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def acquire_buffer(
        self, params: typing.Optional[BufferPoolAcquireParams] = None
    ) -> typing.Tuple[FlowReturn, Buffer]: ...
    @staticmethod
    def config_add_option(config: Structure, option: str) -> None: ...
    @staticmethod
    def config_get_allocator(
        config: Structure,
    ) -> typing.Tuple[bool, Allocator, AllocationParams]: ...
    @staticmethod
    def config_get_option(config: Structure, index: int) -> typing.Optional[str]: ...
    @staticmethod
    def config_get_params(
        config: Structure,
    ) -> typing.Tuple[bool, Caps, int, int, int]: ...
    @staticmethod
    def config_has_option(config: Structure, option: str) -> bool: ...
    @staticmethod
    def config_n_options(config: Structure) -> int: ...
    @staticmethod
    def config_set_allocator(
        config: Structure,
        allocator: typing.Optional[Allocator] = None,
        params: typing.Optional[AllocationParams] = None,
    ) -> None: ...
    @staticmethod
    def config_set_params(
        config: Structure,
        caps: typing.Optional[Caps],
        size: int,
        min_buffers: int,
        max_buffers: int,
    ) -> None: ...
    @staticmethod
    def config_validate_params(
        config: Structure,
        caps: typing.Optional[Caps],
        size: int,
        min_buffers: int,
        max_buffers: int,
    ) -> bool: ...
    def do_acquire_buffer(
        self, params: typing.Optional[BufferPoolAcquireParams] = None
    ) -> typing.Tuple[FlowReturn, Buffer]: ...
    def do_alloc_buffer(
        self, params: typing.Optional[BufferPoolAcquireParams] = None
    ) -> typing.Tuple[FlowReturn, Buffer]: ...
    def do_flush_start(self) -> None: ...
    def do_flush_stop(self) -> None: ...
    def do_free_buffer(self, buffer: Buffer) -> None: ...
    def do_get_options(self) -> list[str]: ...
    def do_release_buffer(self, buffer: Buffer) -> None: ...
    def do_reset_buffer(self, buffer: Buffer) -> None: ...
    def do_set_config(self, config: Structure) -> bool: ...
    def do_start(self) -> bool: ...
    def do_stop(self) -> bool: ...
    def get_config(self) -> Structure: ...
    def get_options(self) -> list[str]: ...
    def has_option(self, option: str) -> bool: ...
    def is_active(self) -> bool: ...
    @classmethod
    def new(cls) -> BufferPool: ...
    def release_buffer(self, buffer: Buffer) -> None: ...
    def set_active(self, active: bool) -> bool: ...
    def set_config(self, config: Structure) -> bool: ...
    def set_flushing(self, flushing: bool) -> None: ...

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

    ::

        BufferPoolAcquireParams()
    """

    format: Format = ...
    start: int = ...
    stop: int = ...
    flags: BufferPoolAcquireFlags = ...

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

    ::

        BufferPoolClass()
    """

    object_class: ObjectClass = ...
    get_options: typing.Callable[[BufferPool], list[str]] = ...
    set_config: typing.Callable[[BufferPool, Structure], bool] = ...
    start: typing.Callable[[BufferPool], bool] = ...
    stop: typing.Callable[[BufferPool], bool] = ...
    acquire_buffer: typing.Callable[
        [BufferPool, typing.Optional[BufferPoolAcquireParams]],
        typing.Tuple[FlowReturn, Buffer],
    ] = ...
    alloc_buffer: typing.Callable[
        [BufferPool, typing.Optional[BufferPoolAcquireParams]],
        typing.Tuple[FlowReturn, Buffer],
    ] = ...
    reset_buffer: typing.Callable[[BufferPool, Buffer], None] = ...
    release_buffer: typing.Callable[[BufferPool, Buffer], None] = ...
    free_buffer: typing.Callable[[BufferPool, Buffer], None] = ...
    flush_start: typing.Callable[[BufferPool], None] = ...
    flush_stop: typing.Callable[[BufferPool], None] = ...

class BufferPoolPrivate(GObject.GPointer): ...

class Bus(Object):
    """
    :Constructors:

    ::

        Bus(**properties)
        new() -> Gst.Bus

    Object GstBus

    Signals from GstBus:
      sync-message (GstMessage)
      message (GstMessage)

    Properties from GstBus:
      enable-async -> gboolean: Enable Async
        Enable async message delivery for bus watches and gst_bus_pop()

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]
        enable_async: bool

    props: Props = ...
    object: Object = ...
    priv: BusPrivate = ...
    def __init__(
        self,
        *,
        enable_async: bool = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def add_signal_watch(self) -> None: ...
    def add_signal_watch_full(self, priority: int) -> None: ...
    def add_watch(
        self, priority: int, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> int: ...
    def async_signal_func(self, message: Message, data: None) -> bool: ...
    def create_watch(self) -> typing.Optional[GLib.Source]: ...
    def disable_sync_message_emission(self) -> None: ...
    def do_message(self, message: Message) -> None: ...
    def do_sync_message(self, message: Message) -> None: ...
    def enable_sync_message_emission(self) -> None: ...
    def get_pollfd(self) -> GLib.PollFD: ...
    def have_pending(self) -> bool: ...
    @classmethod
    def new(cls) -> Bus: ...
    def peek(self) -> typing.Optional[Message]: ...
    def poll(self, events: MessageType, timeout: int) -> typing.Optional[Message]: ...
    def pop(self) -> typing.Optional[Message]: ...
    def pop_filtered(self, types: MessageType) -> typing.Optional[Message]: ...
    def post(self, message: Message) -> bool: ...
    def remove_signal_watch(self) -> None: ...
    def remove_watch(self) -> bool: ...
    def set_flushing(self, flushing: bool) -> None: ...
    def set_sync_handler(
        self,
        func: typing.Optional[typing.Callable[..., BusSyncReply]] = None,
        *user_data: typing.Any,
    ) -> None: ...
    def sync_signal_handler(self, message: Message, data: None) -> BusSyncReply: ...
    def timed_pop(self, timeout: int) -> typing.Optional[Message]: ...
    def timed_pop_filtered(
        self, timeout: int, types: MessageType
    ) -> typing.Optional[Message]: ...

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

    ::

        BusClass()
    """

    parent_class: ObjectClass = ...
    message: typing.Callable[[Bus, Message], None] = ...
    sync_message: typing.Callable[[Bus, Message], None] = ...

class BusPrivate(GObject.GPointer): ...

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

    ::

        ByteArrayInterface()
    """

    data: int = ...
    len: int = ...
    resize: typing.Callable[[ByteArrayInterface, int], bool] = ...

class Caps(MiniObjectMixin, GObject.GBoxed):
    """
    :Constructors:

    ::

        Caps()
        new_any() -> Gst.Caps
        new_empty() -> Gst.Caps
        new_empty_simple(media_type:str) -> Gst.Caps
        new_id_str_empty_simple(media_type:Gst.IdStr) -> Gst.Caps
        new_static_str_empty_simple(media_type:str) -> Gst.Caps
    """

    mini_object: MiniObject = ...
    def __getitem__(self, index: int) -> Structure: ...
    def __len__(self) -> int: ...
    @staticmethod
    def __new__(
        cls: type[Self],
        arg: typing.Optional[
            typing.Union[str, Caps, Structure, list[Structure], tuple[Structure, ...]]
        ] = None,
    ) -> Self: ...
    def append(self, caps2: Caps) -> None: ...
    def append_structure(self, structure: Structure) -> None: ...
    def append_structure_full(
        self, structure: Structure, features: typing.Optional[CapsFeatures] = None
    ) -> None: ...
    def can_intersect(self, caps2: Caps) -> bool: ...
    def copy(self) -> Caps: ...
    def copy_nth(self, nth: int) -> Caps: ...
    def filter_and_map_in_place(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> None: ...
    def fixate(self) -> Caps: ...
    def foreach(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    @staticmethod
    def from_string(string: str) -> typing.Optional[Caps]: ...
    def get_features(self, index: int) -> typing.Optional[CapsFeatures]: ...
    def get_size(self) -> int: ...
    def get_structure(self, index: int) -> Structure: ...
    def id_str_set_value(self, field: IdStr, value: typing.Any) -> None: ...
    def intersect(self, caps2: Caps) -> Caps: ...
    def intersect_full(self, caps2: Caps, mode: CapsIntersectMode) -> Caps: ...
    def is_always_compatible(self, caps2: Caps) -> bool: ...
    def is_any(self) -> bool: ...
    def is_empty(self) -> bool: ...
    def is_equal(self, caps2: Caps) -> bool: ...
    def is_equal_fixed(self, caps2: Caps) -> bool: ...
    def is_fixed(self) -> bool: ...
    def is_strictly_equal(self, caps2: Caps) -> bool: ...
    def is_subset(self, superset: Caps) -> bool: ...
    def is_subset_structure(self, structure: Structure) -> bool: ...
    def is_subset_structure_full(
        self, structure: Structure, features: typing.Optional[CapsFeatures] = None
    ) -> bool: ...
    def map_in_place(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def merge(self, caps2: Caps) -> Caps: ...
    def merge_structure(self, structure: Structure) -> Caps: ...
    def merge_structure_full(
        self, structure: Structure, features: typing.Optional[CapsFeatures] = None
    ) -> Caps: ...
    @classmethod
    def new_any(cls) -> Caps: ...
    @classmethod
    def new_empty(cls) -> Caps: ...
    @classmethod
    def new_empty_simple(cls, media_type: str) -> Caps: ...
    @classmethod
    def new_id_str_empty_simple(cls, media_type: IdStr) -> Caps: ...
    @classmethod
    def new_static_str_empty_simple(cls, media_type: str) -> Caps: ...
    def normalize(self) -> Caps: ...
    def remove_structure(self, idx: int) -> None: ...
    def serialize(self, flags: SerializeFlags) -> str: ...
    def set_features(
        self, index: int, features: typing.Optional[CapsFeatures] = None
    ) -> None: ...
    def set_features_simple(
        self, features: typing.Optional[CapsFeatures] = None
    ) -> None: ...
    def set_value(self, field: str, value: typing.Any) -> None: ...
    def set_value_static_str(self, field: str, value: typing.Any) -> None: ...
    def simplify(self) -> Caps: ...
    def steal_structure(self, index: int) -> typing.Optional[Structure]: ...
    def subtract(self, subtrahend: Caps) -> Caps: ...
    def to_string(self) -> str: ...
    def truncate(self) -> Caps: ...
    def writable_structure(self, index: int) -> StructureContextManager: ...

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

    ::

        new_any() -> Gst.CapsFeatures
        new_empty() -> Gst.CapsFeatures
        new_single(feature:str) -> Gst.CapsFeatures
        new_single_static_str(feature:str) -> Gst.CapsFeatures
    """
    def add(self, feature: str) -> None: ...
    def add_id(self, feature: int) -> None: ...
    def add_id_str(self, feature: IdStr) -> None: ...
    def add_static_str(self, feature: str) -> None: ...
    def contains(self, feature: str) -> bool: ...
    def contains_id(self, feature: int) -> bool: ...
    def contains_id_str(self, feature: IdStr) -> bool: ...
    def copy(self) -> CapsFeatures: ...
    def free(self) -> None: ...
    @staticmethod
    def from_string(features: str) -> typing.Optional[CapsFeatures]: ...
    def get_nth(self, i: int) -> typing.Optional[str]: ...
    def get_nth_id(self, i: int) -> int: ...
    def get_nth_id_str(self, i: int) -> IdStr: ...
    def get_size(self) -> int: ...
    def is_any(self) -> bool: ...
    def is_equal(self, features2: CapsFeatures) -> bool: ...
    @classmethod
    def new_any(cls) -> CapsFeatures: ...
    @classmethod
    def new_empty(cls) -> CapsFeatures: ...
    @classmethod
    def new_single(cls, feature: str) -> CapsFeatures: ...
    @classmethod
    def new_single_static_str(cls, feature: str) -> CapsFeatures: ...
    def remove(self, feature: str) -> None: ...
    def remove_id(self, feature: int) -> None: ...
    def remove_id_str(self, feature: IdStr) -> None: ...
    def set_parent_refcount(self, refcount: int) -> bool: ...
    def to_string(self) -> str: ...

class ChildProxy(GObject.GInterface):
    """
    Interface GstChildProxy

    Signals from GObject:
      notify (GParam)
    """
    def child_added(self, child: GObject.Object, name: str) -> None: ...
    def child_removed(self, child: GObject.Object, name: str) -> None: ...
    def get_child_by_index(self, index: int) -> typing.Optional[GObject.Object]: ...
    def get_child_by_name(self, name: str) -> typing.Optional[GObject.Object]: ...
    def get_child_by_name_recurse(
        self, name: str
    ) -> typing.Optional[GObject.Object]: ...
    def get_children_count(self) -> int: ...
    def get_property(self, name: str) -> typing.Any: ...
    def lookup(
        self, name: str
    ) -> typing.Tuple[bool, GObject.Object, GObject.ParamSpec]: ...
    def set_property(self, name: str, value: typing.Any) -> None: ...

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

    ::

        ChildProxyInterface()
    """

    parent: GObject.TypeInterface = ...
    get_child_by_name: typing.Callable[
        [ChildProxy, str], typing.Optional[GObject.Object]
    ] = ...
    get_child_by_index: typing.Callable[
        [ChildProxy, int], typing.Optional[GObject.Object]
    ] = ...
    get_children_count: typing.Callable[[ChildProxy], int] = ...
    child_added: typing.Callable[[ChildProxy, GObject.Object, str], None] = ...
    child_removed: typing.Callable[[ChildProxy, GObject.Object, str], None] = ...

class Clock(Object):
    """
    :Constructors:

    ::

        Clock(**properties)

    Object GstClock

    Signals from GstClock:
      synced (gboolean)

    Properties from GstClock:
      window-size -> gint: Window size
        The size of the window used to calculate rate and offset
      window-threshold -> gint: Window threshold
        The threshold to start calculating rate and offset
      timeout -> guint64: Timeout
        The amount of time, in nanoseconds, to sample master and slave clocks

    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(Object.Props):
        timeout: int
        window_size: int
        window_threshold: int
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    priv: ClockPrivate = ...
    def __init__(
        self,
        *,
        timeout: int = ...,
        window_size: int = ...,
        window_threshold: int = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def add_observation(
        self, observation_internal: int, observation_external: int
    ) -> typing.Tuple[bool, float]: ...
    def add_observation_unapplied(
        self, observation_internal: int, observation_external: int
    ) -> typing.Tuple[bool, float, int, int, int, int]: ...
    def adjust_unlocked(self, internal: int) -> int: ...
    def adjust_with_calibration(
        self,
        internal_target: int,
        cinternal: int,
        cexternal: int,
        cnum: int,
        cdenom: int,
    ) -> int: ...
    def do_change_resolution(self, old_resolution: int, new_resolution: int) -> int: ...
    def do_get_internal_time(self) -> int: ...
    def do_get_resolution(self) -> int: ...
    def do_unschedule(self, entry: ClockEntry) -> None: ...
    def do_wait(self, entry: ClockEntry) -> typing.Tuple[ClockReturn, int]: ...
    def do_wait_async(self, entry: ClockEntry) -> ClockReturn: ...
    def get_calibration(self) -> typing.Tuple[int, int, int, int]: ...
    def get_internal_time(self) -> int: ...
    def get_master(self) -> typing.Optional[Clock]: ...
    def get_resolution(self) -> int: ...
    def get_time(self) -> int: ...
    def get_timeout(self) -> int: ...
    @staticmethod
    def id_compare_func(id1: None, id2: None) -> int: ...
    @staticmethod
    def id_get_clock(id: None) -> typing.Optional[Clock]: ...
    @staticmethod
    def id_get_time(id: None) -> int: ...
    @staticmethod
    def id_ref(id: None) -> None: ...
    @staticmethod
    def id_unref(id: None) -> None: ...
    @staticmethod
    def id_unschedule(id: None) -> None: ...
    @staticmethod
    def id_uses_clock(id: None, clock: Clock) -> bool: ...
    @staticmethod
    def id_wait(id: None) -> typing.Tuple[ClockReturn, int]: ...
    @staticmethod
    def id_wait_async(
        id: None, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> ClockReturn: ...
    def is_synced(self) -> bool: ...
    def new_periodic_id(self, start_time: int, interval: int) -> None: ...
    def new_single_shot_id(self, time: int) -> None: ...
    def periodic_id_reinit(self, id: None, start_time: int, interval: int) -> bool: ...
    def set_calibration(
        self, internal: int, external: int, rate_num: int, rate_denom: int
    ) -> None: ...
    def set_master(self, master: typing.Optional[Clock] = None) -> bool: ...
    def set_resolution(self, resolution: int) -> int: ...
    def set_synced(self, synced: bool) -> None: ...
    def set_timeout(self, timeout: int) -> None: ...
    def single_shot_id_reinit(self, id: None, time: int) -> bool: ...
    def unadjust_unlocked(self, external: int) -> int: ...
    def unadjust_with_calibration(
        self,
        external_target: int,
        cinternal: int,
        cexternal: int,
        cnum: int,
        cdenom: int,
    ) -> int: ...
    def wait_for_sync(self, timeout: int) -> bool: ...

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

    ::

        ClockClass()
    """

    parent_class: ObjectClass = ...
    change_resolution: typing.Callable[[Clock, int, int], int] = ...
    get_resolution: typing.Callable[[Clock], int] = ...
    get_internal_time: typing.Callable[[Clock], int] = ...
    wait: typing.Callable[[Clock, ClockEntry], typing.Tuple[ClockReturn, int]] = ...
    wait_async: typing.Callable[[Clock, ClockEntry], ClockReturn] = ...
    unschedule: typing.Callable[[Clock, ClockEntry], None] = ...

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

    ::

        ClockEntry()
    """

    refcount: int = ...
    clock: Clock = ...
    type: ClockEntryType = ...
    time: int = ...
    interval: int = ...
    status: ClockReturn = ...
    func: typing.Callable[..., bool] = ...
    user_data: None = ...
    destroy_data: typing.Callable[[None], None] = ...
    unscheduled: bool = ...
    woken_up: bool = ...

class ClockPrivate(GObject.GPointer): ...

class Context(MiniObjectMixin, GObject.GBoxed):
    """
    :Constructors:

    ::

        new(context_type:str, persistent:bool) -> Gst.Context
    """
    @staticmethod
    def __new__(cls: type[Self], context_type: str, persistent: bool) -> Self: ...
    def copy(self) -> Context: ...
    def get_context_type(self) -> str: ...
    def get_structure(self) -> Structure: ...
    def has_context_type(self, context_type: str) -> bool: ...
    def is_persistent(self) -> bool: ...
    @classmethod
    def new(cls, context_type: str, persistent: bool) -> Context: ...
    def ref(self) -> Context: ...
    @staticmethod
    def replace(
        new_context: typing.Optional[Context] = None,
    ) -> typing.Tuple[bool, Context]: ...
    def unref(self) -> None: ...
    def writable_structure(self) -> StructureContextManager: ...

class ControlBinding(Object):
    """
    :Constructors:

    ::

        ControlBinding(**properties)

    Object GstControlBinding

    Properties from GstControlBinding:
      object -> GstObject: Object
        The object of the property
      name -> gchararray: Name
        The name of the property

    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(Object.Props):
        name: str
        object: Object
        parent: typing.Optional[Object]

    props: Props = ...
    parent: Object = ...
    name: str = ...
    pspec: GObject.ParamSpec = ...
    object: Object = ...
    disabled: bool = ...
    def __init__(
        self, *, name: str = ..., object: Object = ..., parent: Object = ...
    ) -> None: ...
    def do_get_g_value_array(
        self, timestamp: int, interval: int, values: typing.Sequence[typing.Any]
    ) -> bool: ...
    def do_get_value(self, timestamp: int) -> typing.Optional[typing.Any]: ...
    def do_sync_values(
        self, object: Object, timestamp: int, last_sync: int
    ) -> bool: ...
    def get_g_value_array(
        self, timestamp: int, interval: int, values: typing.Sequence[typing.Any]
    ) -> bool: ...
    def get_value(self, timestamp: int) -> typing.Optional[typing.Any]: ...
    def is_disabled(self) -> bool: ...
    def set_disabled(self, disabled: bool) -> None: ...
    def sync_values(self, object: Object, timestamp: int, last_sync: int) -> bool: ...

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

    ::

        ControlBindingClass()
    """

    parent_class: ObjectClass = ...
    sync_values: typing.Callable[[ControlBinding, Object, int, int], bool] = ...
    get_value: typing.Callable[[ControlBinding, int], typing.Optional[typing.Any]] = ...
    get_value_array: None = ...
    get_g_value_array: typing.Callable[
        [ControlBinding, int, int, typing.Sequence[typing.Any]], bool
    ] = ...

class ControlBindingPrivate(GObject.GPointer): ...

class ControlSource(Object):
    """
    :Constructors:

    ::

        ControlSource(**properties)

    Object GstControlSource

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    parent: Object = ...
    get_value: typing.Callable[[ControlSource, int, float], bool] = ...
    get_value_array: typing.Callable[[ControlSource, int, int, int, float], bool] = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def control_source_get_value(self, timestamp: int) -> typing.Tuple[bool, float]: ...
    def control_source_get_value_array(
        self, timestamp: int, interval: int, values: typing.Sequence[float]
    ) -> bool: ...

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

    ::

        ControlSourceClass()
    """

    parent_class: ObjectClass = ...

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

    ::

        CustomMeta()
    """

    meta: Meta = ...
    structure: Structure = ...
    def get_structure(self) -> Structure: ...
    def has_name(self, name: str) -> bool: ...

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

    ::

        new(tzoffset:float, year:int, month:int, day:int, hour:int, minute:int, seconds:float) -> Gst.DateTime or None
        new_from_g_date_time(dt:GLib.DateTime=None) -> Gst.DateTime or None
        new_from_iso8601_string(string:str) -> Gst.DateTime or None
        new_from_unix_epoch_local_time(secs:int) -> Gst.DateTime or None
        new_from_unix_epoch_local_time_usecs(usecs:int) -> Gst.DateTime or None
        new_from_unix_epoch_utc(secs:int) -> Gst.DateTime or None
        new_from_unix_epoch_utc_usecs(usecs:int) -> Gst.DateTime or None
        new_local_time(year:int, month:int, day:int, hour:int, minute:int, seconds:float) -> Gst.DateTime or None
        new_now_local_time() -> Gst.DateTime or None
        new_now_utc() -> Gst.DateTime or None
        new_y(year:int) -> Gst.DateTime or None
        new_ym(year:int, month:int) -> Gst.DateTime or None
        new_ymd(year:int, month:int, day:int) -> Gst.DateTime or None
    """
    @staticmethod
    def __new__(
        cls: type[Self],
        tzoffset: float,
        year: int,
        month: int,
        day: int,
        hour: int,
        minute: int,
        seconds: float,
    ) -> Self: ...
    def get_day(self) -> int: ...
    def get_hour(self) -> int: ...
    def get_microsecond(self) -> int: ...
    def get_minute(self) -> int: ...
    def get_month(self) -> int: ...
    def get_second(self) -> int: ...
    def get_time_zone_offset(self) -> float: ...
    def get_year(self) -> int: ...
    def has_day(self) -> bool: ...
    def has_month(self) -> bool: ...
    def has_second(self) -> bool: ...
    def has_time(self) -> bool: ...
    def has_year(self) -> bool: ...
    @classmethod
    def new(
        cls,
        tzoffset: float,
        year: int,
        month: int,
        day: int,
        hour: int,
        minute: int,
        seconds: float,
    ) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_from_g_date_time(
        cls, dt: typing.Optional[GLib.DateTime] = None
    ) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_from_iso8601_string(cls, string: str) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_from_unix_epoch_local_time(cls, secs: int) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_from_unix_epoch_local_time_usecs(
        cls, usecs: int
    ) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_from_unix_epoch_utc(cls, secs: int) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_from_unix_epoch_utc_usecs(cls, usecs: int) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_local_time(
        cls, year: int, month: int, day: int, hour: int, minute: int, seconds: float
    ) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_now_local_time(cls) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_now_utc(cls) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_y(cls, year: int) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_ym(cls, year: int, month: int) -> typing.Optional[DateTime]: ...
    @classmethod
    def new_ymd(cls, year: int, month: int, day: int) -> typing.Optional[DateTime]: ...
    def ref(self) -> DateTime: ...
    def to_g_date_time(self) -> typing.Optional[GLib.DateTime]: ...
    def to_iso8601_string(self) -> typing.Optional[str]: ...
    def unref(self) -> None: ...

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

    ::

        DebugCategory()
    """

    threshold: int = ...
    color: int = ...
    name: str = ...
    description: str = ...
    def free(self) -> None: ...
    def get_color(self) -> int: ...
    def get_description(self) -> str: ...
    def get_name(self) -> str: ...
    def get_threshold(self) -> DebugLevel: ...
    def reset_threshold(self) -> None: ...
    def set_threshold(self, level: DebugLevel) -> None: ...

class DebugMessage(GObject.GPointer):
    def get(self) -> typing.Optional[str]: ...
    def get_id(self) -> typing.Optional[str]: ...

class Device(Object):
    """
    :Constructors:

    ::

        Device(**properties)

    Object GstDevice

    Signals from GstDevice:
      removed ()

    Properties from GstDevice:
      display-name -> gchararray: Display Name
        The user-friendly name of the device
      caps -> GstCaps: Device Caps
        The possible caps of a device
      device-class -> gchararray: Device Class
        The Class of the device
      properties -> GstStructure: Properties
        The extra properties of the device

    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(Object.Props):
        caps: typing.Optional[Caps]
        device_class: str
        display_name: str
        properties: typing.Optional[Structure]
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    parent: Object = ...
    priv: DevicePrivate = ...
    def __init__(
        self,
        *,
        caps: Caps = ...,
        device_class: str = ...,
        display_name: str = ...,
        properties: Structure = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def create_element(
        self, name: typing.Optional[str] = None
    ) -> typing.Optional[Element]: ...
    def do_create_element(
        self, name: typing.Optional[str] = None
    ) -> typing.Optional[Element]: ...
    def do_reconfigure_element(self, element: Element) -> bool: ...
    def get_caps(self) -> typing.Optional[Caps]: ...
    def get_device_class(self) -> str: ...
    def get_display_name(self) -> str: ...
    def get_properties(self) -> typing.Optional[Structure]: ...
    def has_classes(self, classes: str) -> bool: ...
    def has_classesv(self, classes: typing.Sequence[str]) -> bool: ...
    def reconfigure_element(self, element: Element) -> bool: ...

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

    ::

        DeviceClass()
    """

    parent_class: ObjectClass = ...
    create_element: typing.Callable[
        [Device, typing.Optional[str]], typing.Optional[Element]
    ] = ...
    reconfigure_element: typing.Callable[[Device, Element], bool] = ...

class DeviceMonitor(Object):
    """
    :Constructors:

    ::

        DeviceMonitor(**properties)
        new() -> Gst.DeviceMonitor

    Object GstDeviceMonitor

    Properties from GstDeviceMonitor:
      show-all -> gboolean: Show All
        Show all devices, even those from hidden providers

    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(Object.Props):
        show_all: bool
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    parent: Object = ...
    priv: DeviceMonitorPrivate = ...
    def __init__(
        self,
        *,
        show_all: bool = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def add_filter(
        self, classes: typing.Optional[str] = None, caps: typing.Optional[Caps] = None
    ) -> int: ...
    def get_bus(self) -> Bus: ...
    def get_devices(self) -> typing.Optional[list[Device]]: ...
    def get_providers(self) -> list[str]: ...
    def get_show_all_devices(self) -> bool: ...
    @classmethod
    def new(cls) -> DeviceMonitor: ...
    def remove_filter(self, filter_id: int) -> bool: ...
    def set_show_all_devices(self, show_all: bool) -> None: ...
    def start(self) -> bool: ...
    def stop(self) -> None: ...

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

    ::

        DeviceMonitorClass()
    """

    parent_class: ObjectClass = ...

class DeviceMonitorPrivate(GObject.GPointer): ...
class DevicePrivate(GObject.GPointer): ...

class DeviceProvider(Object):
    """
    :Constructors:

    ::

        DeviceProvider(**properties)

    Object GstDeviceProvider

    Signals from GstDeviceProvider:
      provider-hidden (gchararray)
      provider-unhidden (gchararray)

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    parent: Object = ...
    devices: list[None] = ...
    priv: DeviceProviderPrivate = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def add_metadata(self, key: str, value: str) -> None: ...
    def add_static_metadata(self, key: str, value: str) -> None: ...
    def can_monitor(self) -> bool: ...
    def device_add(self, device: Device) -> None: ...
    def device_changed(self, device: Device, changed_device: Device) -> None: ...
    def device_remove(self, device: Device) -> None: ...
    def do_start(self) -> bool: ...
    def do_stop(self) -> None: ...
    def get_bus(self) -> Bus: ...
    def get_devices(self) -> list[Device]: ...
    def get_factory(self) -> typing.Optional[DeviceProviderFactory]: ...
    def get_hidden_providers(self) -> list[str]: ...
    def get_metadata(self, key: str) -> str: ...
    def hide_provider(self, name: str) -> None: ...
    def is_started(self) -> bool: ...
    @staticmethod
    def register(
        plugin: typing.Optional[Plugin],
        name: str,
        rank: int,
        type: typing.Type[typing.Any],
    ) -> bool: ...
    def set_metadata(
        self, longname: str, classification: str, description: str, author: str
    ) -> None: ...
    def set_static_metadata(
        self, longname: str, classification: str, description: str, author: str
    ) -> None: ...
    def start(self) -> bool: ...
    def stop(self) -> None: ...
    def unhide_provider(self, name: str) -> None: ...

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

    ::

        DeviceProviderClass()
    """

    parent_class: ObjectClass = ...
    factory: DeviceProviderFactory = ...
    probe: None = ...
    start: typing.Callable[[DeviceProvider], bool] = ...
    stop: typing.Callable[[DeviceProvider], None] = ...
    metadata: None = ...
    def add_metadata(self, key: str, value: str) -> None: ...
    def add_static_metadata(self, key: str, value: str) -> None: ...
    def get_metadata(self, key: str) -> typing.Optional[str]: ...
    def set_metadata(
        self, longname: str, classification: str, description: str, author: str
    ) -> None: ...
    def set_static_metadata(
        self, longname: str, classification: str, description: str, author: str
    ) -> None: ...

class DeviceProviderFactory(PluginFeature):
    """
    :Constructors:

    ::

        DeviceProviderFactory(**properties)

    Object GstDeviceProviderFactory

    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(PluginFeature.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    @staticmethod
    def find(name: str) -> typing.Optional[DeviceProviderFactory]: ...
    def get(self) -> typing.Optional[DeviceProvider]: ...
    @staticmethod
    def get_by_name(factoryname: str) -> typing.Optional[DeviceProvider]: ...
    def get_device_provider_type(self) -> typing.Type[typing.Any]: ...
    def get_metadata(self, key: str) -> typing.Optional[str]: ...
    def get_metadata_keys(self) -> typing.Optional[list[str]]: ...
    def has_classes(self, classes: typing.Optional[str] = None) -> bool: ...
    def has_classesv(
        self, classes: typing.Optional[typing.Sequence[str]] = None
    ) -> bool: ...
    @staticmethod
    def list_get_device_providers(minrank: Rank) -> list[DeviceProviderFactory]: ...

class DeviceProviderFactoryClass(GObject.GPointer): ...
class DeviceProviderPrivate(GObject.GPointer): ...

class DoubleRange:
    """
    :Constructors:

    ::

        DoubleRange(**properties)
    """

    start: float
    stop: float

    def __init__(
        self, start: float, stop: float
    ): ...  # FIXME: Override is missing typing annotation

class DynamicTypeFactory(PluginFeature):
    """
    :Constructors:

    ::

        DynamicTypeFactory(**properties)

    Object GstDynamicTypeFactory

    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(PluginFeature.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    @staticmethod
    def load(factoryname: str) -> typing.Type[typing.Any]: ...

class DynamicTypeFactoryClass(GObject.GPointer): ...

class Element(Object):
    """
    :Constructors:

    ::

        Element(**properties)

    Object GstElement

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    state_lock: GLib.RecMutex = ...
    state_cond: GLib.Cond = ...
    state_cookie: int = ...
    target_state: State = ...
    current_state: State = ...
    next_state: State = ...
    pending_state: State = ...
    last_return: StateChangeReturn = ...
    bus: Bus = ...
    clock: Clock = ...
    base_time: int = ...
    start_time: int = ...
    numpads: int = ...
    pads: list[Pad] = ...
    numsrcpads: int = ...
    srcpads: list[Pad] = ...
    numsinkpads: int = ...
    sinkpads: list[Pad] = ...
    pads_cookie: int = ...
    contexts: list[Context] = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def abort_state(self) -> None: ...
    def add_metadata(self, key: str, value: str) -> None: ...
    def add_pad(self, pad: Pad) -> bool: ...
    def add_pad_template(self, templ: PadTemplate) -> None: ...
    def add_property_deep_notify_watch(
        self, property_name: typing.Optional[str], include_value: bool
    ) -> int: ...
    def add_property_notify_watch(
        self, property_name: typing.Optional[str], include_value: bool
    ) -> int: ...
    def add_static_metadata(self, key: str, value: str) -> None: ...
    def add_static_pad_template(self, static_templ: StaticPadTemplate) -> None: ...
    def add_static_pad_template_with_gtype(
        self, static_templ: StaticPadTemplate, pad_type: typing.Type[typing.Any]
    ) -> None: ...
    def call_async(
        self, func: typing.Callable[..., None], *user_data: typing.Any
    ) -> None: ...
    def change_state(self, transition: StateChange) -> StateChangeReturn: ...
    def continue_state(self, ret: StateChangeReturn) -> StateChangeReturn: ...
    def create_all_pads(self) -> None: ...
    def decorate_stream_id(self, stream_id: str) -> str: ...
    def do_change_state(self, transition: StateChange) -> StateChangeReturn: ...
    def do_get_state(
        self, timeout: int
    ) -> typing.Tuple[StateChangeReturn, State, State]: ...
    def do_no_more_pads(self) -> None: ...
    def do_pad_added(self, pad: Pad) -> None: ...
    def do_pad_removed(self, pad: Pad) -> None: ...
    def do_post_message(self, message: Message) -> bool: ...
    def do_provide_clock(self) -> typing.Optional[Clock]: ...
    def do_query(self, query: Query) -> bool: ...
    def do_release_pad(self, pad: Pad) -> None: ...
    def do_request_new_pad(
        self,
        templ: PadTemplate,
        name: typing.Optional[str] = None,
        caps: typing.Optional[Caps] = None,
    ) -> typing.Optional[Pad]: ...
    def do_send_event(self, event: Event) -> bool: ...
    def do_set_bus(self, bus: typing.Optional[Bus] = None) -> None: ...
    def do_set_clock(self, clock: typing.Optional[Clock] = None) -> bool: ...
    def do_set_context(self, context: Context) -> None: ...
    def do_set_state(self, state: State) -> StateChangeReturn: ...
    def do_state_changed(
        self, oldstate: State, newstate: State, pending: State
    ) -> None: ...
    def foreach_pad(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def foreach_sink_pad(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def foreach_src_pad(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def get_base_time(self) -> int: ...
    def get_bus(self) -> typing.Optional[Bus]: ...
    def get_clock(self) -> typing.Optional[Clock]: ...
    def get_compatible_pad(
        self, pad: Pad, caps: typing.Optional[Caps] = None
    ) -> typing.Optional[Pad]: ...
    def get_compatible_pad_template(
        self, compattempl: PadTemplate
    ) -> typing.Optional[PadTemplate]: ...
    def get_context(self, context_type: str) -> typing.Optional[Context]: ...
    def get_context_unlocked(self, context_type: str) -> typing.Optional[Context]: ...
    def get_contexts(self) -> list[Context]: ...
    def get_current_clock_time(self) -> int: ...
    def get_current_running_time(self) -> int: ...
    def get_factory(self) -> typing.Optional[ElementFactory]: ...
    def get_metadata(self, key: str) -> str: ...
    def get_pad_template(self, name: str) -> typing.Optional[PadTemplate]: ...
    def get_pad_template_list(self) -> list[PadTemplate]: ...
    def get_request_pad(self, name: str) -> typing.Optional[Pad]: ...
    def get_start_time(self) -> int: ...
    def get_state(
        self, timeout: int
    ) -> typing.Tuple[StateChangeReturn, State, State]: ...
    def get_static_pad(self, name: str) -> typing.Optional[Pad]: ...
    def is_locked_state(self) -> bool: ...
    def iterate_pads(self) -> Iterator[Gst.Pad]: ...
    def iterate_sink_pads(self) -> Iterator[Gst.Pad]: ...
    def iterate_src_pads(self) -> Iterator[Gst.Pad]: ...
    def link(self, dest: Element) -> bool: ...
    def link_filtered(
        self, dest: Element, filter: typing.Optional[Caps] = None
    ) -> bool: ...
    @staticmethod
    def link_many(*args: Element) -> None:
        """
        :raises Gst.LinkError
        """
    def link_pads(
        self,
        srcpadname: typing.Optional[str],
        dest: Element,
        destpadname: typing.Optional[str] = None,
    ) -> bool: ...
    def link_pads_filtered(
        self,
        srcpadname: typing.Optional[str],
        dest: Element,
        destpadname: typing.Optional[str] = None,
        filter: typing.Optional[Caps] = None,
    ) -> bool: ...
    def link_pads_full(
        self,
        srcpadname: typing.Optional[str],
        dest: Element,
        destpadname: typing.Optional[str],
        flags: PadLinkCheck,
    ) -> bool: ...
    def lost_state(self) -> None: ...
    @staticmethod
    def make_from_uri(
        type: URIType, uri: str, elementname: typing.Optional[str] = None
    ) -> Element: ...
    def message_full(
        self,
        type: MessageType,
        domain: int,
        code: int,
        text: typing.Optional[str],
        debug: typing.Optional[str],
        file: str,
        function: str,
        line: int,
    ) -> None: ...
    def message_full_with_details(
        self,
        type: MessageType,
        domain: int,
        code: int,
        text: typing.Optional[str],
        debug: typing.Optional[str],
        file: str,
        function: str,
        line: int,
        structure: Structure,
    ) -> None: ...
    def no_more_pads(self) -> None: ...
    def post_message(self, message: Message) -> bool: ...
    def provide_clock(self) -> typing.Optional[Clock]: ...
    def query(self, query: Query) -> bool: ...
    def query_convert(
        self, src_format: Format, src_val: int, dest_format: Format
    ) -> typing.Tuple[bool, int]: ...
    def query_duration(self, format: Format) -> typing.Tuple[bool, int]: ...
    def query_position(self, format: Format) -> typing.Tuple[bool, int]: ...
    @staticmethod
    def register(
        plugin: typing.Optional[Plugin],
        name: str,
        rank: int,
        type: typing.Type[typing.Any],
    ) -> bool: ...
    def release_request_pad(self, pad: Pad) -> None: ...
    def remove_pad(self, pad: Pad) -> bool: ...
    def remove_property_notify_watch(self, watch_id: int) -> None: ...
    def request_pad(
        self,
        templ: PadTemplate,
        name: typing.Optional[str] = None,
        caps: typing.Optional[Caps] = None,
    ) -> typing.Optional[Pad]: ...
    def request_pad_simple(self, name: str) -> typing.Optional[Pad]: ...
    def seek(
        self,
        rate: float,
        format: Format,
        flags: SeekFlags,
        start_type: SeekType,
        start: int,
        stop_type: SeekType,
        stop: int,
    ) -> bool: ...
    def seek_simple(
        self, format: Format, seek_flags: SeekFlags, seek_pos: int
    ) -> bool: ...
    def send_event(self, event: Event) -> bool: ...
    def set_base_time(self, time: int) -> None: ...
    def set_bus(self, bus: typing.Optional[Bus] = None) -> None: ...
    def set_clock(self, clock: typing.Optional[Clock] = None) -> bool: ...
    def set_context(self, context: Context) -> None: ...
    def set_locked_state(self, locked_state: bool) -> bool: ...
    def set_metadata(
        self, longname: str, classification: str, description: str, author: str
    ) -> None: ...
    def set_start_time(self, time: int) -> None: ...
    def set_state(self, state: State) -> StateChangeReturn: ...
    def set_static_metadata(
        self, longname: str, classification: str, description: str, author: str
    ) -> None: ...
    @staticmethod
    def state_change_return_get_name(state_ret: StateChangeReturn) -> str: ...
    @staticmethod
    def state_get_name(state: State) -> str: ...
    def sync_state_with_parent(self) -> bool: ...
    @staticmethod
    def type_set_skip_documentation(type: typing.Type[typing.Any]) -> None: ...
    def unlink(self, dest: Element) -> None: ...
    def unlink_pads(self, srcpadname: str, dest: Element, destpadname: str) -> None: ...

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

    ::

        ElementClass()
    """

    parent_class: ObjectClass = ...
    metadata: None = ...
    elementfactory: ElementFactory = ...
    padtemplates: list[None] = ...
    numpadtemplates: int = ...
    pad_templ_cookie: int = ...
    pad_added: typing.Callable[[Element, Pad], None] = ...
    pad_removed: typing.Callable[[Element, Pad], None] = ...
    no_more_pads: typing.Callable[[Element], None] = ...
    request_new_pad: typing.Callable[
        [Element, PadTemplate, typing.Optional[str], typing.Optional[Caps]],
        typing.Optional[Pad],
    ] = ...
    release_pad: typing.Callable[[Element, Pad], None] = ...
    get_state: typing.Callable[
        [Element, int], typing.Tuple[StateChangeReturn, State, State]
    ] = ...
    set_state: typing.Callable[[Element, State], StateChangeReturn] = ...
    change_state: typing.Callable[[Element, StateChange], StateChangeReturn] = ...
    state_changed: typing.Callable[[Element, State, State, State], None] = ...
    set_bus: typing.Callable[[Element, typing.Optional[Bus]], None] = ...
    provide_clock: typing.Callable[[Element], typing.Optional[Clock]] = ...
    set_clock: typing.Callable[[Element, typing.Optional[Clock]], bool] = ...
    send_event: typing.Callable[[Element, Event], bool] = ...
    query: typing.Callable[[Element, Query], bool] = ...
    post_message: typing.Callable[[Element, Message], bool] = ...
    set_context: typing.Callable[[Element, Context], None] = ...
    def add_metadata(self, key: str, value: str) -> None: ...
    def add_pad_template(self, templ: PadTemplate) -> None: ...
    def add_static_metadata(self, key: str, value: str) -> None: ...
    def add_static_pad_template(self, static_templ: StaticPadTemplate) -> None: ...
    def add_static_pad_template_with_gtype(
        self, static_templ: StaticPadTemplate, pad_type: typing.Type[typing.Any]
    ) -> None: ...
    def get_metadata(self, key: str) -> str: ...
    def get_pad_template(self, name: str) -> typing.Optional[PadTemplate]: ...
    def get_pad_template_list(self) -> list[PadTemplate]: ...
    def set_metadata(
        self, longname: str, classification: str, description: str, author: str
    ) -> None: ...
    def set_static_metadata(
        self, longname: str, classification: str, description: str, author: str
    ) -> None: ...

class ElementFactory(PluginFeature):
    """
    :Constructors:

    ::

        ElementFactory(**properties)

    Object GstElementFactory

    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(PluginFeature.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def can_sink_all_caps(self, caps: Caps) -> bool: ...
    def can_sink_any_caps(self, caps: Caps) -> bool: ...
    def can_src_all_caps(self, caps: Caps) -> bool: ...
    def can_src_any_caps(self, caps: Caps) -> bool: ...
    def create(self, name: typing.Optional[str] = None) -> typing.Optional[Element]: ...
    def create_with_properties(
        self,
        names: typing.Optional[typing.Sequence[str]] = None,
        values: typing.Optional[typing.Sequence[typing.Any]] = None,
    ) -> typing.Optional[Element]: ...
    @staticmethod
    def find(name: str) -> typing.Optional[ElementFactory]: ...
    def get_description(self) -> typing.Optional[str]: ...
    def get_element_type(self) -> typing.Type[typing.Any]: ...
    def get_klass(self) -> typing.Optional[str]: ...
    def get_longname(self) -> typing.Optional[str]: ...
    def get_metadata(self, key: str) -> typing.Optional[str]: ...
    def get_metadata_keys(self) -> typing.Optional[list[str]]: ...
    def get_num_pad_templates(self) -> int: ...
    def get_skip_documentation(self) -> bool: ...
    def get_static_pad_templates(self) -> list[StaticPadTemplate]: ...
    def get_uri_protocols(self) -> list[str]: ...
    def get_uri_type(self) -> URIType: ...
    def has_interface(self, interfacename: str) -> bool: ...
    @staticmethod
    def list_filter(
        list: list[ElementFactory],
        caps: Caps,
        direction: PadDirection,
        subsetonly: bool,
    ) -> list[ElementFactory]: ...
    @staticmethod
    def list_get_elements(type: int, minrank: Rank) -> list[ElementFactory]: ...
    def list_is_type(self, type: int) -> bool: ...
    @staticmethod
    def make(
        factoryname: str, name: typing.Optional[str] = None
    ) -> typing.Optional[Element]:
        """
        :raises Gst.PluginMissingError:
        """
    @staticmethod
    def make_with_properties(
        factoryname: str,
        names: typing.Optional[typing.Sequence[str]] = None,
        values: typing.Optional[typing.Sequence[typing.Any]] = None,
    ) -> typing.Optional[Element]: ...

class ElementFactoryClass(GObject.GPointer): ...

class Event(MiniObjectMixin, GObject.GBoxed):
    """
    :Constructors:

    ::

        Event()
        new_buffer_size(format:Gst.Format, minsize:int, maxsize:int, async_:bool) -> Gst.Event
        new_caps(caps:Gst.Caps) -> Gst.Event
        new_custom(type:Gst.EventType, structure:Gst.Structure) -> Gst.Event
        new_eos() -> Gst.Event
        new_flush_start() -> Gst.Event
        new_flush_stop(reset_time:bool) -> Gst.Event
        new_gap(timestamp:int, duration:int) -> Gst.Event
        new_instant_rate_change(rate_multiplier:float, new_flags:Gst.SegmentFlags) -> Gst.Event
        new_instant_rate_sync_time(rate_multiplier:float, running_time:int, upstream_running_time:int) -> Gst.Event
        new_latency(latency:int) -> Gst.Event
        new_navigation(structure:Gst.Structure) -> Gst.Event
        new_protection(system_id:str, data:Gst.Buffer, origin:str) -> Gst.Event
        new_qos(type:Gst.QOSType, proportion:float, diff:int, timestamp:int) -> Gst.Event
        new_reconfigure() -> Gst.Event
        new_seek(rate:float, format:Gst.Format, flags:Gst.SeekFlags, start_type:Gst.SeekType, start:int, stop_type:Gst.SeekType, stop:int) -> Gst.Event
        new_segment(segment:Gst.Segment) -> Gst.Event
        new_segment_done(format:Gst.Format, position:int) -> Gst.Event
        new_select_streams(streams:list) -> Gst.Event
        new_sink_message(name:str, msg:Gst.Message) -> Gst.Event
        new_step(format:Gst.Format, amount:int, rate:float, flush:bool, intermediate:bool) -> Gst.Event
        new_stream_collection(collection:Gst.StreamCollection) -> Gst.Event
        new_stream_group_done(group_id:int) -> Gst.Event
        new_stream_start(stream_id:str) -> Gst.Event
        new_tag(taglist:Gst.TagList) -> Gst.Event
        new_toc(toc:Gst.Toc, updated:bool) -> Gst.Event
        new_toc_select(uid:str) -> Gst.Event
    """

    mini_object: MiniObject = ...
    type: EventType = ...
    timestamp: int = ...
    seqnum: int = ...
    def copy_segment(self, segment: Segment) -> None: ...
    def get_running_time_offset(self) -> int: ...
    def get_seqnum(self) -> int: ...
    def get_structure(self) -> typing.Optional[Structure]: ...
    def has_name(self, name: str) -> bool: ...
    def has_name_id(self, name: int) -> bool: ...
    @classmethod
    def new_buffer_size(
        cls, format: Format, minsize: int, maxsize: int, async_: bool
    ) -> Event: ...
    @classmethod
    def new_caps(cls, caps: Caps) -> Event: ...
    @classmethod
    def new_custom(cls, type: EventType, structure: Structure) -> Event: ...
    @classmethod
    def new_eos(cls) -> Event: ...
    @classmethod
    def new_flush_start(cls) -> Event: ...
    @classmethod
    def new_flush_stop(cls, reset_time: bool) -> Event: ...
    @classmethod
    def new_gap(cls, timestamp: int, duration: int) -> Event: ...
    @classmethod
    def new_instant_rate_change(
        cls, rate_multiplier: float, new_flags: SegmentFlags
    ) -> Event: ...
    @classmethod
    def new_instant_rate_sync_time(
        cls, rate_multiplier: float, running_time: int, upstream_running_time: int
    ) -> Event: ...
    @classmethod
    def new_latency(cls, latency: int) -> Event: ...
    @classmethod
    def new_navigation(cls, structure: Structure) -> Event: ...
    @classmethod
    def new_protection(cls, system_id: str, data: Buffer, origin: str) -> Event: ...
    @classmethod
    def new_qos(
        cls, type: QOSType, proportion: float, diff: int, timestamp: int
    ) -> Event: ...
    @classmethod
    def new_reconfigure(cls) -> Event: ...
    @classmethod
    def new_seek(
        cls,
        rate: float,
        format: Format,
        flags: SeekFlags,
        start_type: SeekType,
        start: int,
        stop_type: SeekType,
        stop: int,
    ) -> Event: ...
    @classmethod
    def new_segment(cls, segment: Segment) -> Event: ...
    @classmethod
    def new_segment_done(cls, format: Format, position: int) -> Event: ...
    @classmethod
    def new_select_streams(cls, streams: list[str]) -> Event: ...
    @classmethod
    def new_sink_message(cls, name: str, msg: Message) -> Event: ...
    @classmethod
    def new_step(
        cls, format: Format, amount: int, rate: float, flush: bool, intermediate: bool
    ) -> Event: ...
    @classmethod
    def new_stream_collection(cls, collection: StreamCollection) -> Event: ...
    @classmethod
    def new_stream_group_done(cls, group_id: int) -> Event: ...
    @classmethod
    def new_stream_start(cls, stream_id: str) -> Event: ...
    @classmethod
    def new_tag(cls, taglist: TagList) -> Event: ...
    @classmethod
    def new_toc(cls, toc: Toc, updated: bool) -> Event: ...
    @classmethod
    def new_toc_select(cls, uid: str) -> Event: ...
    def parse_buffer_size(self) -> typing.Tuple[Format, int, int, bool]: ...
    def parse_caps(self) -> Caps: ...
    def parse_flush_stop(self) -> bool: ...
    def parse_gap(self) -> typing.Tuple[int, int]: ...
    def parse_gap_flags(self) -> GapFlags: ...
    def parse_group_id(self) -> typing.Tuple[bool, int]: ...
    def parse_instant_rate_change(self) -> typing.Tuple[float, SegmentFlags]: ...
    def parse_instant_rate_sync_time(self) -> typing.Tuple[float, int, int]: ...
    def parse_latency(self) -> int: ...
    def parse_protection(self) -> typing.Tuple[str, Buffer, str]: ...
    def parse_qos(self) -> typing.Tuple[QOSType, float, int, int]: ...
    def parse_seek(
        self,
    ) -> typing.Tuple[float, Format, SeekFlags, SeekType, int, SeekType, int]: ...
    def parse_seek_trickmode_interval(self) -> int: ...
    def parse_segment(self) -> Segment: ...
    def parse_segment_done(self) -> typing.Tuple[Format, int]: ...
    def parse_select_streams(self) -> list[str]: ...
    def parse_sink_message(self) -> Message: ...
    def parse_step(self) -> typing.Tuple[Format, int, float, bool, bool]: ...
    def parse_stream(self) -> Stream: ...
    def parse_stream_collection(self) -> StreamCollection: ...
    def parse_stream_flags(self) -> StreamFlags: ...
    def parse_stream_group_done(self) -> int: ...
    def parse_stream_start(self) -> str: ...
    def parse_tag(self) -> TagList: ...
    def parse_toc(self) -> typing.Tuple[Toc, bool]: ...
    def parse_toc_select(self) -> str: ...
    def set_gap_flags(self, flags: GapFlags) -> None: ...
    def set_group_id(self, group_id: int) -> None: ...
    def set_running_time_offset(self, offset: int) -> None: ...
    def set_seek_trickmode_interval(self, interval: int) -> None: ...
    def set_seqnum(self, seqnum: int) -> None: ...
    def set_stream(self, stream: Stream) -> None: ...
    def set_stream_flags(self, flags: StreamFlags) -> None: ...
    def writable_structure(self) -> StructureContextManager: ...

class FlagSet:
    """
    :Constructors:

    ::

        FlagSet(**properties)
    """
    @staticmethod
    def register(flags_type: typing.Type[typing.Any]) -> typing.Type[typing.Any]: ...

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

    ::

        FormatDefinition()
    """

    value: Format = ...
    nick: str = ...
    description: str = ...
    quark: int = ...

class Fraction:
    """
    :Constructors:

    ::

        Fraction(**properties)
    """

    denom: int
    num: int

    def __float__(self) -> float: ...
    def __init__(
        self, num: int, denom: int = 1
    ): ...  # FIXME: Override is missing typing annotation

class FractionRange:
    """
    :Constructors:

    ::

        FractionRange(**properties)
    """

    start: Fraction
    stop: Fraction

    def __init__(
        self, start: Fraction, stop: Fraction
    ): ...  # FIXME: Override is missing typing annotation

class GhostPad(ProxyPad):
    """
    :Constructors:

    ::

        GhostPad(**properties)
        new(name:str=None, target:Gst.Pad) -> Gst.Pad or None
        new_from_template(name:str=None, target:Gst.Pad, templ:Gst.PadTemplate) -> Gst.Pad or None
        new_no_target(name:str=None, dir:Gst.PadDirection) -> Gst.Pad or None
        new_no_target_from_template(name:str=None, templ:Gst.PadTemplate) -> Gst.Pad or None

    Object GstGhostPad

    Signals from GstPad:
      linked (GstPad)
      unlinked (GstPad)

    Properties from GstPad:
      caps -> GstCaps: Caps
        The capabilities of the pad
      direction -> GstPadDirection: Direction
        The direction of the pad
      template -> GstPadTemplate: Template
        The GstPadTemplate of this pad
      offset -> gint64: Offset
        The running time offset of the pad

    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(ProxyPad.Props):
        caps: Caps
        direction: PadDirection
        offset: int
        template: PadTemplate
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    pad: ProxyPad = ...
    priv: GhostPadPrivate = ...
    def __init__(
        self,
        *,
        direction: PadDirection = ...,
        offset: int = ...,
        template: PadTemplate = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    @staticmethod
    def activate_mode_default(
        pad: Pad, parent: typing.Optional[Object], mode: PadMode, active: bool
    ) -> bool: ...
    def construct(self) -> bool: ...
    def get_target(self) -> typing.Optional[Pad]: ...
    @staticmethod
    def internal_activate_mode_default(
        pad: Pad, parent: typing.Optional[Object], mode: PadMode, active: bool
    ) -> bool: ...
    @classmethod
    def new(cls, name: typing.Optional[str], target: Pad) -> GhostPad: ...
    @classmethod
    def new_from_template(
        cls, name: typing.Optional[str], target: Pad, templ: PadTemplate
    ) -> GhostPad: ...
    @classmethod
    def new_no_target(
        cls, name: typing.Optional[str], dir: PadDirection
    ) -> GhostPad: ...
    @classmethod
    def new_no_target_from_template(
        cls, name: typing.Optional[str], templ: PadTemplate
    ) -> GhostPad: ...
    def query_caps(self, filter: typing.Optional[Caps] = None) -> Caps: ...
    def set_target(self, newtarget: typing.Optional[Pad] = None) -> bool: ...

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

    ::

        GhostPadClass()
    """

    parent_class: ProxyPadClass = ...

class GhostPadPrivate(GObject.GPointer): ...

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

    ::

        IdStr()
        new() -> Gst.IdStr
    """

    pointer: None = ...
    padding: bytes = ...
    @staticmethod
    def __new__(cls: type[Self]) -> Self: ...
    def as_str(self) -> str: ...
    def clear(self) -> None: ...
    def copy(self) -> IdStr: ...
    def copy_into(self, s: IdStr) -> None: ...
    def free(self) -> None: ...
    def get_len(self) -> int: ...
    def init(self) -> None: ...
    def is_equal(self, s2: IdStr) -> bool: ...
    def is_equal_to_str(self, s2: str) -> bool: ...
    def is_equal_to_str_with_len(self, s2: str, len: int) -> bool: ...
    def move(self, s: IdStr) -> None: ...
    @classmethod
    def new(cls) -> IdStr: ...
    def set(self, value: str) -> None: ...
    def set_static_str(self, value: str) -> None: ...
    def set_static_str_with_len(self, value: str, len: int) -> None: ...
    def set_with_len(self, value: str, len: int) -> None: ...

class Int64Range:
    """
    :Constructors:

    ::

        Int64Range(**properties)
    """
    def __init__(self, r: range): ...  # FIXME: Override is missing typing annotation

class IntRange:
    """
    :Constructors:

    ::

        IntRange(**properties)
    """
    def __init__(self, r: range): ...  # FIXME: Override is missing typing annotation

class Iterator(GObject.GBoxed, typing.Generic[T]):
    """
    :Constructors:

    ::

        Iterator()
        new_single(type:GType, object:GObject.Value) -> Gst.Iterator
    """

    item: typing.Callable[[Iterator, typing.Any], IteratorItem] = ...
    pushed: Iterator = ...
    type: typing.Type[typing.Any] = ...
    lock: GLib.Mutex = ...
    cookie: int = ...
    master_cookie: int = ...
    size: int = ...
    def __iter__(self) -> typing.Iterator[T]: ...
    def copy(self) -> Iterator: ...
    def filter(
        self, func: typing.Callable[[None, None], int], user_data: typing.Any
    ) -> Iterator: ...
    def find_custom(
        self, func: typing.Callable[..., int], *user_data: typing.Any
    ) -> typing.Tuple[bool, typing.Any]: ...
    def fold(
        self, func: typing.Callable[..., bool], ret: typing.Any, *user_data: typing.Any
    ) -> IteratorResult: ...
    def foreach(
        self, func: typing.Callable[..., None], *user_data: typing.Any
    ) -> IteratorResult: ...
    def free(self) -> None: ...
    @classmethod
    def new_single(
        cls, type: typing.Type[typing.Any], object: typing.Any
    ) -> Iterator: ...
    def next(self) -> typing.Tuple[IteratorResult, typing.Any]: ...
    def push(self, other: Iterator) -> None: ...
    def resync(self) -> None: ...

class IteratorError(Exception): ...
class LinkError(Exception): ...
class MapError(Exception): ...

class MapInfo:
    data: typing.Optional[memoryview]
    flags: MapFlags
    maxsize: int
    memory: typing.Optional[Memory]
    size: int

    def __enter__(self) -> Self: ...
    def __exit__(
        self, type, value, tb
    ): ...  # FIXME: Override is missing typing annotation
    def __init__(self): ...  # FIXME: Override is missing typing annotation
    def __iter__(self): ...  # FIXME: Override is missing typing annotation

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

    ::

        Memory()
        new_wrapped(flags:Gst.MemoryFlags, data:list, maxsize:int, offset:int, user_data=None, notify:GLib.DestroyNotify=None) -> Gst.Memory or None
    """

    mini_object: MiniObject = ...
    allocator: Allocator = ...
    parent: Memory = ...
    maxsize: int = ...
    align: int = ...
    offset: int = ...
    size: int = ...
    def copy(self, offset: int, size: int) -> typing.Optional[Memory]: ...
    def get_sizes(self) -> typing.Tuple[int, int, int]: ...
    def is_span(self, mem2: Memory) -> typing.Tuple[bool, int]: ...
    def is_type(self, mem_type: str) -> bool: ...
    def make_mapped(
        self, flags: MapFlags
    ) -> typing.Tuple[typing.Optional[Memory], MapInfo]: ...
    def map(self, flags: MapFlags) -> MapInfo: ...
    @classmethod
    def new_wrapped(
        cls,
        flags: MemoryFlags,
        data: typing.Sequence[int],
        maxsize: int,
        offset: int,
        notify: typing.Optional[typing.Callable[..., None]] = None,
        *user_data: typing.Any,
    ) -> typing.Optional[Memory]: ...
    def resize(self, offset: int, size: int) -> None: ...
    def share(self, offset: int, size: int) -> Memory: ...
    def unmap(self, mapinfo: MapInfo) -> bool: ...

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

    ::

        Message()
        new_application(src:Gst.Object=None, structure:Gst.Structure) -> Gst.Message
        new_async_done(src:Gst.Object=None, running_time:int) -> Gst.Message
        new_async_start(src:Gst.Object=None) -> Gst.Message
        new_buffering(src:Gst.Object=None, percent:int) -> Gst.Message
        new_clock_lost(src:Gst.Object=None, clock:Gst.Clock) -> Gst.Message
        new_clock_provide(src:Gst.Object=None, clock:Gst.Clock, ready:bool) -> Gst.Message
        new_custom(type:Gst.MessageType, src:Gst.Object=None, structure:Gst.Structure=None) -> Gst.Message
        new_device_added(src:Gst.Object=None, device:Gst.Device) -> Gst.Message
        new_device_changed(src:Gst.Object=None, device:Gst.Device, changed_device:Gst.Device) -> Gst.Message
        new_device_removed(src:Gst.Object=None, device:Gst.Device) -> Gst.Message
        new_duration_changed(src:Gst.Object=None) -> Gst.Message
        new_element(src:Gst.Object=None, structure:Gst.Structure) -> Gst.Message
        new_eos(src:Gst.Object=None) -> Gst.Message
        new_error(src:Gst.Object=None, error:error, debug:str) -> Gst.Message
        new_error_with_details(src:Gst.Object=None, error:error, debug:str, details:Gst.Structure=None) -> Gst.Message
        new_have_context(src:Gst.Object=None, context:Gst.Context) -> Gst.Message
        new_info(src:Gst.Object=None, error:error, debug:str) -> Gst.Message
        new_info_with_details(src:Gst.Object=None, error:error, debug:str, details:Gst.Structure=None) -> Gst.Message
        new_instant_rate_request(src:Gst.Object=None, rate_multiplier:float) -> Gst.Message
        new_latency(src:Gst.Object=None) -> Gst.Message
        new_need_context(src:Gst.Object=None, context_type:str) -> Gst.Message
        new_new_clock(src:Gst.Object=None, clock:Gst.Clock) -> Gst.Message
        new_progress(src:Gst.Object=None, type:Gst.ProgressType, code:str, text:str) -> Gst.Message
        new_property_notify(src:Gst.Object, property_name:str, val:GObject.Value=None) -> Gst.Message
        new_qos(src:Gst.Object=None, live:bool, running_time:int, stream_time:int, timestamp:int, duration:int) -> Gst.Message
        new_redirect(src:Gst.Object=None, location:str, tag_list:Gst.TagList=None, entry_struct:Gst.Structure=None) -> Gst.Message
        new_request_state(src:Gst.Object=None, state:Gst.State) -> Gst.Message
        new_reset_time(src:Gst.Object=None, running_time:int) -> Gst.Message
        new_segment_done(src:Gst.Object=None, format:Gst.Format, position:int) -> Gst.Message
        new_segment_start(src:Gst.Object=None, format:Gst.Format, position:int) -> Gst.Message
        new_state_changed(src:Gst.Object=None, oldstate:Gst.State, newstate:Gst.State, pending:Gst.State) -> Gst.Message
        new_state_dirty(src:Gst.Object=None) -> Gst.Message
        new_step_done(src:Gst.Object=None, format:Gst.Format, amount:int, rate:float, flush:bool, intermediate:bool, duration:int, eos:bool) -> Gst.Message
        new_step_start(src:Gst.Object=None, active:bool, format:Gst.Format, amount:int, rate:float, flush:bool, intermediate:bool) -> Gst.Message
        new_stream_collection(src:Gst.Object=None, collection:Gst.StreamCollection) -> Gst.Message
        new_stream_start(src:Gst.Object=None) -> Gst.Message
        new_stream_status(src:Gst.Object=None, type:Gst.StreamStatusType, owner:Gst.Element) -> Gst.Message
        new_streams_selected(src:Gst.Object=None, collection:Gst.StreamCollection) -> Gst.Message
        new_structure_change(src:Gst.Object=None, type:Gst.StructureChangeType, owner:Gst.Element, busy:bool) -> Gst.Message
        new_tag(src:Gst.Object=None, tag_list:Gst.TagList) -> Gst.Message
        new_toc(src:Gst.Object=None, toc:Gst.Toc, updated:bool) -> Gst.Message
        new_warning(src:Gst.Object=None, error:error, debug:str) -> Gst.Message
        new_warning_with_details(src:Gst.Object=None, error:error, debug:str, details:Gst.Structure=None) -> Gst.Message
    """

    mini_object: MiniObject = ...
    type: MessageType = ...
    timestamp: int = ...
    src: Object = ...
    seqnum: int = ...
    lock: GLib.Mutex = ...
    cond: GLib.Cond = ...
    def add_redirect_entry(
        self,
        location: str,
        tag_list: typing.Optional[TagList] = None,
        entry_struct: typing.Optional[Structure] = None,
    ) -> None: ...
    def get_details(self) -> typing.Optional[Structure]: ...
    def get_num_redirect_entries(self) -> int: ...
    def get_seqnum(self) -> int: ...
    def get_stream_status_object(self) -> typing.Optional[typing.Any]: ...
    def get_structure(self) -> typing.Optional[Structure]: ...
    def has_name(self, name: str) -> bool: ...
    @classmethod
    def new_application(
        cls, src: typing.Optional[Object], structure: Structure
    ) -> Message: ...
    @classmethod
    def new_async_done(
        cls, src: typing.Optional[Object], running_time: int
    ) -> Message: ...
    @classmethod
    def new_async_start(cls, src: typing.Optional[Object] = None) -> Message: ...
    @classmethod
    def new_buffering(cls, src: typing.Optional[Object], percent: int) -> Message: ...
    @classmethod
    def new_clock_lost(cls, src: typing.Optional[Object], clock: Clock) -> Message: ...
    @classmethod
    def new_clock_provide(
        cls, src: typing.Optional[Object], clock: Clock, ready: bool
    ) -> Message: ...
    @classmethod
    def new_custom(
        cls,
        type: MessageType,
        src: typing.Optional[Object] = None,
        structure: typing.Optional[Structure] = None,
    ) -> Message: ...
    @classmethod
    def new_device_added(
        cls, src: typing.Optional[Object], device: Device
    ) -> Message: ...
    @classmethod
    def new_device_changed(
        cls, src: typing.Optional[Object], device: Device, changed_device: Device
    ) -> Message: ...
    @classmethod
    def new_device_removed(
        cls, src: typing.Optional[Object], device: Device
    ) -> Message: ...
    @classmethod
    def new_duration_changed(cls, src: typing.Optional[Object] = None) -> Message: ...
    @classmethod
    def new_element(
        cls, src: typing.Optional[Object], structure: Structure
    ) -> Message: ...
    @classmethod
    def new_eos(cls, src: typing.Optional[Object] = None) -> Message: ...
    @classmethod
    def new_error(
        cls, src: typing.Optional[Object], error: GLib.Error, debug: str
    ) -> Message: ...
    @classmethod
    def new_error_with_details(
        cls,
        src: typing.Optional[Object],
        error: GLib.Error,
        debug: str,
        details: typing.Optional[Structure] = None,
    ) -> Message: ...
    @classmethod
    def new_have_context(
        cls, src: typing.Optional[Object], context: Context
    ) -> Message: ...
    @classmethod
    def new_info(
        cls, src: typing.Optional[Object], error: GLib.Error, debug: str
    ) -> Message: ...
    @classmethod
    def new_info_with_details(
        cls,
        src: typing.Optional[Object],
        error: GLib.Error,
        debug: str,
        details: typing.Optional[Structure] = None,
    ) -> Message: ...
    @classmethod
    def new_instant_rate_request(
        cls, src: typing.Optional[Object], rate_multiplier: float
    ) -> Message: ...
    @classmethod
    def new_latency(cls, src: typing.Optional[Object] = None) -> Message: ...
    @classmethod
    def new_need_context(
        cls, src: typing.Optional[Object], context_type: str
    ) -> Message: ...
    @classmethod
    def new_new_clock(cls, src: typing.Optional[Object], clock: Clock) -> Message: ...
    @classmethod
    def new_progress(
        cls, src: typing.Optional[Object], type: ProgressType, code: str, text: str
    ) -> Message: ...
    @classmethod
    def new_property_notify(
        cls, src: Object, property_name: str, val: typing.Optional[typing.Any] = None
    ) -> Message: ...
    @classmethod
    def new_qos(
        cls,
        src: typing.Optional[Object],
        live: bool,
        running_time: int,
        stream_time: int,
        timestamp: int,
        duration: int,
    ) -> Message: ...
    @classmethod
    def new_redirect(
        cls,
        src: typing.Optional[Object],
        location: str,
        tag_list: typing.Optional[TagList] = None,
        entry_struct: typing.Optional[Structure] = None,
    ) -> Message: ...
    @classmethod
    def new_request_state(
        cls, src: typing.Optional[Object], state: State
    ) -> Message: ...
    @classmethod
    def new_reset_time(
        cls, src: typing.Optional[Object], running_time: int
    ) -> Message: ...
    @classmethod
    def new_segment_done(
        cls, src: typing.Optional[Object], format: Format, position: int
    ) -> Message: ...
    @classmethod
    def new_segment_start(
        cls, src: typing.Optional[Object], format: Format, position: int
    ) -> Message: ...
    @classmethod
    def new_state_changed(
        cls,
        src: typing.Optional[Object],
        oldstate: State,
        newstate: State,
        pending: State,
    ) -> Message: ...
    @classmethod
    def new_state_dirty(cls, src: typing.Optional[Object] = None) -> Message: ...
    @classmethod
    def new_step_done(
        cls,
        src: typing.Optional[Object],
        format: Format,
        amount: int,
        rate: float,
        flush: bool,
        intermediate: bool,
        duration: int,
        eos: bool,
    ) -> Message: ...
    @classmethod
    def new_step_start(
        cls,
        src: typing.Optional[Object],
        active: bool,
        format: Format,
        amount: int,
        rate: float,
        flush: bool,
        intermediate: bool,
    ) -> Message: ...
    @classmethod
    def new_stream_collection(
        cls, src: typing.Optional[Object], collection: StreamCollection
    ) -> Message: ...
    @classmethod
    def new_stream_start(cls, src: typing.Optional[Object] = None) -> Message: ...
    @classmethod
    def new_stream_status(
        cls, src: typing.Optional[Object], type: StreamStatusType, owner: Element
    ) -> Message: ...
    @classmethod
    def new_streams_selected(
        cls, src: typing.Optional[Object], collection: StreamCollection
    ) -> Message: ...
    @classmethod
    def new_structure_change(
        cls,
        src: typing.Optional[Object],
        type: StructureChangeType,
        owner: Element,
        busy: bool,
    ) -> Message: ...
    @classmethod
    def new_tag(cls, src: typing.Optional[Object], tag_list: TagList) -> Message: ...
    @classmethod
    def new_toc(
        cls, src: typing.Optional[Object], toc: Toc, updated: bool
    ) -> Message: ...
    @classmethod
    def new_warning(
        cls, src: typing.Optional[Object], error: GLib.Error, debug: str
    ) -> Message: ...
    @classmethod
    def new_warning_with_details(
        cls,
        src: typing.Optional[Object],
        error: GLib.Error,
        debug: str,
        details: typing.Optional[Structure] = None,
    ) -> Message: ...
    def parse_async_done(self) -> int: ...
    def parse_buffering(self) -> int: ...
    def parse_buffering_stats(self) -> typing.Tuple[BufferingMode, int, int, int]: ...
    def parse_clock_lost(self) -> Clock: ...
    def parse_clock_provide(self) -> typing.Tuple[Clock, bool]: ...
    def parse_context_type(self) -> typing.Tuple[bool, str]: ...
    def parse_device_added(self) -> Device: ...
    def parse_device_changed(self) -> typing.Tuple[Device, Device]: ...
    def parse_device_removed(self) -> Device: ...
    def parse_error(self) -> typing.Tuple[GLib.Error, str]: ...
    def parse_error_details(self) -> Structure: ...
    def parse_error_writable_details(self) -> Structure: ...
    def parse_group_id(self) -> typing.Tuple[bool, int]: ...
    def parse_have_context(self) -> Context: ...
    def parse_info(self) -> typing.Tuple[GLib.Error, str]: ...
    def parse_info_details(self) -> Structure: ...
    def parse_info_writable_details(self) -> Structure: ...
    def parse_instant_rate_request(self) -> float: ...
    def parse_new_clock(self) -> Clock: ...
    def parse_progress(self) -> typing.Tuple[ProgressType, str, str]: ...
    def parse_property_notify(self) -> typing.Tuple[Object, str, typing.Any]: ...
    def parse_qos(self) -> typing.Tuple[bool, int, int, int, int]: ...
    def parse_qos_stats(self) -> typing.Tuple[Format, int, int]: ...
    def parse_qos_values(self) -> typing.Tuple[int, float, int]: ...
    def parse_redirect_entry(
        self, entry_index: int
    ) -> typing.Tuple[str, TagList, Structure]: ...
    def parse_request_state(self) -> State: ...
    def parse_reset_time(self) -> int: ...
    def parse_segment_done(self) -> typing.Tuple[Format, int]: ...
    def parse_segment_start(self) -> typing.Tuple[Format, int]: ...
    def parse_state_changed(self) -> typing.Tuple[State, State, State]: ...
    def parse_step_done(
        self,
    ) -> typing.Tuple[Format, int, float, bool, bool, int, bool]: ...
    def parse_step_start(
        self,
    ) -> typing.Tuple[bool, Format, int, float, bool, bool]: ...
    def parse_stream_collection(self) -> StreamCollection: ...
    def parse_stream_status(self) -> typing.Tuple[StreamStatusType, Element]: ...
    def parse_streams_selected(self) -> StreamCollection: ...
    def parse_structure_change(
        self,
    ) -> typing.Tuple[StructureChangeType, Element, bool]: ...
    def parse_tag(self) -> TagList: ...
    def parse_toc(self) -> typing.Tuple[Toc, bool]: ...
    def parse_warning(self) -> typing.Tuple[GLib.Error, str]: ...
    def parse_warning_details(self) -> Structure: ...
    def parse_warning_writable_details(self) -> Structure: ...
    def set_buffering_stats(
        self, mode: BufferingMode, avg_in: int, avg_out: int, buffering_left: int
    ) -> None: ...
    def set_details(self, details: typing.Optional[Structure] = None) -> None: ...
    def set_group_id(self, group_id: int) -> None: ...
    def set_qos_stats(self, format: Format, processed: int, dropped: int) -> None: ...
    def set_qos_values(self, jitter: int, proportion: float, quality: int) -> None: ...
    def set_seqnum(self, seqnum: int) -> None: ...
    def set_stream_status_object(self, object: typing.Any) -> None: ...
    def streams_selected_add(self, stream: Stream) -> None: ...
    def streams_selected_get_size(self) -> int: ...
    def streams_selected_get_stream(self, idx: int) -> typing.Optional[Stream]: ...
    @staticmethod
    def take(
        new_message: typing.Optional[Message] = None,
    ) -> typing.Tuple[bool, Message]: ...
    def writable_details(self) -> Structure: ...
    def writable_structure(self) -> Structure: ...

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

    ::

        Meta()
    """

    flags: MetaFlags = ...
    info: MetaInfo = ...
    @staticmethod
    def api_type_aggregate_params(
        api: typing.Type[typing.Any],
        aggregated_params: Structure,
        params0: Structure,
        params1: Structure,
    ) -> bool: ...
    @staticmethod
    def api_type_get_tags(api: typing.Type[typing.Any]) -> list[str]: ...
    @staticmethod
    def api_type_has_tag(api: typing.Type[typing.Any], tag: int) -> bool: ...
    @staticmethod
    def api_type_register(
        api: str, tags: typing.Sequence[str]
    ) -> typing.Type[typing.Any]: ...
    @staticmethod
    def api_type_set_params_aggregator(
        api: typing.Type[typing.Any],
        aggregator: typing.Callable[[Structure, Structure, Structure], bool],
    ) -> None: ...
    def compare_seqnum(self, meta2: Meta) -> int: ...
    @staticmethod
    def deserialize(
        buffer: Buffer, data: int, size: int
    ) -> typing.Tuple[typing.Optional[Meta], int]: ...
    @staticmethod
    def get_info(impl: str) -> typing.Optional[MetaInfo]: ...
    def get_seqnum(self) -> int: ...
    @staticmethod
    def register_custom(
        name: str,
        tags: typing.Sequence[str],
        transform_func: typing.Optional[typing.Callable[..., bool]] = None,
        *user_data: typing.Any,
    ) -> MetaInfo: ...
    @staticmethod
    def register_custom_simple(name: str) -> MetaInfo: ...
    def serialize(self, data: ByteArrayInterface) -> bool: ...
    def serialize_simple(self, data: typing.Sequence[int]) -> bool: ...

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

    ::

        MetaInfo()
    """

    api: typing.Type[typing.Any] = ...
    type: typing.Type[typing.Any] = ...
    size: int = ...
    init_func: typing.Callable[[Meta, None, Buffer], bool] = ...
    free_func: typing.Callable[[Meta, Buffer], None] = ...
    transform_func: typing.Callable[[Buffer, Meta, Buffer, int, None], bool] = ...
    serialize_func: typing.Callable[
        [Meta, ByteArrayInterface], typing.Tuple[bool, int]
    ] = ...
    deserialize_func: typing.Callable[
        [MetaInfo, Buffer, int, int, int], typing.Optional[Meta]
    ] = ...
    clear_func: typing.Callable[[Buffer, Meta], None] = ...
    def is_custom(self) -> bool: ...
    def register(self) -> MetaInfo: ...

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

    ::

        MetaTransformCopy()
    """

    region: bool = ...
    offset: int = ...
    size: int = ...

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

    ::

        MiniObject()
    """

    type: typing.Type[typing.Any] = ...
    refcount: int = ...
    lockstate: int = ...
    flags: int = ...
    copy: typing.Callable[[MiniObject], MiniObject] = ...
    dispose: typing.Callable[[MiniObject], bool] = ...
    free: typing.Callable[[MiniObject], None] = ...
    priv_uint: int = ...
    priv_pointer: None = ...
    def add_parent(self, parent: MiniObject) -> None: ...
    def get_qdata(self, quark: int) -> None: ...
    def is_writable(self) -> bool: ...
    def lock(self, flags: LockFlags) -> bool: ...
    def remove_parent(self, parent: MiniObject) -> None: ...
    @staticmethod
    def replace(
        newdata: typing.Optional[MiniObject] = None,
    ) -> typing.Tuple[bool, MiniObject]: ...
    def set_qdata(
        self, quark: int, data: None, destroy: typing.Callable[[None], None]
    ) -> None: ...
    def steal_qdata(self, quark: int) -> None: ...
    @staticmethod
    def take(newdata: MiniObject) -> typing.Tuple[bool, MiniObject]: ...
    def unlock(self, flags: LockFlags) -> None: ...

class MiniObjectMixin:
    flags = ...  # FIXME: Constant is missing typing annotation

    def is_writable(self) -> bool: ...
    def make_writable(self) -> bool: ...

class NotInitialized(Exception): ...
class NotWritableCaps(Exception): ...
class NotWritableContext(Exception): ...
class NotWritableEvent(Exception): ...
class NotWritableMiniObject(Exception): ...
class NotWritableQuery(Exception): ...
class NotWritableStructure(Exception): ...

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

    ::

        Object(**properties)

    Object GstObject

    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(GObject.InitiallyUnowned.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: GObject.InitiallyUnowned = ...
    lock: GLib.Mutex = ...
    name: str = ...
    parent: Object = ...
    flags: int = ...
    control_bindings: list[None] = ...
    control_rate: int = ...
    last_sync: int = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def add_control_binding(self, binding: ControlBinding) -> bool: ...
    @staticmethod
    def check_uniqueness(list: list[Object], name: str) -> bool: ...
    @staticmethod
    def default_deep_notify(
        object: GObject.Object,
        orig: Object,
        pspec: GObject.ParamSpec,
        excluded_props: typing.Optional[typing.Sequence[str]] = None,
    ) -> None: ...
    def default_error(
        self, error: GLib.Error, debug: typing.Optional[str] = None
    ) -> None: ...
    def do_deep_notify(self, orig: Object, pspec: GObject.ParamSpec) -> None: ...
    def get_control_binding(
        self, property_name: str
    ) -> typing.Optional[ControlBinding]: ...
    def get_control_rate(self) -> int: ...
    def get_g_value_array(
        self,
        property_name: str,
        timestamp: int,
        interval: int,
        values: typing.Sequence[typing.Any],
    ) -> bool: ...
    def get_name(self) -> typing.Optional[str]: ...
    def get_parent(self) -> typing.Optional[Object]: ...
    def get_path_string(self) -> str: ...
    def get_value(
        self, property_name: str, timestamp: int
    ) -> typing.Optional[typing.Any]: ...
    def has_active_control_bindings(self) -> bool: ...
    def has_ancestor(self, ancestor: Object) -> bool: ...
    def has_as_ancestor(self, ancestor: Object) -> bool: ...
    def has_as_parent(self, parent: Object) -> bool: ...
    def ref(self) -> Object: ...
    def remove_control_binding(self, binding: ControlBinding) -> bool: ...
    @staticmethod
    def replace(
        newobj: typing.Optional[Object] = None,
    ) -> typing.Tuple[bool, Object]: ...
    def set_control_binding_disabled(
        self, property_name: str, disabled: bool
    ) -> None: ...
    def set_control_bindings_disabled(self, disabled: bool) -> None: ...
    def set_control_rate(self, control_rate: int) -> None: ...
    def set_name(self, name: typing.Optional[str] = None) -> bool: ...
    def set_parent(self, parent: Object) -> bool: ...
    def suggest_next_sync(self) -> int: ...
    def sync_values(self, timestamp: int) -> bool: ...
    def unparent(self) -> None: ...
    def unref(self) -> None: ...

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

    ::

        ObjectClass()
    """

    parent_class: GObject.InitiallyUnownedClass = ...
    path_string_separator: str = ...
    deep_notify: typing.Callable[[Object, Object, GObject.ParamSpec], None] = ...

class Pad(Object):
    """
    :Constructors:

    ::

        Pad(**properties)
        new(name:str=None, direction:Gst.PadDirection) -> Gst.Pad
        new_from_static_template(templ:Gst.StaticPadTemplate, name:str) -> Gst.Pad
        new_from_template(templ:Gst.PadTemplate, name:str=None) -> Gst.Pad

    Object GstPad

    Signals from GstPad:
      linked (GstPad)
      unlinked (GstPad)

    Properties from GstPad:
      caps -> GstCaps: Caps
        The capabilities of the pad
      direction -> GstPadDirection: Direction
        The direction of the pad
      template -> GstPadTemplate: Template
        The GstPadTemplate of this pad
      offset -> gint64: Offset
        The running time offset of the pad

    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(Object.Props):
        caps: Caps
        direction: PadDirection
        offset: int
        template: PadTemplate
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    element_private: None = ...
    padtemplate: PadTemplate = ...
    direction: PadDirection = ...
    stream_rec_lock: GLib.RecMutex = ...
    task: Task = ...
    block_cond: GLib.Cond = ...
    probes: GLib.HookList = ...
    mode: PadMode = ...
    activatefunc: typing.Callable[[Pad, Object], bool] = ...
    activatedata: None = ...
    activatenotify: typing.Callable[[None], None] = ...
    activatemodefunc: typing.Callable[[Pad, Object, PadMode, bool], bool] = ...
    activatemodedata: None = ...
    activatemodenotify: typing.Callable[[None], None] = ...
    peer: Pad = ...
    linkfunc: typing.Callable[[Pad, typing.Optional[Object], Pad], PadLinkReturn] = ...
    linkdata: None = ...
    linknotify: typing.Callable[[None], None] = ...
    unlinkfunc: typing.Callable[[Pad, typing.Optional[Object]], None] = ...
    unlinkdata: None = ...
    unlinknotify: typing.Callable[[None], None] = ...
    chainfunc: typing.Callable[[Pad, typing.Optional[Object], Buffer], FlowReturn] = ...
    chaindata: None = ...
    chainnotify: typing.Callable[[None], None] = ...
    chainlistfunc: typing.Callable[
        [Pad, typing.Optional[Object], BufferList], FlowReturn
    ] = ...
    chainlistdata: None = ...
    chainlistnotify: typing.Callable[[None], None] = ...
    getrangefunc: typing.Callable[
        [Pad, typing.Optional[Object], int, int, Buffer], FlowReturn
    ] = ...
    getrangedata: None = ...
    getrangenotify: typing.Callable[[None], None] = ...
    eventfunc: typing.Callable[[Pad, typing.Optional[Object], Event], bool] = ...
    eventdata: None = ...
    eventnotify: typing.Callable[[None], None] = ...
    offset: int = ...
    queryfunc: typing.Callable[[Pad, typing.Optional[Object], Query], bool] = ...
    querydata: None = ...
    querynotify: typing.Callable[[None], None] = ...
    iterintlinkfunc: typing.Callable[[Pad, typing.Optional[Object]], Iterator] = ...
    iterintlinkdata: None = ...
    iterintlinknotify: typing.Callable[[None], None] = ...
    num_probes: int = ...
    num_blocked: int = ...
    priv: PadPrivate = ...
    def __init__(
        self,
        *,
        direction: PadDirection = ...,
        offset: int = ...,
        template: PadTemplate = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def activate_mode(self, mode: PadMode, active: bool) -> bool: ...
    def add_probe(
        self,
        mask: PadProbeType,
        callback: typing.Callable[..., PadProbeReturn],
        *user_data: typing.Any,
    ) -> int: ...
    def can_link(self, sinkpad: Pad) -> bool: ...
    def chain(self, buffer: Buffer) -> FlowReturn: ...
    def chain_list(self, list: BufferList) -> FlowReturn: ...
    def check_reconfigure(self) -> bool: ...
    def create_stream_id(
        self, parent: Element, stream_id: typing.Optional[str] = None
    ) -> str: ...
    def do_linked(self, peer: Pad) -> None: ...
    def do_unlinked(self, peer: Pad) -> None: ...
    def event_default(self, parent: typing.Optional[Object], event: Event) -> bool: ...
    def forward(
        self, forward: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def get_allowed_caps(self) -> typing.Optional[Caps]: ...
    def get_current_caps(self) -> typing.Optional[Caps]: ...
    def get_direction(self) -> PadDirection: ...
    def get_element_private(self) -> None: ...
    def get_last_flow_return(self) -> FlowReturn: ...
    def get_offset(self) -> int: ...
    def get_pad_template(self) -> typing.Optional[PadTemplate]: ...
    def get_pad_template_caps(self) -> Caps: ...
    def get_parent_element(self) -> typing.Optional[Element]: ...
    def get_peer(self) -> typing.Optional[Pad]: ...
    def get_range(self, offset: int, size: int) -> typing.Tuple[FlowReturn, Buffer]: ...
    def get_single_internal_link(self) -> typing.Optional[Pad]: ...
    def get_sticky_event(
        self, event_type: EventType, idx: int
    ) -> typing.Optional[Event]: ...
    def get_stream(self) -> typing.Optional[Stream]: ...
    def get_stream_id(self) -> typing.Optional[str]: ...
    def get_task_state(self) -> TaskState: ...
    def has_current_caps(self) -> bool: ...
    def is_active(self) -> bool: ...
    def is_blocked(self) -> bool: ...
    def is_blocking(self) -> bool: ...
    def is_linked(self) -> bool: ...
    def iterate_internal_links(self) -> typing.Optional[Iterator]: ...
    def iterate_internal_links_default(
        self, parent: typing.Optional[Object] = None
    ) -> typing.Optional[Iterator]: ...
    def link(self, pad: Pad) -> PadLinkReturn: ...
    def link_full(self, sinkpad: Pad, flags: PadLinkCheck) -> PadLinkReturn: ...
    @staticmethod
    def link_get_name(ret: PadLinkReturn) -> str: ...
    def link_maybe_ghosting(self, sink: Pad) -> bool: ...
    def link_maybe_ghosting_full(self, sink: Pad, flags: PadLinkCheck) -> bool: ...
    def mark_reconfigure(self) -> None: ...
    def needs_reconfigure(self) -> bool: ...
    @classmethod
    def new(cls, name: typing.Optional[str], direction: PadDirection) -> Pad: ...
    @classmethod
    def new_from_static_template(cls, templ: StaticPadTemplate, name: str) -> Pad: ...
    @classmethod
    def new_from_template(
        cls, templ: PadTemplate, name: typing.Optional[str] = None
    ) -> Pad: ...
    def pause_task(self) -> bool: ...
    def peer_query(self, query: Query) -> bool: ...
    def peer_query_accept_caps(self, caps: Caps) -> bool: ...
    def peer_query_caps(self, filter: typing.Optional[Caps] = None) -> Caps: ...
    def peer_query_convert(
        self, src_format: Format, src_val: int, dest_format: Format
    ) -> typing.Tuple[bool, int]: ...
    def peer_query_duration(self, format: Format) -> typing.Tuple[bool, int]: ...
    def peer_query_position(self, format: Format) -> typing.Tuple[bool, int]: ...
    def proxy_query_accept_caps(self, query: Query) -> bool: ...
    def proxy_query_caps(self, query: Query) -> bool: ...
    def pull_range(
        self, offset: int, size: int
    ) -> typing.Tuple[FlowReturn, Buffer]: ...
    def push(self, buffer: Buffer) -> FlowReturn: ...
    def push_event(self, event: Event) -> bool: ...
    def push_list(self, list: BufferList) -> FlowReturn: ...
    def query(self, query: Query) -> bool: ...
    def query_accept_caps(self, caps: Caps) -> bool: ...
    def query_caps(
        self, filter=None
    ): ...  # FIXME: Override is missing typing annotation
    def query_convert(
        self, src_format: Format, src_val: int, dest_format: Format
    ) -> typing.Tuple[bool, int]: ...
    def query_default(self, parent: typing.Optional[Object], query: Query) -> bool: ...
    def query_duration(self, format: Format) -> typing.Tuple[bool, int]: ...
    def query_position(self, format: Format) -> typing.Tuple[bool, int]: ...
    def remove_probe(self, id: int) -> None: ...
    def send_event(self, event: Event) -> bool: ...
    def set_activate_function_full(
        self, activate: typing.Callable[..., bool], *user_data: typing.Any
    ) -> None: ...
    def set_activatemode_function_full(
        self, activatemode: typing.Callable[..., bool], *user_data: typing.Any
    ) -> None: ...
    def set_active(self, active: bool) -> bool: ...
    def set_caps(self, caps: Caps) -> bool: ...
    def set_chain_function(self, func: typing.Callable[..., FlowReturn]) -> None: ...
    def set_chain_function_full(
        self, chain: typing.Callable[..., FlowReturn], *user_data: typing.Any
    ) -> None: ...
    def set_chain_list_function_full(
        self, chainlist: typing.Callable[..., FlowReturn], *user_data: typing.Any
    ) -> None: ...
    def set_element_private(self, priv: None) -> None: ...
    def set_event_full_function_full(
        self, event: typing.Callable[..., FlowReturn], *user_data: typing.Any
    ) -> None: ...
    def set_event_function(self, func: typing.Callable[..., FlowReturn]) -> None: ...
    def set_event_function_full(
        self, event: typing.Callable[..., bool], *user_data: typing.Any
    ) -> None: ...
    def set_getrange_function_full(
        self, get: typing.Callable[..., FlowReturn], *user_data: typing.Any
    ) -> None: ...
    def set_iterate_internal_links_function_full(
        self, iterintlink: typing.Callable[..., Iterator], *user_data: typing.Any
    ) -> None: ...
    def set_link_function_full(
        self, link: typing.Callable[..., PadLinkReturn], *user_data: typing.Any
    ) -> None: ...
    def set_offset(self, offset: int) -> None: ...
    def set_query_function(self, func: typing.Callable[..., FlowReturn]) -> None: ...
    def set_query_function_full(
        self, query: typing.Callable[..., bool], *user_data: typing.Any
    ) -> None: ...
    def set_unlink_function_full(
        self, unlink: typing.Callable[..., None], *user_data: typing.Any
    ) -> None: ...
    def start_task(
        self, func: typing.Callable[..., None], *user_data: typing.Any
    ) -> bool: ...
    def sticky_events_foreach(
        self, foreach_func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> None: ...
    def stop_task(self) -> bool: ...
    def store_sticky_event(self, event: Event) -> FlowReturn: ...
    def unlink(self, sinkpad: Pad) -> bool: ...
    def use_fixed_caps(self) -> None: ...

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

    ::

        PadClass()
    """

    parent_class: ObjectClass = ...
    linked: typing.Callable[[Pad, Pad], None] = ...
    unlinked: typing.Callable[[Pad, Pad], None] = ...

class PadPrivate(GObject.GPointer): ...

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

    ::

        PadProbeInfo()
    """

    type: PadProbeType = ...
    id: int = ...
    data: None = ...
    offset: int = ...
    size: int = ...
    def get_buffer(self) -> typing.Optional[Buffer]: ...
    def get_buffer_list(self) -> typing.Optional[BufferList]: ...
    def get_event(self) -> typing.Optional[Event]: ...
    def get_query(self) -> typing.Optional[Query]: ...
    def set_object(self, obj: typing.Optional[MiniObject]) -> None: ...
    def writable_object(self) -> PadProbeInfoObjectContextManager:
        """
        Return writable object contained in this PadProbeInfo.
        It uses a context manager to steal the object from the PadProbeInfo,
        and set it back when exiting the context.
        """

class PadProbeInfoObjectContextManager:
    def __enter__(self) -> MiniObject: ...
    def __exit__(
        self, _type, _value, _tb
    ): ...  # FIXME: Override is missing typing annotation
    def __init__(
        self, object: MiniObject, info: PadProbeInfo
    ): ...  # FIXME: Override is missing typing annotation

class PadTemplate(Object):
    """
    :Constructors:

    ::

        PadTemplate(**properties)
        new(name_template:str, direction:Gst.PadDirection, presence:Gst.PadPresence, caps:Gst.Caps) -> Gst.PadTemplate or None
        new_from_static_pad_template_with_gtype(pad_template:Gst.StaticPadTemplate, pad_type:GType) -> Gst.PadTemplate or None
        new_with_gtype(name_template:str, direction:Gst.PadDirection, presence:Gst.PadPresence, caps:Gst.Caps, pad_type:GType) -> Gst.PadTemplate or None

    Object GstPadTemplate

    Signals from GstPadTemplate:
      pad-created (GstPad)

    Properties from GstPadTemplate:
      name-template -> gchararray: Name template
        The name template of the pad template
      direction -> GstPadDirection: Direction
        The direction of the pad described by the pad template
      presence -> GstPadPresence: Presence
        When the pad described by the pad template will become available
      caps -> GstCaps: Caps
        The capabilities of the pad described by the pad template
      gtype -> GType: GType
        The GType of the pad described by the pad template

    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(Object.Props):
        caps: Caps
        direction: PadDirection
        gtype: typing.Type[typing.Any]
        name_template: str
        presence: PadPresence
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    name_template: str = ...
    direction: PadDirection = ...
    presence: PadPresence = ...
    caps: Caps = ...
    def __init__(
        self,
        *,
        caps: Caps = ...,
        direction: PadDirection = ...,
        gtype: typing.Type[typing.Any] = ...,
        name_template: str = ...,
        presence: PadPresence = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def do_pad_created(self, pad: Pad) -> None: ...
    def get_caps(self) -> Caps: ...
    def get_documentation_caps(self) -> Caps: ...
    @classmethod
    def new(
        cls,
        name_template: str,
        direction: PadDirection,
        presence: PadPresence,
        caps: Caps,
    ) -> typing.Optional[PadTemplate]: ...
    @classmethod
    def new_from_static_pad_template_with_gtype(
        cls, pad_template: StaticPadTemplate, pad_type: typing.Type[typing.Any]
    ) -> typing.Optional[PadTemplate]: ...
    @classmethod
    def new_with_gtype(
        cls,
        name_template: str,
        direction: PadDirection,
        presence: PadPresence,
        caps: Caps,
        pad_type: typing.Type[typing.Any],
    ) -> typing.Optional[PadTemplate]: ...
    def pad_created(self, pad: Pad) -> None: ...
    def set_documentation_caps(self, caps: Caps) -> None: ...

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

    ::

        PadTemplateClass()
    """

    parent_class: ObjectClass = ...
    pad_created: typing.Callable[[PadTemplate, Pad], None] = ...

class ParamArray(GObject.ParamSpec): ...
class ParamFraction(GObject.ParamSpec): ...

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

    ::

        ParamSpecArray()
    """

    parent_instance: GObject.ParamSpec = ...
    element_spec: GObject.ParamSpec = ...

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

    ::

        ParamSpecFraction()
    """

    parent_instance: GObject.ParamSpec = ...
    min_num: int = ...
    min_den: int = ...
    max_num: int = ...
    max_den: int = ...
    def_num: int = ...
    def_den: int = ...

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

    ::

        ParentBufferMeta()
    """

    parent: Meta = ...
    buffer: Buffer = ...
    @staticmethod
    def get_info() -> MetaInfo: ...

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

    ::

        new() -> Gst.ParseContext or None
    """
    @staticmethod
    def __new__(cls: type[Self]) -> Self: ...
    def copy(self) -> typing.Optional[ParseContext]: ...
    def free(self) -> None: ...
    def get_missing_elements(self) -> typing.Optional[list[str]]: ...
    @classmethod
    def new(cls) -> typing.Optional[ParseContext]: ...

class Pipeline(Bin, ChildProxy):
    """
    :Constructors:

    ::

        Pipeline(**properties)
        new(name:str=None) -> Gst.Element

    Object GstPipeline

    Properties from GstPipeline:
      delay -> guint64: Delay
        Expected delay needed for elements to spin up to PLAYING in nanoseconds
      auto-flush-bus -> gboolean: Auto Flush Bus
        Whether to automatically flush the pipeline's bus when going from READY into NULL state
      latency -> guint64: Latency
        Latency to configure on the pipeline

    Signals from GstChildProxy:
      child-added (GObject, gchararray)
      child-removed (GObject, gchararray)

    Signals from GstBin:
      element-added (GstElement)
      element-removed (GstElement)
      deep-element-added (GstBin, GstElement)
      deep-element-removed (GstBin, GstElement)
      do-latency () -> gboolean

    Properties from GstBin:
      async-handling -> gboolean: Async Handling
        The bin will handle Asynchronous state changes
      message-forward -> gboolean: Message Forward
        Forwards all children messages

    Signals from GstChildProxy:
      child-added (GObject, gchararray)
      child-removed (GObject, gchararray)

    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(Bin.Props):
        auto_flush_bus: bool
        delay: int
        latency: int
        async_handling: bool
        message_forward: bool
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    bin: Bin = ...
    fixed_clock: Clock = ...
    stream_time: int = ...
    delay: int = ...
    priv: PipelinePrivate = ...
    def __init__(
        self,
        *,
        auto_flush_bus: bool = ...,
        delay: int = ...,
        latency: int = ...,
        async_handling: bool = ...,
        message_forward: bool = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def auto_clock(self) -> None: ...
    def get_auto_flush_bus(self) -> bool: ...
    def get_bus(self) -> Bus: ...
    def get_configured_latency(self) -> int: ...
    def get_delay(self) -> int: ...
    def get_latency(self) -> int: ...
    def get_pipeline_clock(self) -> Clock: ...
    def is_live(self) -> bool: ...
    @classmethod
    def new(cls, name: typing.Optional[str] = None) -> Pipeline: ...
    def set_auto_flush_bus(self, auto_flush: bool) -> None: ...
    def set_delay(self, delay: int) -> None: ...
    def set_latency(self, latency: int) -> None: ...
    def use_clock(self, clock: typing.Optional[Clock] = None) -> None: ...

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

    ::

        PipelineClass()
    """

    parent_class: BinClass = ...

class PipelinePrivate(GObject.GPointer): ...

class Plugin(Object):
    """
    :Constructors:

    ::

        Plugin(**properties)

    Object GstPlugin

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def add_dependency(
        self,
        env_vars: typing.Optional[typing.Sequence[str]],
        paths: typing.Optional[typing.Sequence[str]],
        names: typing.Optional[typing.Sequence[str]],
        flags: PluginDependencyFlags,
    ) -> None: ...
    def add_dependency_simple(
        self,
        env_vars: typing.Optional[str],
        paths: typing.Optional[str],
        names: typing.Optional[str],
        flags: PluginDependencyFlags,
    ) -> None: ...
    def add_status_error(self, message: str) -> None: ...
    def add_status_info(self, message: str) -> None: ...
    def add_status_warning(self, message: str) -> None: ...
    def get_cache_data(self) -> typing.Optional[Structure]: ...
    def get_description(self) -> str: ...
    def get_filename(self) -> typing.Optional[str]: ...
    def get_license(self) -> str: ...
    def get_name(self) -> str: ...
    def get_origin(self) -> str: ...
    def get_package(self) -> str: ...
    def get_release_date_string(self) -> typing.Optional[str]: ...
    def get_source(self) -> str: ...
    def get_status_errors(self) -> typing.Optional[list[str]]: ...
    def get_status_infos(self) -> typing.Optional[list[str]]: ...
    def get_status_warnings(self) -> typing.Optional[list[str]]: ...
    def get_version(self) -> str: ...
    def is_loaded(self) -> bool: ...
    @staticmethod
    def list_free(list: list[Plugin]) -> None: ...
    def load(self) -> typing.Optional[Plugin]: ...
    @staticmethod
    def load_by_name(name: str) -> typing.Optional[Plugin]: ...
    @staticmethod
    def load_file(filename: str) -> Plugin: ...
    @staticmethod
    def register_static(
        major_version: int,
        minor_version: int,
        name: str,
        description: str,
        init_func: typing.Callable[[Plugin], bool],
        version: str,
        license: str,
        source: str,
        package: str,
        origin: str,
    ) -> bool: ...
    @staticmethod
    def register_static_full(
        major_version: int,
        minor_version: int,
        name: str,
        description: str,
        init_full_func: typing.Callable[..., bool],
        version: str,
        license: str,
        source: str,
        package: str,
        origin: str,
        *user_data: typing.Any,
    ) -> bool: ...
    def set_cache_data(self, cache_data: Structure) -> None: ...

class PluginClass(GObject.GPointer): ...

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

    ::

        PluginDesc()
    """

    major_version: int = ...
    minor_version: int = ...
    name: str = ...
    description: str = ...
    plugin_init: typing.Callable[[Plugin], bool] = ...
    version: str = ...
    license: str = ...
    source: str = ...
    package: str = ...
    origin: str = ...
    release_datetime: str = ...

class PluginFeature(Object):
    """
    :Constructors:

    ::

        PluginFeature(**properties)

    Object GstPluginFeature

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def check_version(self, min_major: int, min_minor: int, min_micro: int) -> bool: ...
    def get_plugin(self) -> typing.Optional[Plugin]: ...
    def get_plugin_name(self) -> typing.Optional[str]: ...
    def get_rank(self) -> int: ...
    @staticmethod
    def list_copy(list: list[PluginFeature]) -> list[PluginFeature]: ...
    @staticmethod
    def list_debug(list: list[PluginFeature]) -> None: ...
    @staticmethod
    def list_free(list: list[PluginFeature]) -> None: ...
    def load(self) -> typing.Optional[PluginFeature]: ...
    @staticmethod
    def rank_compare_func(p1: None, p2: None) -> int: ...
    def set_rank(self, rank: int) -> None: ...

class PluginFeatureClass(GObject.GPointer): ...

class Poll(GObject.GPointer):
    def add_fd(self, fd: PollFD) -> bool: ...
    def fd_can_read(self, fd: PollFD) -> bool: ...
    def fd_can_write(self, fd: PollFD) -> bool: ...
    def fd_ctl_pri(self, fd: PollFD, active: bool) -> bool: ...
    def fd_ctl_read(self, fd: PollFD, active: bool) -> bool: ...
    def fd_ctl_write(self, fd: PollFD, active: bool) -> bool: ...
    def fd_has_closed(self, fd: PollFD) -> bool: ...
    def fd_has_error(self, fd: PollFD) -> bool: ...
    def fd_has_pri(self, fd: PollFD) -> bool: ...
    def fd_ignored(self, fd: PollFD) -> None: ...
    def free(self) -> None: ...
    def get_read_gpollfd(self, fd: GLib.PollFD) -> None: ...
    def read_control(self) -> bool: ...
    def remove_fd(self, fd: PollFD) -> bool: ...
    def restart(self) -> None: ...
    def set_controllable(self, controllable: bool) -> bool: ...
    def set_flushing(self, flushing: bool) -> None: ...
    def wait(self, timeout: int) -> int: ...
    def write_control(self) -> bool: ...

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

    ::

        PollFD()
    """

    fd: int = ...
    idx: int = ...
    def init(self) -> None: ...

class Preset(GObject.GInterface):
    """
    Interface GstPreset
    """
    def delete_preset(self, name: str) -> bool: ...
    @staticmethod
    def get_app_dir() -> typing.Optional[str]: ...
    def get_meta(self, name: str, tag: str) -> typing.Tuple[bool, str]: ...
    def get_preset_names(self) -> list[str]: ...
    def get_property_names(self) -> list[str]: ...
    def is_editable(self) -> bool: ...
    def load_preset(self, name: str) -> bool: ...
    def rename_preset(self, old_name: str, new_name: str) -> bool: ...
    def save_preset(self, name: str) -> bool: ...
    @staticmethod
    def set_app_dir(app_dir: str) -> bool: ...
    def set_meta(
        self, name: str, tag: str, value: typing.Optional[str] = None
    ) -> bool: ...

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

    ::

        PresetInterface()
    """

    parent: GObject.TypeInterface = ...
    get_preset_names: typing.Callable[[Preset], list[str]] = ...
    get_property_names: typing.Callable[[Preset], list[str]] = ...
    load_preset: typing.Callable[[Preset, str], bool] = ...
    save_preset: typing.Callable[[Preset, str], bool] = ...
    rename_preset: typing.Callable[[Preset, str, str], bool] = ...
    delete_preset: typing.Callable[[Preset, str], bool] = ...
    set_meta: typing.Callable[[Preset, str, str, typing.Optional[str]], bool] = ...
    get_meta: typing.Callable[[Preset, str, str], typing.Tuple[bool, str]] = ...

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

    ::

        Promise()
        new() -> Gst.Promise
        new_with_change_func(func:Gst.PromiseChangeFunc, user_data=None) -> Gst.Promise
    """

    parent: MiniObject = ...
    @staticmethod
    def __new__(cls: type[Self]) -> Self: ...
    def expire(self) -> None: ...
    def get_reply(self) -> typing.Optional[Structure]: ...
    def interrupt(self) -> None: ...
    @classmethod
    def new(cls) -> Promise: ...
    @classmethod
    def new_with_change_func(
        cls, func: typing.Callable[..., None], *user_data: typing.Any
    ) -> Promise: ...
    def ref(self) -> Promise: ...
    def reply(self, s: typing.Optional[Structure] = None) -> None: ...
    def unref(self) -> None: ...
    def wait(self) -> PromiseResult: ...

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

    ::

        ProtectionMeta()
    """

    meta: Meta = ...
    info: Structure = ...
    @staticmethod
    def get_info() -> MetaInfo: ...

class ProxyPad(Pad):
    """
    :Constructors:

    ::

        ProxyPad(**properties)

    Object GstProxyPad

    Signals from GstPad:
      linked (GstPad)
      unlinked (GstPad)

    Properties from GstPad:
      caps -> GstCaps: Caps
        The capabilities of the pad
      direction -> GstPadDirection: Direction
        The direction of the pad
      template -> GstPadTemplate: Template
        The GstPadTemplate of this pad
      offset -> gint64: Offset
        The running time offset of the pad

    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(Pad.Props):
        caps: Caps
        direction: PadDirection
        offset: int
        template: PadTemplate
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    pad: Pad = ...
    priv: ProxyPadPrivate = ...
    def __init__(
        self,
        *,
        direction: PadDirection = ...,
        offset: int = ...,
        template: PadTemplate = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    @staticmethod
    def chain_default(
        pad: Pad, parent: typing.Optional[Object], buffer: Buffer
    ) -> FlowReturn: ...
    @staticmethod
    def chain_list_default(
        pad: Pad, parent: typing.Optional[Object], list: BufferList
    ) -> FlowReturn: ...
    def get_internal(self) -> typing.Optional[ProxyPad]: ...
    @staticmethod
    def getrange_default(
        pad: Pad, parent: Object, offset: int, size: int
    ) -> typing.Tuple[FlowReturn, Buffer]: ...
    @staticmethod
    def iterate_internal_links_default(
        pad: Pad, parent: typing.Optional[Object] = None
    ) -> typing.Optional[Iterator]: ...

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

    ::

        ProxyPadClass()
    """

    parent_class: PadClass = ...

class ProxyPadPrivate(GObject.GPointer): ...

class Query(MiniObjectMixin, GObject.GBoxed):
    """
    :Constructors:

    ::

        Query()
        new_accept_caps(caps:Gst.Caps) -> Gst.Query
        new_allocation(caps:Gst.Caps=None, need_pool:bool) -> Gst.Query
        new_bitrate() -> Gst.Query
        new_buffering(format:Gst.Format) -> Gst.Query
        new_caps(filter:Gst.Caps) -> Gst.Query
        new_context(context_type:str) -> Gst.Query
        new_convert(src_format:Gst.Format, value:int, dest_format:Gst.Format) -> Gst.Query
        new_custom(type:Gst.QueryType, structure:Gst.Structure=None) -> Gst.Query
        new_drain() -> Gst.Query
        new_duration(format:Gst.Format) -> Gst.Query
        new_formats() -> Gst.Query
        new_latency() -> Gst.Query
        new_position(format:Gst.Format) -> Gst.Query
        new_scheduling() -> Gst.Query
        new_seeking(format:Gst.Format) -> Gst.Query
        new_segment(format:Gst.Format) -> Gst.Query
        new_selectable() -> Gst.Query
        new_uri() -> Gst.Query
    """

    mini_object: MiniObject = ...
    type: QueryType = ...
    def add_allocation_meta(
        self, api: typing.Type[typing.Any], params: typing.Optional[Structure] = None
    ) -> None: ...
    def add_allocation_param(
        self,
        allocator: typing.Optional[Allocator] = None,
        params: typing.Optional[AllocationParams] = None,
    ) -> None: ...
    def add_allocation_pool(
        self,
        pool: typing.Optional[BufferPool],
        size: int,
        min_buffers: int,
        max_buffers: int,
    ) -> None: ...
    def add_buffering_range(self, start: int, stop: int) -> bool: ...
    def add_scheduling_mode(self, mode: PadMode) -> None: ...
    def find_allocation_meta(
        self, api: typing.Type[typing.Any]
    ) -> typing.Tuple[bool, int]: ...
    def get_n_allocation_metas(self) -> int: ...
    def get_n_allocation_params(self) -> int: ...
    def get_n_allocation_pools(self) -> int: ...
    def get_n_buffering_ranges(self) -> int: ...
    def get_n_scheduling_modes(self) -> int: ...
    def get_structure(self) -> typing.Optional[Structure]: ...
    def has_scheduling_mode(self, mode: PadMode) -> bool: ...
    def has_scheduling_mode_with_flags(
        self, mode: PadMode, flags: SchedulingFlags
    ) -> bool: ...
    @classmethod
    def new_accept_caps(cls, caps: Caps) -> Query: ...
    @classmethod
    def new_allocation(cls, caps: typing.Optional[Caps], need_pool: bool) -> Query: ...
    @classmethod
    def new_bitrate(cls) -> Query: ...
    @classmethod
    def new_buffering(cls, format: Format) -> Query: ...
    @classmethod
    def new_caps(cls, filter: Caps) -> Query: ...
    @classmethod
    def new_context(cls, context_type: str) -> Query: ...
    @classmethod
    def new_convert(
        cls, src_format: Format, value: int, dest_format: Format
    ) -> Query: ...
    @classmethod
    def new_custom(
        cls, type: QueryType, structure: typing.Optional[Structure] = None
    ) -> Query: ...
    @classmethod
    def new_drain(cls) -> Query: ...
    @classmethod
    def new_duration(cls, format: Format) -> Query: ...
    @classmethod
    def new_formats(cls) -> Query: ...
    @classmethod
    def new_latency(cls) -> Query: ...
    @classmethod
    def new_position(cls, format: Format) -> Query: ...
    @classmethod
    def new_scheduling(cls) -> Query: ...
    @classmethod
    def new_seeking(cls, format: Format) -> Query: ...
    @classmethod
    def new_segment(cls, format: Format) -> Query: ...
    @classmethod
    def new_selectable(cls) -> Query: ...
    @classmethod
    def new_uri(cls) -> Query: ...
    def parse_accept_caps(self) -> Caps: ...
    def parse_accept_caps_result(self) -> bool: ...
    def parse_allocation(self) -> typing.Tuple[Caps, bool]: ...
    def parse_bitrate(self) -> int: ...
    def parse_buffering_percent(self) -> typing.Tuple[bool, int]: ...
    def parse_buffering_range(self) -> typing.Tuple[Format, int, int, int]: ...
    def parse_buffering_stats(self) -> typing.Tuple[BufferingMode, int, int, int]: ...
    def parse_caps(self) -> Caps: ...
    def parse_caps_result(self) -> Caps: ...
    def parse_context(self) -> Context: ...
    def parse_context_type(self) -> typing.Tuple[bool, str]: ...
    def parse_convert(self) -> typing.Tuple[Format, int, Format, int]: ...
    def parse_duration(self) -> typing.Tuple[Format, int]: ...
    def parse_latency(self) -> typing.Tuple[bool, int, int]: ...
    def parse_n_formats(self) -> int: ...
    def parse_nth_allocation_meta(
        self, index: int
    ) -> typing.Tuple[typing.Type[typing.Any], Structure]: ...
    def parse_nth_allocation_param(
        self, index: int
    ) -> typing.Tuple[Allocator, AllocationParams]: ...
    def parse_nth_allocation_pool(
        self, index: int
    ) -> typing.Tuple[BufferPool, int, int, int]: ...
    def parse_nth_buffering_range(self, index: int) -> typing.Tuple[bool, int, int]: ...
    def parse_nth_format(self, nth: int) -> Format: ...
    def parse_nth_scheduling_mode(self, index: int) -> PadMode: ...
    def parse_position(self) -> typing.Tuple[Format, int]: ...
    def parse_scheduling(self) -> typing.Tuple[SchedulingFlags, int, int, int]: ...
    def parse_seeking(self) -> typing.Tuple[Format, bool, int, int]: ...
    def parse_segment(self) -> typing.Tuple[float, Format, int, int]: ...
    def parse_selectable(self) -> bool: ...
    def parse_uri(self) -> str: ...
    def parse_uri_redirection(self) -> str: ...
    def parse_uri_redirection_permanent(self) -> bool: ...
    def ref(self) -> Query: ...
    def remove_nth_allocation_meta(self, index: int) -> None: ...
    def remove_nth_allocation_param(self, index: int) -> None: ...
    def remove_nth_allocation_pool(self, index: int) -> None: ...
    def set_accept_caps_result(self, result: bool) -> None: ...
    def set_bitrate(self, nominal_bitrate: int) -> None: ...
    def set_buffering_percent(self, busy: bool, percent: int) -> None: ...
    def set_buffering_range(
        self, format: Format, start: int, stop: int, estimated_total: int
    ) -> None: ...
    def set_buffering_stats(
        self, mode: BufferingMode, avg_in: int, avg_out: int, buffering_left: int
    ) -> None: ...
    def set_caps_result(self, caps: typing.Optional[Caps] = None) -> None: ...
    def set_context(self, context: typing.Optional[Context] = None) -> None: ...
    def set_convert(
        self, src_format: Format, src_value: int, dest_format: Format, dest_value: int
    ) -> None: ...
    def set_duration(self, format: Format, duration: int) -> None: ...
    def set_formatsv(self, formats: typing.Sequence[Format]) -> None: ...
    def set_latency(self, live: bool, min_latency: int, max_latency: int) -> None: ...
    def set_nth_allocation_param(
        self,
        index: int,
        allocator: typing.Optional[Allocator] = None,
        params: typing.Optional[AllocationParams] = None,
    ) -> None: ...
    def set_nth_allocation_pool(
        self,
        index: int,
        pool: typing.Optional[BufferPool],
        size: int,
        min_buffers: int,
        max_buffers: int,
    ) -> None: ...
    def set_position(self, format: Format, cur: int) -> None: ...
    def set_scheduling(
        self, flags: SchedulingFlags, minsize: int, maxsize: int, align: int
    ) -> None: ...
    def set_seeking(
        self, format: Format, seekable: bool, segment_start: int, segment_end: int
    ) -> None: ...
    def set_segment(
        self, rate: float, format: Format, start_value: int, stop_value: int
    ) -> None: ...
    def set_selectable(self, selectable: bool) -> None: ...
    def set_uri(self, uri: typing.Optional[str] = None) -> None: ...
    def set_uri_redirection(self, uri: typing.Optional[str] = None) -> None: ...
    def set_uri_redirection_permanent(self, permanent: bool) -> None: ...
    @staticmethod
    def take(new_query: typing.Optional[Query] = None) -> typing.Tuple[bool, Query]: ...
    def writable_structure(self) -> StructureContextManager: ...

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

    ::

        ReferenceTimestampMeta()
    """

    parent: Meta = ...
    reference: Caps = ...
    timestamp: int = ...
    duration: int = ...
    @staticmethod
    def get_info() -> MetaInfo: ...

class Registry(Object):
    """
    :Constructors:

    ::

        Registry(**properties)

    Object GstRegistry

    Signals from GstRegistry:
      plugin-added (GstPlugin)
      feature-added (GstPluginFeature)

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    priv: RegistryPrivate = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def add_feature(self, feature: PluginFeature) -> bool: ...
    def add_plugin(self, plugin: Plugin) -> bool: ...
    def check_feature_version(
        self, feature_name: str, min_major: int, min_minor: int, min_micro: int
    ) -> bool: ...
    def feature_filter(
        self, filter: typing.Callable[..., bool], first: bool, *user_data: typing.Any
    ) -> list[PluginFeature]: ...
    def find_feature(
        self, name: str, type: typing.Type[typing.Any]
    ) -> typing.Optional[PluginFeature]: ...
    def find_plugin(self, name: str) -> typing.Optional[Plugin]: ...
    @staticmethod
    def fork_is_enabled() -> bool: ...
    @staticmethod
    def fork_set_enabled(enabled: bool) -> None: ...
    @staticmethod
    def get() -> Registry: ...
    def get_feature_list(
        self, type: typing.Type[typing.Any]
    ) -> list[PluginFeature]: ...
    def get_feature_list_by_plugin(self, name: str) -> list[PluginFeature]: ...
    def get_feature_list_cookie(self) -> int: ...
    def get_plugin_list(self) -> list[Plugin]: ...
    def lookup(self, filename: str) -> typing.Optional[Plugin]: ...
    def lookup_feature(self, name: str) -> typing.Optional[PluginFeature]: ...
    def plugin_filter(
        self, filter: typing.Callable[..., bool], first: bool, *user_data: typing.Any
    ) -> list[Plugin]: ...
    def remove_feature(self, feature: PluginFeature) -> None: ...
    def remove_plugin(self, plugin: Plugin) -> None: ...
    def scan_path(self, path: str) -> bool: ...

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

    ::

        RegistryClass()
    """

    parent_class: ObjectClass = ...

class RegistryPrivate(GObject.GPointer): ...

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

    ::

        new(buffer:Gst.Buffer=None, caps:Gst.Caps=None, segment:Gst.Segment=None, info:Gst.Structure=None) -> Gst.Sample
    """
    @staticmethod
    def __new__(
        cls: type[Self],
        buffer: typing.Optional[Buffer] = None,
        caps: typing.Optional[Caps] = None,
        segment: typing.Optional[Segment] = None,
        info: typing.Optional[Structure] = None,
    ) -> Self: ...
    def get_buffer(self) -> typing.Optional[Buffer]: ...
    def get_buffer_list(self) -> typing.Optional[BufferList]: ...
    def get_caps(self) -> typing.Optional[Caps]: ...
    def get_info(self) -> typing.Optional[Structure]: ...
    def get_segment(self) -> Segment: ...
    @classmethod
    def new(
        cls,
        buffer: typing.Optional[Buffer] = None,
        caps: typing.Optional[Caps] = None,
        segment: typing.Optional[Segment] = None,
        info: typing.Optional[Structure] = None,
    ) -> Sample: ...
    def set_buffer(self, buffer: Buffer) -> None: ...
    def set_buffer_list(self, buffer_list: BufferList) -> None: ...
    def set_caps(self, caps: Caps) -> None: ...
    def set_info(self, info: Structure) -> bool: ...
    def set_segment(self, segment: Segment) -> None: ...

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

    ::

        Segment()
        new() -> Gst.Segment
    """

    flags: SegmentFlags = ...
    rate: float = ...
    applied_rate: float = ...
    format: Format = ...
    base: int = ...
    offset: int = ...
    start: int = ...
    stop: int = ...
    time: int = ...
    position: int = ...
    duration: int = ...
    @staticmethod
    def __new__(cls: type[Self]) -> Self: ...
    def clip(
        self, format: Format, start: int, stop: int
    ) -> typing.Tuple[bool, int, int]: ...
    def copy(self) -> Segment: ...
    def copy_into(self, dest: Segment) -> None: ...
    def do_seek(
        self,
        rate: float,
        format: Format,
        flags: SeekFlags,
        start_type: SeekType,
        start: int,
        stop_type: SeekType,
        stop: int,
    ) -> typing.Tuple[bool, bool]: ...
    def free(self) -> None: ...
    def init(self, format: Format) -> None: ...
    def is_equal(self, s1: Segment) -> bool: ...
    @classmethod
    def new(cls) -> Segment: ...
    def offset_running_time(self, format: Format, offset: int) -> bool: ...
    def position_from_running_time(self, format: Format, running_time: int) -> int: ...
    def position_from_running_time_full(
        self, format: Format, running_time: int
    ) -> typing.Tuple[int, int]: ...
    def position_from_stream_time(self, format: Format, stream_time: int) -> int: ...
    def position_from_stream_time_full(
        self, format: Format, stream_time: int
    ) -> typing.Tuple[int, int]: ...
    def set_running_time(self, format: Format, running_time: int) -> bool: ...
    def to_position(self, format: Format, running_time: int) -> int: ...
    def to_running_time(self, format: Format, position: int) -> int: ...
    def to_running_time_full(
        self, format: Format, position: int
    ) -> typing.Tuple[int, int]: ...
    def to_stream_time(self, format: Format, position: int) -> int: ...
    def to_stream_time_full(
        self, format: Format, position: int
    ) -> typing.Tuple[int, int]: ...

class SharedTaskPool(TaskPool):
    """
    :Constructors:

    ::

        SharedTaskPool(**properties)
        new() -> Gst.TaskPool

    Object GstSharedTaskPool

    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(TaskPool.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    parent: TaskPool = ...
    priv: SharedTaskPoolPrivate = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def get_max_threads(self) -> int: ...
    @classmethod
    def new(cls) -> SharedTaskPool: ...
    def set_max_threads(self, max_threads: int) -> None: ...

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

    ::

        SharedTaskPoolClass()
    """

    parent_class: TaskPoolClass = ...

class SharedTaskPoolPrivate(GObject.GPointer): ...

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

    ::

        StaticCaps()
    """

    caps: Caps = ...
    string: str = ...
    def cleanup(self) -> None: ...
    def get(self) -> typing.Optional[Caps]: ...

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

    ::

        StaticPadTemplate()
    """

    name_template: str = ...
    direction: PadDirection = ...
    presence: PadPresence = ...
    static_caps: StaticCaps = ...
    def get(self) -> typing.Optional[PadTemplate]: ...
    def get_caps(self) -> Caps: ...

class Stream(Object):
    """
    :Constructors:

    ::

        Stream(**properties)
        new(stream_id:str=None, caps:Gst.Caps=None, type:Gst.StreamType, flags:Gst.StreamFlags) -> Gst.Stream

    Object GstStream

    Properties from GstStream:
      stream-id -> gchararray: Stream ID
        The stream ID of the stream
      stream-flags -> GstStreamFlags: Stream Flags
        The stream flags
      stream-type -> GstStreamType: Stream Type
        The type of stream
      tags -> GstTagList: Tags
        The tags of the stream
      caps -> GstCaps: Caps
        The caps of the stream

    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(Object.Props):
        caps: typing.Optional[Caps]
        stream_flags: StreamFlags
        stream_id: typing.Optional[str]
        stream_type: StreamType
        tags: typing.Optional[TagList]
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    stream_id: str = ...
    priv: StreamPrivate = ...
    def __init__(
        self,
        *,
        caps: typing.Optional[Caps] = ...,
        stream_flags: StreamFlags = ...,
        stream_id: str = ...,
        stream_type: StreamType = ...,
        tags: typing.Optional[TagList] = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def get_caps(self) -> typing.Optional[Caps]: ...
    def get_stream_flags(self) -> StreamFlags: ...
    def get_stream_id(self) -> typing.Optional[str]: ...
    def get_stream_type(self) -> StreamType: ...
    def get_tags(self) -> typing.Optional[TagList]: ...
    @classmethod
    def new(
        cls,
        stream_id: typing.Optional[str],
        caps: typing.Optional[Caps],
        type: StreamType,
        flags: StreamFlags,
    ) -> Stream: ...
    def set_caps(self, caps: typing.Optional[Caps] = None) -> None: ...
    def set_stream_flags(self, flags: StreamFlags) -> None: ...
    def set_stream_type(self, stream_type: StreamType) -> None: ...
    def set_tags(self, tags: typing.Optional[TagList] = None) -> None: ...

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

    ::

        StreamClass()
    """

    parent_class: ObjectClass = ...

class StreamCollection(Object):
    """
    :Constructors:

    ::

        StreamCollection(**properties)
        new(upstream_id:str=None) -> Gst.StreamCollection

    Object GstStreamCollection

    Signals from GstStreamCollection:
      stream-notify (GstStream, GParam)

    Properties from GstStreamCollection:
      upstream-id -> gchararray: Upstream ID
        The stream ID of the parent stream

    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(Object.Props):
        upstream_id: typing.Optional[str]
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    upstream_id: str = ...
    priv: StreamCollectionPrivate = ...
    def __init__(
        self,
        *,
        upstream_id: str = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    def add_stream(self, stream: Stream) -> bool: ...
    def do_stream_notify(self, stream: Stream, pspec: GObject.ParamSpec) -> None: ...
    def get_size(self) -> int: ...
    def get_stream(self, index: int) -> typing.Optional[Stream]: ...
    def get_upstream_id(self) -> typing.Optional[str]: ...
    @classmethod
    def new(cls, upstream_id: typing.Optional[str] = None) -> StreamCollection: ...

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

    ::

        StreamCollectionClass()
    """

    parent_class: ObjectClass = ...
    stream_notify: typing.Callable[
        [StreamCollection, Stream, GObject.ParamSpec], None
    ] = ...

class StreamCollectionPrivate(GObject.GPointer): ...
class StreamPrivate(GObject.GPointer): ...

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

    ::

        Structure()
        from_string(string:str) -> Gst.Structure or None, end:str
        new_empty(name:str) -> Gst.Structure
        new_from_string(string:str) -> Gst.Structure or None
        new_id_empty(quark:int) -> Gst.Structure
        new_id_str_empty(name:Gst.IdStr) -> Gst.Structure
        new_static_str_empty(name:str) -> Gst.Structure
    """

    type: typing.Type[typing.Any] = ...
    name: int = ...
    def __enter__(self) -> Self: ...
    def __exit__(
        self, _type, _value, _tb
    ): ...  # FIXME: Override is missing typing annotation
    def __getitem__(self, key: str) -> typing.Any: ...
    @staticmethod
    def __new__(
        cls: type[Self], arg: typing.Union[str, Structure], **kwargs
    ) -> Self: ...  # FIXME: Override is missing typing annotation
    def __setitem__(self, key: str, value: typing.Any) -> None: ...
    def can_intersect(self, struct2: Structure) -> bool: ...
    def copy(self) -> Structure: ...
    def filter_and_map_in_place(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> None: ...
    def filter_and_map_in_place_id_str(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> None: ...
    def fixate(self) -> None: ...
    def fixate_field(self, field_name: str) -> bool: ...
    def fixate_field_boolean(self, field_name: str, target: bool) -> bool: ...
    def fixate_field_nearest_double(self, field_name: str, target: float) -> bool: ...
    def fixate_field_nearest_fraction(
        self, field_name: str, target_numerator: int, target_denominator: int
    ) -> bool: ...
    def fixate_field_nearest_int(self, field_name: str, target: int) -> bool: ...
    def fixate_field_string(self, field_name: str, target: str) -> bool: ...
    def foreach(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def foreach_id_str(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def free(self) -> None: ...
    @classmethod
    def from_string(cls, string: str) -> Structure: ...
    def get_array(self, fieldname: str) -> typing.Tuple[bool, GObject.ValueArray]: ...
    def get_boolean(self, fieldname: str) -> typing.Tuple[bool, bool]: ...
    def get_clock_time(self, fieldname: str) -> typing.Tuple[bool, int]: ...
    def get_date(self, fieldname: str) -> typing.Tuple[bool, GLib.Date]: ...
    def get_date_time(self, fieldname: str) -> typing.Tuple[bool, DateTime]: ...
    def get_double(self, fieldname: str) -> typing.Tuple[bool, float]: ...
    def get_enum(
        self, fieldname: str, enumtype: typing.Type[typing.Any]
    ) -> typing.Tuple[bool, int]: ...
    def get_field_type(self, fieldname: str) -> typing.Type[typing.Any]: ...
    def get_flags(
        self, fieldname: str, flags_type: typing.Type[typing.Any]
    ) -> typing.Tuple[bool, int]: ...
    def get_flagset(self, fieldname: str) -> typing.Tuple[bool, int, int]: ...
    def get_fraction(self, fieldname: str) -> typing.Tuple[bool, int, int]: ...
    def get_int(self, fieldname: str) -> typing.Tuple[bool, int]: ...
    def get_int64(self, fieldname: str) -> typing.Tuple[bool, int]: ...
    def get_list(self, fieldname: str) -> typing.Tuple[bool, GObject.ValueArray]: ...
    def get_name(self) -> str: ...
    def get_name_id(self) -> int: ...
    def get_name_id_str(self) -> IdStr: ...
    def get_string(self, fieldname: str) -> typing.Optional[str]: ...
    def get_uint(self, fieldname: str) -> typing.Tuple[bool, int]: ...
    def get_uint64(self, fieldname: str) -> typing.Tuple[bool, int]: ...
    def get_value(self, fieldname: str) -> typing.Optional[typing.Any]: ...
    def has_field(self, fieldname: str) -> bool: ...
    def has_field_typed(
        self, fieldname: str, type: typing.Type[typing.Any]
    ) -> bool: ...
    def has_name(self, name: str) -> bool: ...
    def id_get_value(self, field: int) -> typing.Optional[typing.Any]: ...
    def id_has_field(self, field: int) -> bool: ...
    def id_has_field_typed(self, field: int, type: typing.Type[typing.Any]) -> bool: ...
    def id_set_value(self, field: int, value: typing.Any) -> None: ...
    def id_str_get_field_type(self, fieldname: IdStr) -> typing.Type[typing.Any]: ...
    def id_str_get_value(self, fieldname: IdStr) -> typing.Optional[typing.Any]: ...
    def id_str_has_field(self, fieldname: IdStr) -> bool: ...
    def id_str_has_field_typed(
        self, fieldname: IdStr, type: typing.Type[typing.Any]
    ) -> bool: ...
    def id_str_nth_field_name(self, index: int) -> IdStr: ...
    def id_str_remove_field(self, fieldname: IdStr) -> None: ...
    def id_str_set_value(self, fieldname: IdStr, value: typing.Any) -> None: ...
    def id_str_take_value(self, fieldname: IdStr, value: typing.Any) -> None: ...
    def id_take_value(self, field: int, value: typing.Any) -> None: ...
    def intersect(self, struct2: Structure) -> typing.Optional[Structure]: ...
    def is_equal(self, structure2: Structure) -> bool: ...
    def is_subset(self, superset: Structure) -> bool: ...
    def is_writable(self) -> bool: ...
    def keys(self) -> typing.Iterable[str]: ...
    def map_in_place(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def map_in_place_id_str(
        self, func: typing.Callable[..., bool], *user_data: typing.Any
    ) -> bool: ...
    def n_fields(self) -> int: ...
    @classmethod
    def new_empty(cls, name: str) -> Structure: ...
    @classmethod
    def new_from_string(cls, string: str) -> typing.Optional[Structure]: ...
    @classmethod
    def new_id_empty(cls, quark: int) -> Structure: ...
    @classmethod
    def new_id_str_empty(cls, name: IdStr) -> Structure: ...
    @classmethod
    def new_static_str_empty(cls, name: str) -> Structure: ...
    def nth_field_name(self, index: int) -> str: ...
    def remove_all_fields(self) -> None: ...
    def remove_field(self, fieldname: str) -> None: ...
    def serialize(self, flags: SerializeFlags) -> str: ...
    def serialize_full(self, flags: SerializeFlags) -> typing.Optional[str]: ...
    def set_array(self, fieldname: str, array: GObject.ValueArray) -> None: ...
    def set_list(self, fieldname: str, array: GObject.ValueArray) -> None: ...
    def set_name(self, name: str) -> None: ...
    def set_name_id_str(self, name: IdStr) -> None: ...
    def set_name_static_str(self, name: str) -> None: ...
    def set_parent_refcount(self, refcount: int) -> bool: ...
    def set_value(self, key: str, value: typing.Any) -> bool: ...
    def set_value_static_str(self, fieldname: str, value: typing.Any) -> None: ...
    @staticmethod
    def take(
        newstr: typing.Optional[Structure] = None,
    ) -> typing.Tuple[bool, Structure]: ...
    def take_value(self, fieldname: str, value: typing.Any) -> None: ...
    def take_value_static_str(self, fieldname: str, value: typing.Any) -> None: ...
    def to_string(self) -> str: ...

class StructureContextManager:
    """
    A Gst.Structure wrapper to force usage of a context manager.
    """
    def __enter__(self) -> Structure: ...
    def __exit__(
        self, _type, _value, _tb
    ): ...  # FIXME: Override is missing typing annotation
    def __init__(
        self, structure: Structure, parent: MiniObject
    ): ...  # FIXME: Override is missing typing annotation

class SystemClock(Clock):
    """
    :Constructors:

    ::

        SystemClock(**properties)

    Object GstSystemClock

    Properties from GstSystemClock:
      clock-type -> GstClockType: Clock type
        The type of underlying clock implementation used

    Signals from GstClock:
      synced (gboolean)

    Properties from GstClock:
      window-size -> gint: Window size
        The size of the window used to calculate rate and offset
      window-threshold -> gint: Window threshold
        The threshold to start calculating rate and offset
      timeout -> guint64: Timeout
        The amount of time, in nanoseconds, to sample master and slave clocks

    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(Clock.Props):
        clock_type: ClockType
        timeout: int
        window_size: int
        window_threshold: int
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    clock: Clock = ...
    priv: SystemClockPrivate = ...
    def __init__(
        self,
        *,
        clock_type: ClockType = ...,
        timeout: int = ...,
        window_size: int = ...,
        window_threshold: int = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    @staticmethod
    def obtain() -> Clock: ...
    @staticmethod
    def set_default(new_clock: typing.Optional[Clock] = None) -> None: ...

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

    ::

        SystemClockClass()
    """

    parent_class: ClockClass = ...

class SystemClockPrivate(GObject.GPointer): ...

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

    ::

        TagList()
        new_empty() -> Gst.TagList
        new_from_string(str:str) -> Gst.TagList or None
    """

    mini_object: MiniObject = ...
    def __getitem__(self, index: int) -> typing.Any: ...
    def __init__(self): ...  # FIXME: Override is missing typing annotation
    def __len__(self) -> int: ...
    def __setitem__(self, key: str, value: typing.Any) -> None: ...
    def add_value(self, mode: TagMergeMode, tag: str, value: typing.Any) -> None: ...
    def copy(self) -> TagList: ...
    @staticmethod
    def copy_value(list: TagList, tag: str) -> typing.Tuple[bool, typing.Any]: ...
    def enumerate(self) -> map[tuple[str, typing.Any]]: ...
    def foreach(
        self, func: typing.Callable[..., None], *user_data: typing.Any
    ) -> None: ...
    def get_boolean(self, tag: str) -> typing.Tuple[bool, bool]: ...
    def get_boolean_index(self, tag: str, index: int) -> typing.Tuple[bool, bool]: ...
    def get_date(self, tag: str) -> typing.Tuple[bool, GLib.Date]: ...
    def get_date_index(self, tag: str, index: int) -> typing.Tuple[bool, GLib.Date]: ...
    def get_date_time(self, tag: str) -> typing.Tuple[bool, DateTime]: ...
    def get_date_time_index(
        self, tag: str, index: int
    ) -> typing.Tuple[bool, DateTime]: ...
    def get_double(self, tag: str) -> typing.Tuple[bool, float]: ...
    def get_double_index(self, tag: str, index: int) -> typing.Tuple[bool, float]: ...
    def get_float(self, tag: str) -> typing.Tuple[bool, float]: ...
    def get_float_index(self, tag: str, index: int) -> typing.Tuple[bool, float]: ...
    def get_int(self, tag: str) -> typing.Tuple[bool, int]: ...
    def get_int64(self, tag: str) -> typing.Tuple[bool, int]: ...
    def get_int64_index(self, tag: str, index: int) -> typing.Tuple[bool, int]: ...
    def get_int_index(self, tag: str, index: int) -> typing.Tuple[bool, int]: ...
    def get_pointer(self, tag: str) -> typing.Tuple[bool, None]: ...
    def get_pointer_index(self, tag: str, index: int) -> typing.Tuple[bool, None]: ...
    def get_sample(self, tag: str) -> typing.Tuple[bool, Sample]: ...
    def get_sample_index(self, tag: str, index: int) -> typing.Tuple[bool, Sample]: ...
    def get_scope(self) -> TagScope: ...
    def get_string(self, tag: str) -> typing.Tuple[bool, str]: ...
    def get_string_index(self, tag: str, index: int) -> typing.Tuple[bool, str]: ...
    def get_tag_size(self, tag: str) -> int: ...
    def get_uint(self, tag: str) -> typing.Tuple[bool, int]: ...
    def get_uint64(self, tag: str) -> typing.Tuple[bool, int]: ...
    def get_uint64_index(self, tag: str, index: int) -> typing.Tuple[bool, int]: ...
    def get_uint_index(self, tag: str, index: int) -> typing.Tuple[bool, int]: ...
    def get_value_index(self, tag: str, index: int) -> typing.Optional[typing.Any]: ...
    def insert(self, from_: TagList, mode: TagMergeMode) -> None: ...
    def is_empty(self) -> bool: ...
    def is_equal(self, list2: TagList) -> bool: ...
    def keys(self) -> typing.Iterable[str]: ...
    def merge(
        self, list2: typing.Optional[TagList], mode: TagMergeMode
    ) -> typing.Optional[TagList]: ...
    def n_tags(self) -> int: ...
    @classmethod
    def new_empty(cls) -> TagList: ...
    @classmethod
    def new_from_string(cls, str: str) -> typing.Optional[TagList]: ...
    def nth_tag_name(self, index: int) -> str: ...
    def peek_string_index(self, tag: str, index: int) -> typing.Tuple[bool, str]: ...
    def remove_tag(self, tag: str) -> None: ...
    @staticmethod
    def replace(
        new_taglist: typing.Optional[TagList] = None,
    ) -> typing.Tuple[bool, TagList]: ...
    def set_scope(self, scope: TagScope) -> None: ...
    @staticmethod
    def take(
        new_taglist: typing.Optional[TagList] = None,
    ) -> typing.Tuple[bool, TagList]: ...
    def to_string(self) -> str: ...

class TagSetter(GObject.GInterface):
    """
    Interface GstTagSetter

    Signals from GObject:
      notify (GParam)
    """
    def add_tag_value(
        self, mode: TagMergeMode, tag: str, value: typing.Any
    ) -> None: ...
    def get_tag_list(self) -> typing.Optional[TagList]: ...
    def get_tag_merge_mode(self) -> TagMergeMode: ...
    def merge_tags(self, list: TagList, mode: TagMergeMode) -> None: ...
    def reset_tags(self) -> None: ...
    def set_tag_merge_mode(self, mode: TagMergeMode) -> None: ...

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

    ::

        TagSetterInterface()
    """

    g_iface: GObject.TypeInterface = ...

class Task(Object):
    """
    :Constructors:

    ::

        Task(**properties)
        new(func:Gst.TaskFunction, user_data=None) -> Gst.Task

    Object GstTask

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    state: TaskState = ...
    cond: GLib.Cond = ...
    lock: GLib.RecMutex = ...
    func: typing.Callable[..., None] = ...
    user_data: None = ...
    notify: typing.Callable[[None], None] = ...
    running: bool = ...
    thread: GLib.Thread = ...
    priv: TaskPrivate = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    @staticmethod
    def cleanup_all() -> None: ...
    def get_pool(self) -> TaskPool: ...
    def get_state(self) -> TaskState: ...
    def join(self) -> bool: ...
    @classmethod
    def new(cls, func: typing.Callable[..., None], *user_data: typing.Any) -> Task: ...
    def pause(self) -> bool: ...
    def resume(self) -> bool: ...
    def set_enter_callback(
        self, enter_func: typing.Callable[..., None], *user_data: typing.Any
    ) -> None: ...
    def set_leave_callback(
        self, leave_func: typing.Callable[..., None], *user_data: typing.Any
    ) -> None: ...
    def set_lock(self, mutex: GLib.RecMutex) -> None: ...
    def set_pool(self, pool: TaskPool) -> None: ...
    def set_state(self, state: TaskState) -> bool: ...
    def start(self) -> bool: ...
    def stop(self) -> bool: ...

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

    ::

        TaskClass()
    """

    parent_class: ObjectClass = ...
    pool: TaskPool = ...

class TaskPool(Object):
    """
    :Constructors:

    ::

        TaskPool(**properties)
        new() -> Gst.TaskPool

    Object GstTaskPool

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    object: Object = ...
    pool: GLib.ThreadPool = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def cleanup(self) -> None: ...
    def dispose_handle(self, id: None) -> None: ...
    def do_cleanup(self) -> None: ...
    def do_dispose_handle(self, id: None) -> None: ...
    def do_join(self, id: None) -> None: ...
    def do_prepare(self) -> None: ...
    def do_push(
        self, func: typing.Callable[..., None], *user_data: typing.Any
    ) -> None: ...
    def join(self, id: None) -> None: ...
    @classmethod
    def new(cls) -> TaskPool: ...
    def prepare(self) -> None: ...
    def push(
        self, func: typing.Callable[..., None], *user_data: typing.Any
    ) -> None: ...

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

    ::

        TaskPoolClass()
    """

    parent_class: ObjectClass = ...
    prepare: typing.Callable[[TaskPool], None] = ...
    cleanup: typing.Callable[[TaskPool], None] = ...
    push: typing.Callable[..., None] = ...
    join: typing.Callable[[TaskPool, None], None] = ...
    dispose_handle: typing.Callable[[TaskPool, None], None] = ...

class TaskPrivate(GObject.GPointer): ...

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

    ::

        TimedValue()
    """

    timestamp: int = ...
    value: float = ...

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

    ::

        new(scope:Gst.TocScope) -> Gst.Toc
    """
    @staticmethod
    def __new__(cls: type[Self], scope: TocScope) -> Self: ...
    def append_entry(self, entry: TocEntry) -> None: ...
    def dump(self) -> None: ...
    def find_entry(self, uid: str) -> typing.Optional[TocEntry]: ...
    def get_entries(self) -> list[TocEntry]: ...
    def get_scope(self) -> TocScope: ...
    def get_tags(self) -> typing.Optional[TagList]: ...
    def merge_tags(
        self, tags: typing.Optional[TagList], mode: TagMergeMode
    ) -> None: ...
    @classmethod
    def new(cls, scope: TocScope) -> Toc: ...
    def set_tags(self, tags: typing.Optional[TagList] = None) -> None: ...

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

    ::

        new(type:Gst.TocEntryType, uid:str) -> Gst.TocEntry
    """
    @staticmethod
    def __new__(cls: type[Self], type: TocEntryType, uid: str) -> Self: ...
    def append_sub_entry(self, subentry: TocEntry) -> None: ...
    def get_entry_type(self) -> TocEntryType: ...
    def get_loop(self) -> typing.Tuple[bool, TocLoopType, int]: ...
    def get_parent(self) -> typing.Optional[TocEntry]: ...
    def get_start_stop_times(self) -> typing.Tuple[bool, int, int]: ...
    def get_sub_entries(self) -> list[TocEntry]: ...
    def get_tags(self) -> typing.Optional[TagList]: ...
    def get_toc(self) -> typing.Optional[Toc]: ...
    def get_uid(self) -> str: ...
    def is_alternative(self) -> bool: ...
    def is_sequence(self) -> bool: ...
    def merge_tags(
        self, tags: typing.Optional[TagList], mode: TagMergeMode
    ) -> None: ...
    @classmethod
    def new(cls, type: TocEntryType, uid: str) -> TocEntry: ...
    def set_loop(self, loop_type: TocLoopType, repeat_count: int) -> None: ...
    def set_start_stop_times(self, start: int, stop: int) -> None: ...
    def set_tags(self, tags: typing.Optional[TagList] = None) -> None: ...

class TocSetter(GObject.GInterface):
    """
    Interface GstTocSetter

    Signals from GObject:
      notify (GParam)
    """
    def get_toc(self) -> typing.Optional[Toc]: ...
    def reset(self) -> None: ...
    def set_toc(self, toc: typing.Optional[Toc] = None) -> None: ...

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

    ::

        TocSetterInterface()
    """

    g_iface: GObject.TypeInterface = ...

class Tracer(Object):
    """
    :Constructors:

    ::

        Tracer(**properties)

    Object GstTracer

    Properties from GstTracer:
      params -> gchararray: Params
        Extra configuration parameters

    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(Object.Props):
        params: str
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    parent: Object = ...
    priv: TracerPrivate = ...
    def __init__(
        self,
        *,
        params: str = ...,
        name: typing.Optional[str] = ...,
        parent: Object = ...,
    ) -> None: ...
    @staticmethod
    def register(
        plugin: typing.Optional[Plugin], name: str, type: typing.Type[typing.Any]
    ) -> bool: ...
    def set_use_structure_params(self, use_structure_params: bool) -> None: ...
    def uses_structure_params(self) -> bool: ...

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

    ::

        TracerClass()
    """

    parent_class: ObjectClass = ...
    def set_use_structure_params(self, use_structure_params: bool) -> None: ...
    def uses_structure_params(self) -> bool: ...

class TracerFactory(PluginFeature):
    """
    :Constructors:

    ::

        TracerFactory(**properties)

    Object GstTracerFactory

    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(PluginFeature.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    @staticmethod
    def get_list() -> list[TracerFactory]: ...
    def get_tracer_type(self) -> typing.Type[typing.Any]: ...

class TracerFactoryClass(GObject.GPointer): ...
class TracerPrivate(GObject.GPointer): ...

class TracerRecord(Object):
    """
    :Constructors:

    ::

        TracerRecord(**properties)

    Object GstTracerRecord

    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(Object.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...

class TracerRecordClass(GObject.GPointer): ...

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

    ::

        TypeFind()
    """

    data: None = ...
    def get_length(self) -> int: ...
    def peek(self, offset: int, size: int) -> typing.Optional[int]: ...
    @staticmethod
    def register(
        plugin: typing.Optional[Plugin],
        name: str,
        rank: int,
        func: typing.Callable[..., None],
        extensions: typing.Optional[str] = None,
        possible_caps: typing.Optional[Caps] = None,
        *data: typing.Any,
    ) -> bool: ...
    def suggest(self, probability: int, caps: Caps) -> None: ...
    def suggest_empty_simple(self, probability: int, media_type: str) -> None: ...

class TypeFindFactory(PluginFeature):
    """
    :Constructors:

    ::

        TypeFindFactory(**properties)

    Object GstTypeFindFactory

    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(PluginFeature.Props):
        name: typing.Optional[str]
        parent: typing.Optional[Object]

    props: Props = ...
    def __init__(
        self, *, name: typing.Optional[str] = ..., parent: Object = ...
    ) -> None: ...
    def call_function(self, find: TypeFind) -> None: ...
    def get_caps(self) -> typing.Optional[Caps]: ...
    def get_extensions(self) -> typing.Optional[list[str]]: ...
    @staticmethod
    def get_list() -> list[TypeFindFactory]: ...
    def has_function(self) -> bool: ...

class TypeFindFactoryClass(GObject.GPointer): ...

class URIHandler(GObject.GInterface):
    """
    Interface GstURIHandler
    """
    def get_protocols(self) -> typing.Optional[list[str]]: ...
    def get_uri(self) -> typing.Optional[str]: ...
    def get_uri_type(self) -> URIType: ...
    def set_uri(self, uri: str) -> bool: ...

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

    ::

        URIHandlerInterface()
    """

    parent: GObject.TypeInterface = ...
    get_type: typing.Callable[[typing.Type[typing.Any]], URIType] = ...
    get_protocols: typing.Callable[[typing.Type[typing.Any]], list[str]] = ...
    get_uri: typing.Callable[[URIHandler], typing.Optional[str]] = ...
    set_uri: typing.Callable[[URIHandler, str], bool] = ...

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

    ::

        new(scheme:str=None, userinfo:str=None, host:str=None, port:int, path:str=None, query:str=None, fragment:str=None) -> Gst.Uri
    """
    @staticmethod
    def __new__(
        cls: type[Self],
        scheme: typing.Optional[str],
        userinfo: typing.Optional[str],
        host: typing.Optional[str],
        port: int,
        path: typing.Optional[str] = None,
        query: typing.Optional[str] = None,
        fragment: typing.Optional[str] = None,
    ) -> Self: ...
    def append_path(self, relative_path: typing.Optional[str] = None) -> bool: ...
    def append_path_segment(
        self, path_segment: typing.Optional[str] = None
    ) -> bool: ...
    @staticmethod
    def construct(protocol: str, location: str) -> str: ...
    def copy(self) -> Uri: ...
    def equal(self, second: Uri) -> bool: ...
    @staticmethod
    def from_string(uri: str) -> typing.Optional[Uri]: ...
    @staticmethod
    def from_string_escaped(uri: str) -> typing.Optional[Uri]: ...
    def from_string_with_base(self, uri: str) -> typing.Optional[Uri]: ...
    def get_fragment(self) -> typing.Optional[str]: ...
    def get_host(self) -> typing.Optional[str]: ...
    @staticmethod
    def get_location(uri: str) -> typing.Optional[str]: ...
    def get_media_fragment_table(self) -> typing.Optional[dict[str, str]]: ...
    def get_path(self) -> typing.Optional[str]: ...
    def get_path_segments(self) -> list[str]: ...
    def get_path_string(self) -> typing.Optional[str]: ...
    def get_port(self) -> int: ...
    @staticmethod
    def get_protocol(uri: str) -> typing.Optional[str]: ...
    def get_query_keys(self) -> list[str]: ...
    def get_query_string(self) -> typing.Optional[str]: ...
    def get_query_string_ordered(
        self, keys: typing.Optional[list[str]] = None
    ) -> typing.Optional[str]: ...
    def get_query_table(self) -> typing.Optional[dict[str, str]]: ...
    def get_query_value(self, query_key: str) -> typing.Optional[str]: ...
    def get_scheme(self) -> typing.Optional[str]: ...
    def get_userinfo(self) -> typing.Optional[str]: ...
    @staticmethod
    def has_protocol(uri: str, protocol: str) -> bool: ...
    def is_normalized(self) -> bool: ...
    @staticmethod
    def is_valid(uri: str) -> bool: ...
    def is_writable(self) -> bool: ...
    def join(self, ref_uri: typing.Optional[Uri] = None) -> typing.Optional[Uri]: ...
    @staticmethod
    def join_strings(base_uri: str, ref_uri: str) -> typing.Optional[str]: ...
    def make_writable(self) -> Uri: ...
    @classmethod
    def new(
        cls,
        scheme: typing.Optional[str],
        userinfo: typing.Optional[str],
        host: typing.Optional[str],
        port: int,
        path: typing.Optional[str] = None,
        query: typing.Optional[str] = None,
        fragment: typing.Optional[str] = None,
    ) -> Uri: ...
    def new_with_base(
        self,
        scheme: typing.Optional[str],
        userinfo: typing.Optional[str],
        host: typing.Optional[str],
        port: int,
        path: typing.Optional[str] = None,
        query: typing.Optional[str] = None,
        fragment: typing.Optional[str] = None,
    ) -> Uri: ...
    def normalize(self) -> bool: ...
    @staticmethod
    def protocol_is_supported(type: URIType, protocol: str) -> bool: ...
    @staticmethod
    def protocol_is_valid(protocol: str) -> bool: ...
    def query_has_key(self, query_key: str) -> bool: ...
    def ref(self) -> Uri: ...
    def remove_query_key(self, query_key: str) -> bool: ...
    def set_fragment(self, fragment: typing.Optional[str] = None) -> bool: ...
    def set_host(self, host: str) -> bool: ...
    def set_path(self, path: typing.Optional[str] = None) -> bool: ...
    def set_path_segments(
        self, path_segments: typing.Optional[list[str]] = None
    ) -> bool: ...
    def set_path_string(self, path: str) -> bool: ...
    def set_port(self, port: int) -> bool: ...
    def set_query_string(self, query: typing.Optional[str] = None) -> bool: ...
    def set_query_table(
        self, query_table: typing.Optional[dict[str, str]] = None
    ) -> bool: ...
    def set_query_value(
        self, query_key: str, query_value: typing.Optional[str] = None
    ) -> bool: ...
    def set_scheme(self, scheme: str) -> bool: ...
    def set_userinfo(self, userinfo: str) -> bool: ...
    def to_string(self) -> str: ...
    def to_string_with_keys(self, keys: typing.Optional[list[str]] = None) -> str: ...
    def unref(self) -> None: ...

class ValueArray:
    """
    :Constructors:

    ::

        ValueArray(**properties)
    """
    def __getitem__(self, index: int) -> typing.Any: ...
    def __init__(
        self, array: typing.List[typing.Any]
    ): ...  # FIXME: Override is missing typing annotation
    def __len__(self) -> int: ...
    def __setitem__(self, index: int, value: typing.Any) -> None: ...
    @staticmethod
    def append_and_take_value(value: typing.Any, append_value: typing.Any) -> None: ...
    @staticmethod
    def append_value(value: typing.Any, append_value: typing.Any) -> None: ...
    @staticmethod
    def get_size(value: typing.Any) -> int: ...
    @staticmethod
    def get_value(value: typing.Any, index: int) -> typing.Any: ...
    @staticmethod
    def init(value: typing.Any, prealloc: int) -> typing.Any: ...
    @staticmethod
    def prepend_value(value: typing.Any, prepend_value: typing.Any) -> None: ...

class ValueList:
    """
    :Constructors:

    ::

        ValueList(**properties)
    """
    def __getitem__(self, index: int) -> typing.Any: ...
    def __init__(
        self, array: typing.List[typing.Any]
    ): ...  # FIXME: Override is missing typing annotation
    def __len__(self) -> int: ...
    def __setitem__(self, index: int, value: typing.Any) -> None: ...
    @staticmethod
    def append_and_take_value(value: typing.Any, append_value: typing.Any) -> None: ...
    @staticmethod
    def append_value(value: typing.Any, append_value: typing.Any) -> None: ...
    @staticmethod
    def concat(value1: typing.Any, value2: typing.Any) -> typing.Any: ...
    @staticmethod
    def get_size(value: typing.Any) -> int: ...
    @staticmethod
    def get_value(value: typing.Any, index: int) -> typing.Any: ...
    @staticmethod
    def init(value: typing.Any, prealloc: int) -> typing.Any: ...
    @staticmethod
    def merge(value1: typing.Any, value2: typing.Any) -> typing.Any: ...
    @staticmethod
    def prepend_value(value: typing.Any, prepend_value: typing.Any) -> None: ...

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

    ::

        ValueTable()
    """

    type: typing.Type[typing.Any] = ...
    compare: typing.Callable[[typing.Any, typing.Any], int] = ...
    serialize: typing.Callable[[typing.Any], str] = ...
    deserialize: typing.Callable[[typing.Any, str], bool] = ...
    deserialize_with_pspec: typing.Callable[
        [typing.Any, str, GObject.ParamSpec], bool
    ] = ...

class AllocatorFlags(GObject.GFlags):
    CUSTOM_ALLOC = 16
    LAST = 1048576
    NO_COPY = 32

class BinFlags(GObject.GFlags):
    LAST = 524288
    NO_RESYNC = 16384
    STREAMS_AWARE = 32768

class BufferCopyFlags(GObject.GFlags):
    DEEP = 32
    FLAGS = 1
    MEMORY = 8
    MERGE = 16
    META = 4
    NONE = 0
    TIMESTAMPS = 2

class BufferFlags(GObject.GFlags):
    CORRUPTED = 256
    DECODE_ONLY = 32
    DELTA_UNIT = 8192
    DISCONT = 64
    DROPPABLE = 4096
    GAP = 2048
    HEADER = 1024
    LAST = 1048576
    LIVE = 16
    MARKER = 512
    NON_DROPPABLE = 65536
    RESYNC = 128
    SYNC_AFTER = 32768
    TAG_MEMORY = 16384

class BufferPoolAcquireFlags(GObject.GFlags):
    DISCONT = 4
    DONTWAIT = 2
    KEY_UNIT = 1
    LAST = 65536
    NONE = 0

class BusFlags(GObject.GFlags):
    FLAG_LAST = 32
    FLUSHING = 16

class CapsFlags(GObject.GFlags):
    ANY = 16

class ClockFlags(GObject.GFlags):
    CAN_DO_PERIODIC_ASYNC = 128
    CAN_DO_PERIODIC_SYNC = 64
    CAN_DO_SINGLE_ASYNC = 32
    CAN_DO_SINGLE_SYNC = 16
    CAN_SET_MASTER = 512
    CAN_SET_RESOLUTION = 256
    LAST = 4096
    NEEDS_STARTUP_SYNC = 1024

class DebugColorFlags(GObject.GFlags):
    BG_BLACK = 0
    BG_BLUE = 64
    BG_CYAN = 96
    BG_GREEN = 32
    BG_MAGENTA = 80
    BG_RED = 16
    BG_WHITE = 112
    BG_YELLOW = 48
    BOLD = 256
    FG_BLACK = 0
    FG_BLUE = 4
    FG_CYAN = 6
    FG_GREEN = 2
    FG_MAGENTA = 5
    FG_RED = 1
    FG_WHITE = 7
    FG_YELLOW = 3
    UNDERLINE = 512

class DebugGraphDetails(GObject.GFlags):
    ALL = 15
    CAPS_DETAILS = 2
    FULL_PARAMS = 16
    MEDIA_TYPE = 1
    NON_DEFAULT_PARAMS = 4
    STATES = 8
    VERBOSE = 4294967295

class ElementFlags(GObject.GFlags):
    INDEXABLE = 512
    LAST = 16384
    LOCKED_STATE = 16
    PROVIDE_CLOCK = 128
    REQUIRE_CLOCK = 256
    SINK = 32
    SOURCE = 64

class EventTypeFlags(GObject.GFlags):
    DOWNSTREAM = 2
    SERIALIZED = 4
    STICKY = 8
    STICKY_MULTI = 16
    UPSTREAM = 1

class GapFlags(GObject.GFlags):
    DATA = 1

class LockFlags(GObject.GFlags):
    EXCLUSIVE = 4
    LAST = 256
    READ = 1
    WRITE = 2

class MapFlags(GObject.GFlags):
    FLAG_LAST = 65536
    READ = 1
    WRITE = 2

class MemoryFlags(GObject.GFlags):
    LAST = 1048576
    NOT_MAPPABLE = 256
    NO_SHARE = 16
    PHYSICALLY_CONTIGUOUS = 128
    READONLY = 2
    ZERO_PADDED = 64
    ZERO_PREFIXED = 32

class MessageType(GObject.GFlags):
    ANY = 4294967295
    APPLICATION = 16384
    ASYNC_DONE = 2097152
    ASYNC_START = 1048576
    BUFFERING = 32
    CLOCK_LOST = 1024
    CLOCK_PROVIDE = 512
    DEVICE_ADDED = 2147483649
    DEVICE_CHANGED = 2147483655
    DEVICE_REMOVED = 2147483650
    DURATION_CHANGED = 262144
    ELEMENT = 32768
    EOS = 1
    ERROR = 2
    EXTENDED = 2147483648
    HAVE_CONTEXT = 1073741824
    INFO = 8
    INSTANT_RATE_REQUEST = 2147483656
    LATENCY = 524288
    NEED_CONTEXT = 536870912
    NEW_CLOCK = 2048
    PROGRESS = 33554432
    PROPERTY_NOTIFY = 2147483651
    QOS = 16777216
    REDIRECT = 2147483654
    REQUEST_STATE = 4194304
    RESET_TIME = 134217728
    SEGMENT_DONE = 131072
    SEGMENT_START = 65536
    STATE_CHANGED = 64
    STATE_DIRTY = 128
    STEP_DONE = 256
    STEP_START = 8388608
    STREAMS_SELECTED = 2147483653
    STREAM_COLLECTION = 2147483652
    STREAM_START = 268435456
    STREAM_STATUS = 8192
    STRUCTURE_CHANGE = 4096
    TAG = 16
    TOC = 67108864
    UNKNOWN = 0
    WARNING = 4
    @staticmethod
    def get_name(type: MessageType) -> str: ...
    @staticmethod
    def to_quark(type: MessageType) -> int: ...

class MetaFlags(GObject.GFlags):
    LAST = 65536
    LOCKED = 4
    NONE = 0
    POOLED = 2
    READONLY = 1

class MiniObjectFlags(GObject.GFlags):
    LAST = 16
    LOCKABLE = 1
    LOCK_READONLY = 2
    MAY_BE_LEAKED = 4

class ObjectFlags(GObject.GFlags):
    CONSTRUCTED = 2
    LAST = 16
    MAY_BE_LEAKED = 1

class PadFlags(GObject.GFlags):
    ACCEPT_INTERSECT = 32768
    ACCEPT_TEMPLATE = 65536
    BLOCKED = 16
    BLOCKING = 128
    EOS = 64
    FIXED_CAPS = 2048
    FLUSHING = 32
    LAST = 1048576
    NEED_PARENT = 256
    NEED_RECONFIGURE = 512
    PENDING_EVENTS = 1024
    PROXY_ALLOCATION = 8192
    PROXY_CAPS = 4096
    PROXY_SCHEDULING = 16384

class PadLinkCheck(GObject.GFlags):
    CAPS = 4
    DEFAULT = 5
    HIERARCHY = 1
    NOTHING = 0
    NO_RECONFIGURE = 8
    TEMPLATE_CAPS = 2

class PadProbeType(GObject.GFlags):
    ALL_BOTH = 1776
    BLOCK = 2
    BLOCKING = 3
    BLOCK_DOWNSTREAM = 114
    BLOCK_UPSTREAM = 130
    BUFFER = 16
    BUFFER_LIST = 32
    DATA_BOTH = 240
    DATA_DOWNSTREAM = 112
    DATA_UPSTREAM = 128
    EVENT_BOTH = 192
    EVENT_DOWNSTREAM = 64
    EVENT_FLUSH = 256
    EVENT_UPSTREAM = 128
    IDLE = 1
    INVALID = 0
    PULL = 8192
    PUSH = 4096
    QUERY_BOTH = 1536
    QUERY_DOWNSTREAM = 512
    QUERY_UPSTREAM = 1024
    SCHEDULING = 12288

class PadTemplateFlags(GObject.GFlags):
    LAST = 256

class ParseFlags(GObject.GFlags):
    FATAL_ERRORS = 1
    NONE = 0
    NO_SINGLE_ELEMENT_BINS = 2
    PLACE_IN_BIN = 4

class PipelineFlags(GObject.GFlags):
    FIXED_CLOCK = 524288
    LAST = 8388608

class PluginAPIFlags(GObject.GFlags):
    MEMBERS = 1

class PluginDependencyFlags(GObject.GFlags):
    FILE_NAME_IS_PREFIX = 8
    FILE_NAME_IS_SUFFIX = 4
    NONE = 0
    PATHS_ARE_DEFAULT_ONLY = 2
    PATHS_ARE_RELATIVE_TO_EXE = 16
    RECURSE = 1

class PluginFlags(GObject.GFlags):
    BLACKLISTED = 32
    CACHED = 16

class QueryTypeFlags(GObject.GFlags):
    DOWNSTREAM = 2
    SERIALIZED = 4
    UPSTREAM = 1

class SchedulingFlags(GObject.GFlags):
    BANDWIDTH_LIMITED = 4
    SEEKABLE = 1
    SEQUENTIAL = 2

class SeekFlags(GObject.GFlags):
    ACCURATE = 2
    FLUSH = 1
    INSTANT_RATE_CHANGE = 1024
    KEY_UNIT = 4
    NONE = 0
    SEGMENT = 8
    SKIP = 16
    SNAP_AFTER = 64
    SNAP_BEFORE = 32
    SNAP_NEAREST = 96
    TRICKMODE = 16
    TRICKMODE_FORWARD_PREDICTED = 512
    TRICKMODE_KEY_UNITS = 128
    TRICKMODE_NO_AUDIO = 256

class SegmentFlags(GObject.GFlags):
    NONE = 0
    RESET = 1
    SEGMENT = 8
    SKIP = 16
    TRICKMODE = 16
    TRICKMODE_FORWARD_PREDICTED = 512
    TRICKMODE_KEY_UNITS = 128
    TRICKMODE_NO_AUDIO = 256

class SerializeFlags(GObject.GFlags):
    BACKWARD_COMPAT = 1
    NONE = 0
    STRICT = 2

class StackTraceFlags(GObject.GFlags):
    FULL = 1
    NONE = 0

class StreamFlags(GObject.GFlags):
    NONE = 0
    SELECT = 2
    SPARSE = 1
    UNSELECT = 4

class StreamType(GObject.GFlags):
    AUDIO = 2
    CONTAINER = 8
    TEXT = 16
    UNKNOWN = 1
    VIDEO = 4
    @staticmethod
    def get_name(stype: StreamType) -> str: ...

class TracerValueFlags(GObject.GFlags):
    AGGREGATED = 2
    NONE = 0
    OPTIONAL = 1

class BufferingMode(GObject.GEnum):
    DOWNLOAD = 1
    LIVE = 3
    STREAM = 0
    TIMESHIFT = 2

class BusSyncReply(GObject.GEnum):
    ASYNC = 2
    DROP = 0
    PASS = 1

class CapsIntersectMode(GObject.GEnum):
    FIRST = 1
    ZIG_ZAG = 0

class ClockEntryType(GObject.GEnum):
    PERIODIC = 1
    SINGLE = 0

class ClockReturn(GObject.GEnum):
    BADTIME = 4
    BUSY = 3
    DONE = 7
    EARLY = 1
    ERROR = 5
    OK = 0
    UNSCHEDULED = 2
    UNSUPPORTED = 6

class ClockType(GObject.GEnum):
    MONOTONIC = 1
    OTHER = 2
    REALTIME = 0
    TAI = 3

class CoreError(GObject.GEnum):
    CAPS = 10
    CLOCK = 13
    DISABLED = 14
    EVENT = 8
    FAILED = 1
    MISSING_PLUGIN = 12
    NEGOTIATION = 7
    NOT_IMPLEMENTED = 3
    NUM_ERRORS = 15
    PAD = 5
    SEEK = 9
    STATE_CHANGE = 4
    TAG = 11
    THREAD = 6
    TOO_LAZY = 2
    @staticmethod
    def quark() -> int: ...

class DebugColorMode(GObject.GEnum):
    OFF = 0
    ON = 1
    UNIX = 2

class DebugLevel(GObject.GEnum):
    COUNT = 10
    DEBUG = 5
    ERROR = 1
    FIXME = 3
    INFO = 4
    LOG = 6
    MEMDUMP = 9
    NONE = 0
    TRACE = 7
    WARNING = 2
    @staticmethod
    def get_name(level: DebugLevel) -> str: ...

class EventType(GObject.GEnum):
    BUFFERSIZE = 23054
    CAPS = 12814
    CUSTOM_BOTH = 79367
    CUSTOM_BOTH_OOB = 81923
    CUSTOM_DOWNSTREAM = 71686
    CUSTOM_DOWNSTREAM_OOB = 74242
    CUSTOM_DOWNSTREAM_STICKY = 76830
    CUSTOM_UPSTREAM = 69121
    EOS = 28174
    FLUSH_START = 2563
    FLUSH_STOP = 5127
    GAP = 40966
    INSTANT_RATE_CHANGE = 46090
    INSTANT_RATE_SYNC_TIME = 66817
    LATENCY = 56321
    NAVIGATION = 53761
    PROTECTION = 33310
    QOS = 48641
    RECONFIGURE = 61441
    SEEK = 51201
    SEGMENT = 17934
    SEGMENT_DONE = 38406
    SELECT_STREAMS = 66561
    SINK_MESSAGE = 25630
    STEP = 58881
    STREAM_COLLECTION = 19230
    STREAM_GROUP_DONE = 26894
    STREAM_START = 10254
    TAG = 20510
    TOC = 30750
    TOC_SELECT = 64001
    UNKNOWN = 0
    @staticmethod
    def get_flags(type: EventType) -> EventTypeFlags: ...
    @staticmethod
    def get_name(type: EventType) -> str: ...
    @staticmethod
    def to_quark(type: EventType) -> int: ...
    @staticmethod
    def to_sticky_ordering(type: EventType) -> int: ...

class FlowReturn(GObject.GEnum):
    CUSTOM_ERROR = -100
    CUSTOM_ERROR_1 = -101
    CUSTOM_ERROR_2 = -102
    CUSTOM_SUCCESS = 100
    CUSTOM_SUCCESS_1 = 101
    CUSTOM_SUCCESS_2 = 102
    EOS = -3
    ERROR = -5
    FLUSHING = -2
    NOT_LINKED = -1
    NOT_NEGOTIATED = -4
    NOT_SUPPORTED = -6
    OK = 0

class Format(GObject.GEnum):
    BUFFERS = 4
    BYTES = 2
    DEFAULT = 1
    PERCENT = 5
    TIME = 3
    UNDEFINED = 0
    @staticmethod
    def get_by_nick(nick: str) -> Format: ...
    @staticmethod
    def get_details(format: Format) -> typing.Optional[FormatDefinition]: ...
    @staticmethod
    def get_name(format: Format) -> typing.Optional[str]: ...
    @staticmethod
    def iterate_definitions() -> Iterator: ...
    @staticmethod
    def register(nick: str, description: str) -> Format: ...
    @staticmethod
    def to_quark(format: Format) -> int: ...

class IteratorItem(GObject.GEnum):
    END = 2
    PASS = 1
    SKIP = 0

class IteratorResult(GObject.GEnum):
    DONE = 0
    ERROR = 3
    OK = 1
    RESYNC = 2

class LibraryError(GObject.GEnum):
    ENCODE = 6
    FAILED = 1
    INIT = 3
    NUM_ERRORS = 7
    SETTINGS = 5
    SHUTDOWN = 4
    TOO_LAZY = 2
    @staticmethod
    def quark() -> int: ...

class PadDirection(GObject.GEnum):
    SINK = 2
    SRC = 1
    UNKNOWN = 0

class PadLinkReturn(GObject.GEnum):
    NOFORMAT = -4
    NOSCHED = -5
    OK = 0
    REFUSED = -6
    WAS_LINKED = -2
    WRONG_DIRECTION = -3
    WRONG_HIERARCHY = -1

class PadMode(GObject.GEnum):
    NONE = 0
    PULL = 2
    PUSH = 1
    @staticmethod
    def get_name(mode: PadMode) -> str: ...

class PadPresence(GObject.GEnum):
    ALWAYS = 0
    REQUEST = 2
    SOMETIMES = 1

class PadProbeReturn(GObject.GEnum):
    DROP = 0
    HANDLED = 4
    OK = 1
    PASS = 3
    REMOVE = 2

class ParseError(GObject.GEnum):
    COULD_NOT_SET_PROPERTY = 4
    DELAYED_LINK = 7
    EMPTY = 6
    EMPTY_BIN = 5
    LINK = 3
    NO_SUCH_ELEMENT = 1
    NO_SUCH_PROPERTY = 2
    SYNTAX = 0
    @staticmethod
    def quark() -> int: ...

class PluginError(GObject.GEnum):
    DEPENDENCIES = 1
    MODULE = 0
    NAME_MISMATCH = 2
    @staticmethod
    def quark() -> int: ...

class ProgressType(GObject.GEnum):
    CANCELED = 3
    COMPLETE = 2
    CONTINUE = 1
    ERROR = 4
    START = 0

class PromiseResult(GObject.GEnum):
    EXPIRED = 3
    INTERRUPTED = 1
    PENDING = 0
    REPLIED = 2

class QOSType(GObject.GEnum):
    OVERFLOW = 0
    THROTTLE = 2
    UNDERFLOW = 1

class QueryType(GObject.GEnum):
    ACCEPT_CAPS = 40963
    ALLOCATION = 35846
    BITRATE = 51202
    BUFFERING = 28163
    CAPS = 43523
    CONTEXT = 48643
    CONVERT = 20483
    CUSTOM = 30723
    DRAIN = 46086
    DURATION = 5123
    FORMATS = 23043
    JITTER = 10243
    LATENCY = 7683
    POSITION = 2563
    RATE = 12803
    SCHEDULING = 38401
    SEEKING = 15363
    SEGMENT = 17923
    SELECTABLE = 53763
    UNKNOWN = 0
    URI = 33283
    @staticmethod
    def get_flags(type: QueryType) -> QueryTypeFlags: ...
    @staticmethod
    def get_name(type: QueryType) -> str: ...
    @staticmethod
    def to_quark(type: QueryType) -> int: ...

class Rank(GObject.GEnum):
    MARGINAL = 64
    NONE = 0
    PRIMARY = 256
    SECONDARY = 128

class ResourceError(GObject.GEnum):
    BUSY = 4
    CLOSE = 8
    FAILED = 1
    NOT_AUTHORIZED = 15
    NOT_FOUND = 3
    NO_SPACE_LEFT = 14
    NUM_ERRORS = 16
    OPEN_READ = 5
    OPEN_READ_WRITE = 7
    OPEN_WRITE = 6
    READ = 9
    SEEK = 11
    SETTINGS = 13
    SYNC = 12
    TOO_LAZY = 2
    WRITE = 10
    @staticmethod
    def quark() -> int: ...

class SearchMode(GObject.GEnum):
    AFTER = 2
    BEFORE = 1
    EXACT = 0

class SeekType(GObject.GEnum):
    END = 2
    NONE = 0
    SET = 1

class State(GObject.GEnum):
    NULL = 1
    PAUSED = 3
    PLAYING = 4
    READY = 2
    VOID_PENDING = 0

class StateChange(GObject.GEnum):
    NULL_TO_NULL = 9
    NULL_TO_READY = 10
    PAUSED_TO_PAUSED = 27
    PAUSED_TO_PLAYING = 28
    PAUSED_TO_READY = 26
    PLAYING_TO_PAUSED = 35
    PLAYING_TO_PLAYING = 36
    READY_TO_NULL = 17
    READY_TO_PAUSED = 19
    READY_TO_READY = 18
    @staticmethod
    def get_name(transition: StateChange) -> str: ...

class StateChangeReturn(GObject.GEnum):
    ASYNC = 2
    FAILURE = 0
    NO_PREROLL = 3
    SUCCESS = 1

class StreamError(GObject.GEnum):
    CODEC_NOT_FOUND = 6
    DECODE = 7
    DECRYPT = 12
    DECRYPT_NOKEY = 13
    DEMUX = 9
    ENCODE = 8
    FAILED = 1
    FORMAT = 11
    MUX = 10
    NOT_IMPLEMENTED = 3
    NUM_ERRORS = 14
    TOO_LAZY = 2
    TYPE_NOT_FOUND = 4
    WRONG_TYPE = 5
    @staticmethod
    def quark() -> int: ...

class StreamStatusType(GObject.GEnum):
    CREATE = 0
    DESTROY = 3
    ENTER = 1
    LEAVE = 2
    PAUSE = 9
    START = 8
    STOP = 10

class StructureChangeType(GObject.GEnum):
    LINK = 0
    UNLINK = 1

class TagFlag(GObject.GEnum):
    COUNT = 4
    DECODED = 3
    ENCODED = 2
    META = 1
    UNDEFINED = 0

class TagMergeMode(GObject.GEnum):
    APPEND = 3
    COUNT = 7
    KEEP = 5
    KEEP_ALL = 6
    PREPEND = 4
    REPLACE = 2
    REPLACE_ALL = 1
    UNDEFINED = 0

class TagScope(GObject.GEnum):
    GLOBAL = 1
    STREAM = 0

class TaskState(GObject.GEnum):
    PAUSED = 2
    STARTED = 0
    STOPPED = 1

class TocEntryType(GObject.GEnum):
    ANGLE = -3
    CHAPTER = 3
    EDITION = -1
    INVALID = 0
    TITLE = 1
    TRACK = 2
    VERSION = -2
    @staticmethod
    def get_nick(type: TocEntryType) -> str: ...

class TocLoopType(GObject.GEnum):
    FORWARD = 1
    NONE = 0
    PING_PONG = 3
    REVERSE = 2

class TocScope(GObject.GEnum):
    CURRENT = 2
    GLOBAL = 1

class TracerValueScope(GObject.GEnum):
    ELEMENT = 2
    PAD = 3
    PROCESS = 0
    THREAD = 1

class TypeFindProbability(GObject.GEnum):
    LIKELY = 80
    MAXIMUM = 100
    MINIMUM = 1
    NEARLY_CERTAIN = 99
    NONE = 0
    POSSIBLE = 50

class URIError(GObject.GEnum):
    BAD_REFERENCE = 3
    BAD_STATE = 2
    BAD_URI = 1
    UNSUPPORTED_PROTOCOL = 0
    @staticmethod
    def quark() -> int: ...

class URIType(GObject.GEnum):
    SINK = 1
    SRC = 2
    UNKNOWN = 0
