text
stringlengths
1
112
x play
x pause
x fast rewind
x fast forward
x stop
table media control point characteristic opcodes for media control
once the current track starts playing the server should notify the track position
characteristic to inform clients of the current track position the frequency of notification
this might seem ridiculous but the longest single video level of concern by the group twenty
one pilots is days hours minute s and seconds long and it is likely that someone will try
to break this record
section mcs and mcp
is down to th e implementation
another set of opcodes are available for moving around the current track which are shown
in table
opcode name parameters
x move relative bit signed integer
x previous segment none
x next segment none
x first segment none
x last segment none
x goto segment bit signed integer
table media control point characteristic opcodes for in track movement
the media control service allows segments to be defined within a track each segment
includes a name and an absolute offset from the start of the track the commands in table
allow a move to a specific segment of the current track none of these allow movement
outside the current track if the parameter value results in moving outside the current track
then the result will be limited to moving the position to the start of the track or the end of the
track but the track remains the current track
issuing the stop command will result in the current track becoming invalid so before any of
the comma nds in table can be used again the user will need to select another track as
current
two further sets of opcodes allow a different track to be selected as the curr ent track
move within a group move to another group
opcode name parameters opcode name parameters
x previous
track none x previous
group none
x next track none x next group none
x first track none x first group none
x last track none x last group none
x goto track bit signed
int x goto group bit signed
int
table media control point opcodes for moving around tracks and groups
when another group is selected the first track of the current group resulting from the
command becomes the current track
chapter telephony and media control
all segments tracks and groups start numbering at zero where a goto operation is used a
positive value n is equivalent to going to the first item and then executing the next item
opcode n times a negative value is equivalent to going to the last item and executing the
previous item opcode n times
moving to a new track makes it current and places it in the paused state of the state machine
of figure
it is only mandatory to support a minimum of one of the opcodes in the media control point
characteristic it is unlikely that any implementation would be that spartan but client s can
check what the server supports by reading the media control point opcodes supported
characteristic this is a bitfield which indicates which opcodes the server supports
as always with control point opcodes a client writes the opcode and receives a notificati on
of the operation in the media control point characteristic with a resultcode indicating
success opcode not supported or media player inactive once the server has fulfilled the
request it will also notify the appropriate characteristic for that ope ration if a change has
occurred in its value
modifying playback
the media control service has a couple of neat features for modifying playback and seeking
the first of these is the ability to request a change in playback speed using the playback speed
characteristic this can be written by the client to request that the current track is played
faster or slower the parameter for the characteristic is an bit signed integer p which
ranges in value from to where the actual p layback speed requested is
𝑠𝑝𝑒𝑒𝑑𝑝
ie the speed is to the power of p this gives a range of to which is
effectively ¼ to times the standard speed
playback speed is a blind request the client do es not know whether or not the value of p is
supported after the request the server notifies the value which has been set in the playback
speed characteristic if the request was outside the range that the server supports it should
set it to the clo sest available speed if the media source is live or streamed then the playback
speed characteristic value may be fixed to a value of it is entirely up to the implementation
to decide how to adjust the speed and whether to maintain the pitch of the a udio data
the other characteristic which can be varied is the seeking speed by writing a signed integer
value to the seeking speed characteristic this is used as a multiple of the current playback
speed with positive values signifying fast forward and negative values fast reverse the
seeking speed value is applied to the current playback speed not the default playback speed
where the value of p would be a value of for the seeking speed indicates a seeking speed
section mcs and mcp
which is the same as a playback speed with a value of p regardless of the current playback
speed
during seeking the track position characteristic should be notified to provide an indication
of the current track position the frequency of notification is determined by the
imple mentation seeking will stop when the track position has reached the start or end of
the current track
whilst seeking mcs states that no audio data should be played however the context type
which describes the use case not the content of the audio stream would not normally
change
playing order
the last feature to cover in mcs is the playing order the playing order characteristic
provides ten different ways to play tracks most of them cover the order of play when youre
playing an entire group the options are listed in table