Compare commits
2 commits
0972dbd238
...
6bd0bc62b9
Author | SHA1 | Date | |
---|---|---|---|
6bd0bc62b9 | |||
bc533c29b1 |
1 changed files with 12 additions and 3 deletions
|
@ -2,12 +2,21 @@ from __future__ import annotations
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
from queue import Empty, Queue
|
from queue import Empty, Queue
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from gi.repository import GLib, Gst
|
from gi.repository import GLib, Gst
|
||||||
|
|
||||||
from .file_model import FileItem
|
if TYPE_CHECKING:
|
||||||
|
from .file_model import FileItem
|
||||||
|
|
||||||
DEFAULT_SEEK_FLAGS = Gst.SeekFlags.FLUSH | Gst.SeekFlags.KEY_UNIT
|
DEFAULT_SEEK_FLAGS = (
|
||||||
|
Gst.SeekFlags.FLUSH
|
||||||
|
| Gst.SeekFlags.KEY_UNIT
|
||||||
|
| Gst.SeekFlags.SNAP_NEAREST
|
||||||
|
| Gst.SeekFlags.TRICKMODE
|
||||||
|
| Gst.SeekFlags.TRICKMODE_KEY_UNITS
|
||||||
|
| Gst.SeekFlags.TRICKMODE_NO_AUDIO
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Thumbnailer(threading.Thread):
|
class Thumbnailer(threading.Thread):
|
||||||
|
@ -62,7 +71,7 @@ class Thumbnailer(threading.Thread):
|
||||||
"uridecodebin name=uridecodebin ! "
|
"uridecodebin name=uridecodebin ! "
|
||||||
"videoconvert ! "
|
"videoconvert ! "
|
||||||
"jpegenc quality=85 ! "
|
"jpegenc quality=85 ! "
|
||||||
"appsink name=sink"
|
"appsink sync=false name=sink"
|
||||||
)
|
)
|
||||||
|
|
||||||
pipeline = Gst.parse_launch(pipeline_str)
|
pipeline = Gst.parse_launch(pipeline_str)
|
||||||
|
|
Loading…
Reference in a new issue