summaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorManiac <na@na.na>2015-07-03 22:29:41 +0200
committerManiac <na@na.na>2015-07-03 22:29:41 +0200
commitda407909879f82c15f786bda3fedda0cae892100 (patch)
tree143c2b842028c38e8f7facfe576567039459afd9 /status.c
downloadvdr-plugin-mpv-da407909879f82c15f786bda3fedda0cae892100.tar.gz
vdr-plugin-mpv-da407909879f82c15f786bda3fedda0cae892100.tar.bz2
import 0.0.40.0.4
Diffstat (limited to 'status.c')
-rw-r--r--status.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/status.c b/status.c
new file mode 100644
index 0000000..5dc6f59
--- /dev/null
+++ b/status.c
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+/// ///
+/// This file is part of the VDR mpv plugin and licensed under AGPLv3 ///
+/// ///
+/// See the README file for copyright information ///
+/// ///
+//////////////////////////////////////////////////////////////////////////////
+
+#include "status.h"
+
+cMpvStatus::cMpvStatus(cMpvPlayer *player)
+{
+ Volume = cDevice::CurrentVolume();
+ Player = player;
+}
+
+void cMpvStatus::SetVolume(int volume, bool absolute)
+{
+ if (absolute)
+ Volume = volume;
+ else
+ Volume += volume;
+
+ Player->SetVolume(Volume/2.55);
+}