Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBus Get Rate returns not the current rate after a DBUS Set Rate. #578

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion OMXControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ OMXControlResult OMXControl::handle_event(DBusMessage *m)
if(iSpeed > MAX_RATE)
iSpeed=MAX_RATE;
dbus_respond_double(m, iSpeed/1000.);//Reply before applying to be faster
clock->OMXSetSpeed(iSpeed, false, true);
clock->OMXSetSpeed(iSpeed);
clock->OMXSetSpeed(iSpeed, true, true);
return KeyConfig::ACTION_PLAY;
}
//Wrong property
Expand Down
10 changes: 9 additions & 1 deletion dbuscontrol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,16 @@ getsource)
[ $? -ne 0 ] && exit 1
echo "$source" | sed 's/^ *//'
;;
rate)
if [ "$#" -eq 1 ]; then
rate=`dbus-send --print-reply=literal --session --reply-timeout=500 --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:"org.mpris.MediaPlayer2.Player" string:"Rate"`
else
rate=`dbus-send --print-reply=literal --session --reply-timeout=500 --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Set string:"org.mpris.MediaPlayer2.Player" string:"Rate" ${2:+double:}$2`
fi
echo $rate
;;
*)
echo "usage: $0 status|pause|stop|seek|volumeup|volumedown|setposition [position in microseconds]|hidevideo|unhidevideo|togglesubtitles|hidesubtitles|showsubtitles|setvideopos [x1 y1 x2 y2]|setvideocroppos [x1 y1 x2 y2]|setaspectmode [letterbox,fill,stretch,default]|setalpha [alpha (0..255)]|getsource" >&2
echo "usage: $0 status|pause|stop|seek|volumeup|volumedown|setposition [position in microseconds]|hidevideo|unhidevideo|togglesubtitles|hidesubtitles|showsubtitles|setvideopos [x1 y1 x2 y2]|setvideocroppos [x1 y1 x2 y2]|setaspectmode [letterbox,fill,stretch,default]|setalpha [alpha (0..255)]|getsource|rate" >&2
exit 1
;;
esac