temporarily disable glsink due to ubuntu 20.10 regressions
This commit is contained in:
parent
5c1047346e
commit
0a0abcf206
@ -40,6 +40,8 @@ class GstWidget(Gtk.Box):
|
|||||||
return gtksink
|
return gtksink
|
||||||
|
|
||||||
def _build_sink_and_widget(self) -> None:
|
def _build_sink_and_widget(self) -> None:
|
||||||
|
|
||||||
|
"""
|
||||||
gtkglsink = Gst.ElementFactory.make("gtkglsink")
|
gtkglsink = Gst.ElementFactory.make("gtkglsink")
|
||||||
|
|
||||||
# TODO: fallback if not graphic acceleration is available
|
# TODO: fallback if not graphic acceleration is available
|
||||||
@ -50,6 +52,10 @@ class GstWidget(Gtk.Box):
|
|||||||
self._sink = sinkbin
|
self._sink = sinkbin
|
||||||
|
|
||||||
self._sinkwidget = gtkglsink.get_property("widget")
|
self._sinkwidget = gtkglsink.get_property("widget")
|
||||||
|
"""
|
||||||
|
|
||||||
|
self._sink = Gst.ElementFactory.make("gtksink")
|
||||||
|
self._sinkwidget = self._sink.get_property("widget")
|
||||||
|
|
||||||
def _create_player(self) -> None:
|
def _create_player(self) -> None:
|
||||||
self._player = Gst.ElementFactory.make("playbin", "player")
|
self._player = Gst.ElementFactory.make("playbin", "player")
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
|
|
||||||
import gi
|
import gi
|
||||||
from . import main_window
|
|
||||||
|
|
||||||
from gi.repository import Gtk, Gio, Gst, Gdk
|
|
||||||
|
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '3.0')
|
||||||
gi.require_version('Gst', '1.0')
|
gi.require_version('Gst', '1.0')
|
||||||
|
|
||||||
Gst.init(None)
|
from gi.repository import Gtk, Gst
|
||||||
Gst.init_check(None)
|
|
||||||
|
from . import gst_pipeline
|
||||||
|
from . import main_window
|
||||||
|
|
||||||
|
|
||||||
|
gst_pipeline.init_gst()
|
||||||
|
|
||||||
|
|
||||||
win = main_window.MainApp()
|
win = main_window.MainApp()
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
from . import mediathek_request as mr
|
||||||
|
from . import tools
|
||||||
|
from . import search_widget
|
||||||
|
from . import player_widget
|
||||||
|
from gi.repository import Gtk, GLib
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk, GLib
|
|
||||||
|
|
||||||
from . import player_widget
|
|
||||||
from . import search_widget
|
|
||||||
from . import tools
|
|
||||||
from . import mediathek_request as mr
|
|
||||||
|
|
||||||
class MainApp(Gtk.Window):
|
class MainApp(Gtk.Window):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -38,7 +38,6 @@ class MainApp(Gtk.Window):
|
|||||||
self._headerbar = self._create_headerbar(True)
|
self._headerbar = self._create_headerbar(True)
|
||||||
self._create_fullscreen_bar()
|
self._create_fullscreen_bar()
|
||||||
|
|
||||||
|
|
||||||
# self._main_container.add_overlay(self._create_fullscreen_bar())
|
# self._main_container.add_overlay(self._create_fullscreen_bar())
|
||||||
self._main_container.add_overlay(self._revealer)
|
self._main_container.add_overlay(self._revealer)
|
||||||
self.add(self._main_container)
|
self.add(self._main_container)
|
||||||
@ -51,7 +50,6 @@ class MainApp(Gtk.Window):
|
|||||||
|
|
||||||
GLib.timeout_add_seconds(1, self.update)
|
GLib.timeout_add_seconds(1, self.update)
|
||||||
|
|
||||||
|
|
||||||
def on_mouse_move(self, _, __):
|
def on_mouse_move(self, _, __):
|
||||||
self._player_widget.show_controls()
|
self._player_widget.show_controls()
|
||||||
self._seconds_after_mouse_move = 0
|
self._seconds_after_mouse_move = 0
|
||||||
@ -67,7 +65,6 @@ class MainApp(Gtk.Window):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def on_search(self, _=None):
|
def on_search(self, _=None):
|
||||||
if self.get_active_pane() == "player":
|
if self.get_active_pane() == "player":
|
||||||
self._player_widget.pause()
|
self._player_widget.pause()
|
||||||
@ -81,8 +78,6 @@ class MainApp(Gtk.Window):
|
|||||||
|
|
||||||
# more to come...
|
# more to come...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _create_headerbar(self, main_bar=True):
|
def _create_headerbar(self, main_bar=True):
|
||||||
headerbar = Gtk.HeaderBar()
|
headerbar = Gtk.HeaderBar()
|
||||||
|
|
||||||
@ -106,16 +101,15 @@ class MainApp(Gtk.Window):
|
|||||||
|
|
||||||
return headerbar
|
return headerbar
|
||||||
|
|
||||||
|
|
||||||
def _create_fullscreen_bar(self):
|
def _create_fullscreen_bar(self):
|
||||||
self._revealer = Gtk.Revealer()
|
self._revealer = Gtk.Revealer()
|
||||||
self._revealer.add(self._create_headerbar(False))
|
self._revealer.add(self._create_headerbar(False))
|
||||||
self._revealer.set_valign(Gtk.Align.START)
|
self._revealer.set_valign(Gtk.Align.START)
|
||||||
self._revealer.set_vexpand(False)
|
self._revealer.set_vexpand(False)
|
||||||
self._revealer.set_transition_type(Gtk.RevealerTransitionType.SLIDE_DOWN)
|
self._revealer.set_transition_type(
|
||||||
|
Gtk.RevealerTransitionType.SLIDE_DOWN)
|
||||||
return self._revealer
|
return self._revealer
|
||||||
|
|
||||||
|
|
||||||
def _create_player_widget(self):
|
def _create_player_widget(self):
|
||||||
return player_widget.PlayerWidget()
|
return player_widget.PlayerWidget()
|
||||||
|
|
||||||
@ -134,7 +128,6 @@ class MainApp(Gtk.Window):
|
|||||||
else:
|
else:
|
||||||
self._fullscreen_button.set_sensitive(True)
|
self._fullscreen_button.set_sensitive(True)
|
||||||
|
|
||||||
|
|
||||||
def get_active_pane(self):
|
def get_active_pane(self):
|
||||||
return self._main_stack.get_visible_child_name()
|
return self._main_stack.get_visible_child_name()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user