Skip to content

Commit

Permalink
Improve stub for av.option; Improve import style
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Mar 4, 2024
1 parent 5b5bfcd commit f7eb306
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion av/descriptor.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from av.option import Option
from .option import Option

class Descriptor:
name: str
Expand Down
25 changes: 24 additions & 1 deletion av/option.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from av.enum import EnumFlag, EnumItem
from .enum import EnumFlag, EnumItem

class OptionType(EnumItem):
FLAGS: int
Expand Down Expand Up @@ -29,3 +29,26 @@ class OptionFlags(EnumFlag):
EXPORT: int
READONLY: int
FILTERING_PARAM: int

class BaseOption:
name: str
help: str
flags: int
is_encoding_param: bool
is_decoding_param: bool
is_audio_param: bool
is_video_param: bool
is_subtitle_param: bool
is_export: bool
is_readonly: bool
is_filtering_param: bool

class Option(BaseOption):
type: OptionType
offset: int
default: int
min: int
max: int

class OptionChoice(BaseOption):
value: int

0 comments on commit f7eb306

Please sign in to comment.