Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
ed4089a2
Commit
ed4089a2
authored
Jul 21, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oldrc: do not report volume twice, always report playlist status
parent
091d9830
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
24 deletions
+29
-24
modules/control/rc.c
modules/control/rc.c
+29
-24
No files found.
modules/control/rc.c
View file @
ed4089a2
...
...
@@ -502,8 +502,6 @@ static void Run( intf_thread_t *p_intf )
input_item_GetURI
(
input_GetItem
(
p_input
)
);
msg_rc
(
STATUS_CHANGE
"( new input: %s )"
,
psz_uri
);
free
(
psz_uri
);
msg_rc
(
STATUS_CHANGE
"( audio volume: %d )"
,
(
int
)
config_GetInt
(
p_intf
,
"volume"
));
}
var_AddCallback
(
p_input
,
"intf-event"
,
InputEvent
,
p_intf
);
}
...
...
@@ -1416,30 +1414,37 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
/* Replay the current state of the system. */
char
*
psz_uri
=
input_item_GetURI
(
input_GetItem
(
p_input
)
);
msg_rc
(
STATUS_CHANGE
"( new input: %s )"
,
psz_uri
);
free
(
psz_uri
);
msg_rc
(
STATUS_CHANGE
"( audio volume: %d )"
,
(
int
)
config_GetInt
(
p_intf
,
"volume"
));
PL_LOCK
;
int
status
=
playlist_Status
(
p_playlist
);
PL_UNLOCK
;
switch
(
status
)
vlc_object_release
(
p_input
);
if
(
likely
(
psz_uri
!=
NULL
)
)
{
case
PLAYLIST_STOPPED
:
msg_rc
(
STATUS_CHANGE
"( stop state: 5 )"
);
break
;
case
PLAYLIST_RUNNING
:
msg_rc
(
STATUS_CHANGE
"( play state: 3 )"
);
break
;
case
PLAYLIST_PAUSED
:
msg_rc
(
STATUS_CHANGE
"( pause state: 4 )"
);
break
;
default:
msg_rc
(
STATUS_CHANGE
"( unknown state: -1 )"
);
break
;
msg_rc
(
STATUS_CHANGE
"( new input: %s )"
,
psz_uri
);
free
(
psz_uri
);
}
vlc_object_release
(
p_input
);
}
float
volume
=
aout_VolumeGet
(
p_playlist
);
if
(
volume
>=
0
.
f
)
msg_rc
(
STATUS_CHANGE
"( audio volume: %ld )"
,
lroundf
(
volume
*
AOUT_VOLUME_DEFAULT
)
);
int
status
;
PL_LOCK
;
status
=
playlist_Status
(
p_playlist
);
PL_UNLOCK
;
switch
(
status
)
{
case
PLAYLIST_STOPPED
:
msg_rc
(
STATUS_CHANGE
"( stop state: 5 )"
);
break
;
case
PLAYLIST_RUNNING
:
msg_rc
(
STATUS_CHANGE
"( play state: 3 )"
);
break
;
case
PLAYLIST_PAUSED
:
msg_rc
(
STATUS_CHANGE
"( pause state: 4 )"
);
break
;
default:
msg_rc
(
STATUS_CHANGE
"( unknown state: -1 )"
);
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment