ninc
parent
9f22c70e89
commit
3008d66dfe
@ -1,6 +1,19 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
class TrackType(Enum):
|
class TrackType(Enum):
|
||||||
|
|
||||||
VIDEO = 1
|
VIDEO = 1
|
||||||
AUDIO = 2
|
AUDIO = 2
|
||||||
SUBTITLE = 3
|
SUBTITLE = 3
|
||||||
|
|
||||||
|
|
||||||
|
def label(self):
|
||||||
|
"""Returns the stream type as string"""
|
||||||
|
|
||||||
|
labels = {
|
||||||
|
TrackType.VIDEO: "video",
|
||||||
|
TrackType.AUDIO: "audio",
|
||||||
|
TrackType.SUBTITLE: "subtitle"
|
||||||
|
}
|
||||||
|
|
||||||
|
return labels.get(self, "undefined")
|
||||||
|
Loading…
Reference in New Issue