playback adaptation

This commit is contained in:
DYefremov
2021-04-07 12:41:33 +03:00
parent a437ec6030
commit d6738826d3
3 changed files with 7 additions and 11 deletions

View File

@@ -35,7 +35,7 @@ class Defaults(Enum):
LIST_PICON_SIZE = 32
FAV_CLICK_MODE = 0
PLAY_STREAMS_MODE = 1 if IS_DARWIN else 0
STREAM_LIB = "vlc"
STREAM_LIB = "gst" if IS_WIN else "vlc"
PROFILE_FOLDER_DEFAULT = False
RECORDS_PATH = DATA_PATH + "records{}".format(SEP)
ACTIVATE_TRANSCODING = False
@@ -111,7 +111,7 @@ class SettingsType(IntEnum):
"satellites_xml_path": "/etc/tuxbox/", "data_local_path": "{}enigma2{}".format(DATA_PATH, SEP),
"picons_path": "/usr/share/enigma2/picon/",
"picons_local_path": "{}enigma2{}picons{}".format(DATA_PATH, SEP, SEP),
"backup_local_path": "{}enigma2{}backup{}".format(DATA_PATH, SEP, SEP)}
"backup_local_path": "{}enigma2{}backup{}".format(DATA_PATH, SEP, SEP)}
elif self is SettingsType.NEUTRINO_MP:
return {"setting_type": self,
"host": "127.0.0.1", "port": "21", "timeout": 5,
@@ -661,7 +661,7 @@ class Settings:
@property
@lru_cache(1)
def themes_path(self):
return "{}/.themes/".format(HOME_PATH)
return "{}{}.themes{}".format(HOME_PATH, SEP, SEP)
@property
def icon_theme(self):
@@ -674,7 +674,7 @@ class Settings:
@property
@lru_cache(1)
def icon_themes_path(self):
return "{}/.icons/".format(HOME_PATH)
return "{}{}.icons{}".format(HOME_PATH, SEP, SEP)
@property
def is_darwin(self):

View File

@@ -189,11 +189,6 @@ class GstPlayer(Player):
from gi.repository import Gst, GstVideo
# Initialization of GStreamer.
Gst.init(sys.argv)
gtk_sink = Gst.ElementFactory.make("gtksink")
if not gtk_sink:
msg = "GStreamer error: gtksink plugin not installed!"
log(msg)
raise ImportError(msg)
except (OSError, ValueError) as e:
log("{}: Load library error: {}".format(__class__.__name__, e))
raise ImportError("No GStreamer is found. Check that it is installed!")
@@ -208,10 +203,10 @@ class GstPlayer(Player):
self._is_playing = False
self._player = Gst.ElementFactory.make("playbin", "player")
# Initialization of the playback widget.
self._player.set_property("video-sink", gtk_sink)
vid_widget = gtk_sink.props.widget
vid_widget = self.get_video_widget(widget)
widget.add(vid_widget)
vid_widget.show()
self._player.set_window_handle(self.get_window_handle(vid_widget))
bus = self._player.get_bus()
bus.add_signal_watch()

View File

@@ -183,6 +183,7 @@ class SettingsDialog:
self.init_profiles()
if IS_WIN:
builder.get_object("streams_lib_frame").set_visible(False)
# Themes
builder.get_object("style_frame").set_visible(True)
builder.get_object("themes_support_frame").set_visible(True)