Browse Source

Use new RPI rendering method

We're going to use the same for AML, so this is for testing how well it
works.

No idea if we really have to set Qt::FramelessWindowHint or what it does
in this specific case. Leaving it in.
Vincent Lang 8 năm trước cách đây
mục cha
commit
bb530260d8
2 tập tin đã thay đổi với 4 bổ sung18 xóa
  1. 4 17
      src/player/PlayerComponent.cpp
  2. 0 1
      src/player/PlayerComponent.h

+ 4 - 17
src/player/PlayerComponent.cpp

@@ -198,31 +198,20 @@ void PlayerComponent::setQtQuickWindow(QQuickWindow* window)
   video->initMpv(this);
 }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-void PlayerComponent::setRpiWindow(QQuickWindow* window)
-{
-  window->setFlags(Qt::FramelessWindowHint);
-
-  mpv_set_option_string(m_mpv, "vo", "rpi");
-}
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 void PlayerComponent::setWindow(QQuickWindow* window)
 {
-  bool useRpi = false;
-#ifdef TARGET_RPI
-  useRpi = true;
-#endif
-
   m_window = window;
   if (!window)
     return;
 
+#ifdef TARGET_RPI
+  window->setFlags(Qt::FramelessWindowHint);
+#endif
+
   QString forceVo = SettingsComponent::Get().value(SETTINGS_SECTION_VIDEO, "debug.force_vo").toString();
   if (forceVo.size())
     mpv::qt::set_option_variant(m_mpv, "vo", forceVo);
-  else if (useRpi)
-    setRpiWindow(window);
   else
     setQtQuickWindow(window);
 }
@@ -969,10 +958,8 @@ void PlayerComponent::updateVideoSettings()
   QVariant deinterlace = SettingsComponent::Get().value(SETTINGS_SECTION_VIDEO, "deinterlace");
   mpv::qt::set_option_variant(m_mpv, "deinterlace", deinterlace.toBool() ? "yes" : "no");
 
-#ifndef TARGET_RPI
   double displayFps = DisplayComponent::Get().currentRefreshRate();
   mpv::qt::set_property_variant(m_mpv, "display-fps", displayFps);
-#endif
 
   setAudioDelay(m_playbackAudioDelay);
 

+ 0 - 1
src/player/PlayerComponent.h

@@ -171,7 +171,6 @@ private:
   // * viewOffset
   //
   void loadWithOptions(const QVariantMap& options);
-  void setRpiWindow(QQuickWindow* window);
   void setQtQuickWindow(QQuickWindow* window);
   void updatePlaybackState();
   void handleMpvEvent(mpv_event *event);