Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type definitions for CodecContext properties #1438

Merged
merged 1 commit into from
Jun 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion av/codec/context.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from fractions import Fraction
from typing import Any, Literal

from av.enum import EnumFlag, EnumItem
from av.frame import Frame
from av.packet import Packet

from .codec import Codec
Expand Down Expand Up @@ -60,8 +60,10 @@ class CodecContext:
is_encoder: bool
is_decoder: bool
name: str
options: dict[str, str]
type: Literal["video", "audio", "data", "subtitle", "attachment"]
profile: str | None
time_base: Fraction
codec_tag: str
bit_rate: int | None
max_bit_rate: int | None
Expand Down
Loading