Commit d118f1d0 authored by Prince Gupta's avatar Prince Gupta 💬 Committed by Jean-Baptiste Kempf
Browse files

qt: expose type of compositor through its interface

parent 3fca93ef
......@@ -34,6 +34,12 @@ namespace vlc {
class Compositor {
public:
enum Type
{
DummyCompositor,
Win7Compositor,
DirectCompositionCompositor
};
virtual ~Compositor() = default;
......@@ -42,6 +48,8 @@ public:
virtual bool setupVoutWindow(vout_window_t *p_wnd) = 0;
virtual Type type() const = 0;
//factory
static Compositor* createCompositor(intf_thread_t *p_intf);
};
......
......@@ -326,4 +326,9 @@ bool CompositorDirectComposition::setupVoutWindow(vout_window_t *p_wnd)
return true;
}
Compositor::Type CompositorDirectComposition::type() const
{
return Compositor::DirectCompositionCompositor;
}
}
......@@ -52,6 +52,8 @@ public:
bool setupVoutWindow(vout_window_t *p_wnd) override;
Type type() const override;
private slots:
void onSurfacePositionChanged(QPointF position);
......
......@@ -74,4 +74,9 @@ bool CompositorDummy::setupVoutWindow(vout_window_t*)
return false;
}
Compositor::Type CompositorDummy::type() const
{
return Compositor::DummyCompositor;
}
}
......@@ -42,6 +42,8 @@ public:
bool setupVoutWindow(vout_window_t *p_wnd) override;
Type type() const override;
protected:
intf_thread_t *m_intf;
......
......@@ -273,6 +273,12 @@ bool CompositorWin7::setupVoutWindow(vout_window_t *p_wnd)
return true;
}
Compositor::Type CompositorWin7::type() const
{
return Compositor::Win7Compositor;
}
bool CompositorWin7::eventFilter(QObject*, QEvent* ev)
{
switch (ev->type())
......
......@@ -52,6 +52,8 @@ public:
virtual void destroyMainInterface() override;
virtual bool setupVoutWindow(vout_window_t*) override;
Type type() const override;
protected:
bool eventFilter(QObject *obj, QEvent *ev) override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment