dbus: correctly expose hardware acceleration

Hardware acceleration was not correctly exposed through the dbus
interfaces

Change-Id: I93dcf14f2a19a6ce768b8ac9799e5f96a8eaa44d
This commit is contained in:
philippegorley
2017-06-14 11:51:58 -04:00
parent cae7115253
commit 2cdc662a3d
3 changed files with 18 additions and 5 deletions

View File

@ -78,6 +78,20 @@
</arg>
</method>
<method name="getDecodingAccelerated" tp:name-for-bindings="getDecodingAccelerated">
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="Bool"/>
<arg type="b" name="state" direction="out">
<tp:docstring>Returns true if hardware decoding is enabled, false otherwise</tp:docstring>
</arg>
</method>
<method name="setDecodingAccelerated" tp:name-for-bindings="setDecodingAccelerated">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="Bool"/>
<arg type="b" name="state" direction="in">
<tp:docstring>Toggle hardware decoding</tp:docstring>
</arg>
</method>
<signal name="deviceEvent" tp:name-for-bindings="deviceEvent">
<tp:docstring>Signal triggered by changes in the detected v4l2 devices, e.g. a camera being unplugged.</tp:docstring>
</signal>
@ -113,6 +127,5 @@
<tp:docstring>Whether or not this texture belongs to a video mixer or is a single texture</tp:docstring>
</arg>
</signal>
</interface>
</node>

View File

@ -85,14 +85,14 @@ DBusVideoManager::hasCameraStarted() -> decltype(DRing::hasCameraStarted())
return DRing::hasCameraStarted();
}
bool
DBusVideoManager::getDecodingAccelerated()
auto
DBusVideoManager::getDecodingAccelerated() -> decltype(DRing::getDecodingAccelerated())
{
return DRing::getDecodingAccelerated();
}
void
DBusVideoManager::setDecodingAccelerated(bool state)
DBusVideoManager::setDecodingAccelerated(const bool& state)
{
DRing::setDecodingAccelerated(state);
}

View File

@ -61,7 +61,7 @@ class DBusVideoManager :
bool switchInput(const std::string& resource);
bool hasCameraStarted();
bool getDecodingAccelerated();
void setDecodingAccelerated(bool state);
void setDecodingAccelerated(const bool& state);
};
#endif // __RING_DBUSVIDEOMANAGER_H__