mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-01-18 05:23:07 +01:00
stream player minor changes
This commit is contained in:
@@ -12,7 +12,7 @@ class Player:
|
||||
def get_vlc_instance():
|
||||
if Player._VLC_INSTANCE:
|
||||
return Player._VLC_INSTANCE
|
||||
_VLC_INSTANCE = vlc.Instance("--no-xlib").media_player_new()
|
||||
_VLC_INSTANCE = vlc.Instance("--quiet --no-xlib").media_player_new()
|
||||
return _VLC_INSTANCE
|
||||
|
||||
def play(self, mrl=None):
|
||||
|
||||
@@ -1220,6 +1220,13 @@ class MainAppWindow:
|
||||
except (NameError, AttributeError):
|
||||
show_dialog(DialogType.ERROR, self._main_window, "No VLC is found. Check that it is installed!")
|
||||
return
|
||||
else:
|
||||
if self._drawing_area_xid:
|
||||
self._player.set_xwindow(self._drawing_area_xid)
|
||||
self._services_main_box.set_visible(False)
|
||||
self._bouquets_main_box.set_visible(False)
|
||||
w, h = self._main_window.get_size()
|
||||
self._player_box.set_size_request(w * 0.6, -1)
|
||||
|
||||
self._player_box.set_visible(True)
|
||||
|
||||
@@ -1243,8 +1250,6 @@ class MainAppWindow:
|
||||
def on_drawing_area_realize(self, widget):
|
||||
self._drawing_area_xid = widget.get_window().get_xid()
|
||||
self._player.set_xwindow(self._drawing_area_xid)
|
||||
self._services_main_box.set_visible(False)
|
||||
self._bouquets_main_box.set_visible(False)
|
||||
|
||||
def on_player_drawing_area_draw(self, widget, cr):
|
||||
""" Used for black background drawing in the player drawing area.
|
||||
|
||||
@@ -1306,7 +1306,6 @@ Author: Dmitriy Yefremov
|
||||
<object class="GtkToolButton" id="player_close_tool_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Close</property>
|
||||
<property name="margin_right">15</property>
|
||||
<property name="is_important">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
@@ -1329,7 +1328,7 @@ Author: Dmitriy Yefremov
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">True</property>
|
||||
<property name="shrink">True</property>
|
||||
<property name="shrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
||||
Reference in New Issue
Block a user