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
43a486b5
Commit
43a486b5
authored
Jun 14, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make distinction between stop and ended status.
parent
13706670
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
36 additions
and
19 deletions
+36
-19
include/vlc/libvlc_events.h
include/vlc/libvlc_events.h
+2
-1
include/vlc/libvlc_structures.h
include/vlc/libvlc_structures.h
+3
-2
include/vlc/mediacontrol_structures.h
include/vlc/mediacontrol_structures.h
+2
-2
include/vlc_input.h
include/vlc_input.h
+2
-1
modules/control/dbus.c
modules/control/dbus.c
+1
-1
modules/gui/ncurses.c
modules/gui/ncurses.c
+4
-0
src/control/event.c
src/control/event.c
+2
-1
src/control/media_list_player.c
src/control/media_list_player.c
+4
-4
src/control/media_player.c
src/control/media_player.c
+11
-5
src/control/mediacontrol_core.c
src/control/mediacontrol_core.c
+5
-2
No files found.
include/vlc/libvlc_events.h
View file @
43a486b5
...
@@ -52,9 +52,10 @@ typedef enum libvlc_event_type_t {
...
@@ -52,9 +52,10 @@ typedef enum libvlc_event_type_t {
libvlc_MediaPlayerBuffering
,
libvlc_MediaPlayerBuffering
,
libvlc_MediaPlayerPlaying
,
libvlc_MediaPlayerPlaying
,
libvlc_MediaPlayerPaused
,
libvlc_MediaPlayerPaused
,
libvlc_MediaPlayer
EndReach
ed
,
libvlc_MediaPlayer
Stopp
ed
,
libvlc_MediaPlayerForward
,
libvlc_MediaPlayerForward
,
libvlc_MediaPlayerBackward
,
libvlc_MediaPlayerBackward
,
libvlc_MediaPlayerEndReached
,
libvlc_MediaPlayerEncounteredError
,
libvlc_MediaPlayerEncounteredError
,
libvlc_MediaPlayerTimeChanged
,
libvlc_MediaPlayerTimeChanged
,
libvlc_MediaPlayerPositionChanged
,
libvlc_MediaPlayerPositionChanged
,
...
...
include/vlc/libvlc_structures.h
View file @
43a486b5
...
@@ -125,7 +125,7 @@ typedef struct libvlc_media_player_t libvlc_media_player_t;
...
@@ -125,7 +125,7 @@ typedef struct libvlc_media_player_t libvlc_media_player_t;
*
*
* Expected states by web plugins are:
* Expected states by web plugins are:
* IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4,
* IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4,
* STOPPING=5, FORWARD=6, BACKWARD=7, E
RROR=8
* STOPPING=5, FORWARD=6, BACKWARD=7, E
NDED=8, ERROR=9
*/
*/
typedef
enum
libvlc_state_t
typedef
enum
libvlc_state_t
{
{
...
@@ -134,9 +134,10 @@ typedef enum libvlc_state_t
...
@@ -134,9 +134,10 @@ typedef enum libvlc_state_t
libvlc_Buffering
,
libvlc_Buffering
,
libvlc_Playing
,
libvlc_Playing
,
libvlc_Paused
,
libvlc_Paused
,
libvlc_
End
ed
,
libvlc_
Stopp
ed
,
libvlc_Forward
,
libvlc_Forward
,
libvlc_Backward
,
libvlc_Backward
,
libvlc_Ended
,
libvlc_Error
libvlc_Error
}
libvlc_state_t
;
}
libvlc_state_t
;
...
...
include/vlc/mediacontrol_structures.h
View file @
43a486b5
...
@@ -68,9 +68,9 @@ typedef enum {
...
@@ -68,9 +68,9 @@ typedef enum {
typedef
enum
{
typedef
enum
{
mediacontrol_UndefinedStatus
=
0
,
mediacontrol_InitStatus
,
mediacontrol_UndefinedStatus
=
0
,
mediacontrol_InitStatus
,
mediacontrol_BufferingStatus
,
mediacontrol_PlayingStatus
,
mediacontrol_BufferingStatus
,
mediacontrol_PlayingStatus
,
mediacontrol_PauseStatus
,
mediacontrol_
End
Status
,
mediacontrol_PauseStatus
,
mediacontrol_
Stop
Status
,
mediacontrol_ForwardStatus
,
mediacontrol_BackwardStatus
,
mediacontrol_ForwardStatus
,
mediacontrol_BackwardStatus
,
mediacontrol_ErrorStatus
,
mediacontrol_E
ndStatus
,
mediacontrol_E
rrorStatus
,
}
mediacontrol_PlayerStatus
;
}
mediacontrol_PlayerStatus
;
/**
/**
...
...
include/vlc_input.h
View file @
43a486b5
...
@@ -532,9 +532,10 @@ enum input_state_e
...
@@ -532,9 +532,10 @@ enum input_state_e
BUFFERING_S
,
BUFFERING_S
,
PLAYING_S
,
PLAYING_S
,
PAUSE_S
,
PAUSE_S
,
END
_S
,
STOP
_S
,
FORWARD_S
,
FORWARD_S
,
BACKWARD_S
,
BACKWARD_S
,
END_S
,
ERROR_S
ERROR_S
};
};
...
...
modules/control/dbus.c
View file @
43a486b5
...
@@ -949,7 +949,7 @@ static int StateChange( vlc_object_t *p_this, const char* psz_var,
...
@@ -949,7 +949,7 @@ static int StateChange( vlc_object_t *p_this, const char* psz_var,
}
}
if
(
newval
.
i_int
==
PLAYING_S
||
newval
.
i_int
==
PAUSE_S
||
if
(
newval
.
i_int
==
PLAYING_S
||
newval
.
i_int
==
PAUSE_S
||
newval
.
i_int
==
END_S
)
newval
.
i_int
==
STOP_S
||
newval
.
i_int
==
END_S
)
{
{
StatusChangeSignal
(
p_sys
->
p_conn
,
(
void
*
)
p_intf
);
StatusChangeSignal
(
p_sys
->
p_conn
,
(
void
*
)
p_intf
);
}
}
...
...
modules/gui/ncurses.c
View file @
43a486b5
...
@@ -1558,6 +1558,10 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
...
@@ -1558,6 +1558,10 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
{
{
mvnprintw
(
y
++
,
0
,
COLS
,
_
(
" State : Playing %s"
),
psz_state
);
mvnprintw
(
y
++
,
0
,
COLS
,
_
(
" State : Playing %s"
),
psz_state
);
}
}
else
if
(
val
.
i_int
==
STOP_S
)
{
mvnprintw
(
y
++
,
0
,
COLS
,
_
(
" State : Stopped %s"
),
psz_state
);
}
else
if
(
val
.
i_int
==
OPENING_S
)
else
if
(
val
.
i_int
==
OPENING_S
)
{
{
mvnprintw
(
y
++
,
0
,
COLS
,
_
(
" State : Opening/Connecting %s"
),
psz_state
);
mvnprintw
(
y
++
,
0
,
COLS
,
_
(
" State : Opening/Connecting %s"
),
psz_state
);
...
...
src/control/event.c
View file @
43a486b5
...
@@ -244,9 +244,10 @@ static const char event_type_to_name[][35] =
...
@@ -244,9 +244,10 @@ static const char event_type_to_name[][35] =
EVENT
(
libvlc_MediaPlayerBuffering
),
EVENT
(
libvlc_MediaPlayerBuffering
),
EVENT
(
libvlc_MediaPlayerPlaying
),
EVENT
(
libvlc_MediaPlayerPlaying
),
EVENT
(
libvlc_MediaPlayerPaused
),
EVENT
(
libvlc_MediaPlayerPaused
),
EVENT
(
libvlc_MediaPlayer
EndReach
ed
),
EVENT
(
libvlc_MediaPlayer
Stopp
ed
),
EVENT
(
libvlc_MediaPlayerForward
),
EVENT
(
libvlc_MediaPlayerForward
),
EVENT
(
libvlc_MediaPlayerBackward
),
EVENT
(
libvlc_MediaPlayerBackward
),
EVENT
(
libvlc_MediaPlayerEndReached
),
EVENT
(
libvlc_MediaPlayerTimeChanged
),
EVENT
(
libvlc_MediaPlayerTimeChanged
),
EVENT
(
libvlc_MediaPlayerPositionChanged
),
EVENT
(
libvlc_MediaPlayerPositionChanged
),
EVENT
(
libvlc_MediaPlayerSeekableChanged
),
EVENT
(
libvlc_MediaPlayerSeekableChanged
),
...
...
src/control/media_list_player.c
View file @
43a486b5
...
@@ -435,7 +435,7 @@ void libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
...
@@ -435,7 +435,7 @@ void libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
{
{
if
(
p_mlp
->
p_mi
)
if
(
p_mlp
->
p_mi
)
{
{
libvlc_media_player_stop
(
p_mlp
->
p_mi
,
p_e
);
libvlc_media_player_stop
(
p_mlp
->
p_mi
,
p_e
);
}
}
vlc_mutex_lock
(
&
p_mlp
->
object_lock
);
vlc_mutex_lock
(
&
p_mlp
->
object_lock
);
...
@@ -449,7 +449,7 @@ void libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
...
@@ -449,7 +449,7 @@ void libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
**************************************************************************/
**************************************************************************/
void
libvlc_media_list_player_next
(
libvlc_media_list_player_t
*
p_mlp
,
void
libvlc_media_list_player_next
(
libvlc_media_list_player_t
*
p_mlp
,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
libvlc_media_list_path_t
path
;
libvlc_media_list_path_t
path
;
if
(
!
p_mlp
->
p_mlist
)
if
(
!
p_mlp
->
p_mlist
)
...
@@ -457,7 +457,7 @@ void libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
...
@@ -457,7 +457,7 @@ void libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
libvlc_exception_raise
(
p_e
,
"No more element to play"
);
libvlc_exception_raise
(
p_e
,
"No more element to play"
);
return
;
return
;
}
}
libvlc_media_list_lock
(
p_mlp
->
p_mlist
);
libvlc_media_list_lock
(
p_mlp
->
p_mlist
);
path
=
get_next_path
(
p_mlp
);
path
=
get_next_path
(
p_mlp
);
...
@@ -471,7 +471,7 @@ void libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
...
@@ -471,7 +471,7 @@ void libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
}
}
set_current_playing_item
(
p_mlp
,
path
,
p_e
);
set_current_playing_item
(
p_mlp
,
path
,
p_e
);
libvlc_media_player_play
(
p_mlp
->
p_mi
,
p_e
);
libvlc_media_player_play
(
p_mlp
->
p_mi
,
p_e
);
libvlc_media_list_unlock
(
p_mlp
->
p_mlist
);
libvlc_media_list_unlock
(
p_mlp
->
p_mlist
);
...
...
src/control/media_player.c
View file @
43a486b5
...
@@ -56,9 +56,10 @@ static const libvlc_state_t vlc_to_libvlc_state_array[] =
...
@@ -56,9 +56,10 @@ static const libvlc_state_t vlc_to_libvlc_state_array[] =
[
BUFFERING_S
]
=
libvlc_Buffering
,
[
BUFFERING_S
]
=
libvlc_Buffering
,
[
PLAYING_S
]
=
libvlc_Playing
,
[
PLAYING_S
]
=
libvlc_Playing
,
[
PAUSE_S
]
=
libvlc_Paused
,
[
PAUSE_S
]
=
libvlc_Paused
,
[
END_S
]
=
libvlc_End
ed
,
[
STOP_S
]
=
libvlc_Stopp
ed
,
[
FORWARD_S
]
=
libvlc_Forward
,
[
FORWARD_S
]
=
libvlc_Forward
,
[
BACKWARD_S
]
=
libvlc_Backward
,
[
BACKWARD_S
]
=
libvlc_Backward
,
[
END_S
]
=
libvlc_Ended
,
[
ERROR_S
]
=
libvlc_Error
,
[
ERROR_S
]
=
libvlc_Error
,
};
};
...
@@ -166,9 +167,9 @@ input_state_changed( const vlc_event_t * event, void * p_userdata )
...
@@ -166,9 +167,9 @@ input_state_changed( const vlc_event_t * event, void * p_userdata )
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Paused
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Paused
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayerPaused
;
forwarded_event
.
type
=
libvlc_MediaPlayerPaused
;
break
;
break
;
case
END
_S
:
case
STOP
_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_
End
ed
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_
Stopp
ed
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayer
EndReach
ed
;
forwarded_event
.
type
=
libvlc_MediaPlayer
Stopp
ed
;
break
;
break
;
case
FORWARD_S
:
case
FORWARD_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Forward
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Forward
,
NULL
);
...
@@ -178,6 +179,9 @@ input_state_changed( const vlc_event_t * event, void * p_userdata )
...
@@ -178,6 +179,9 @@ input_state_changed( const vlc_event_t * event, void * p_userdata )
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Backward
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Backward
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayerBackward
;
forwarded_event
.
type
=
libvlc_MediaPlayerBackward
;
break
;
break
;
case
END_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Ended
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayerEndReached
;
case
ERROR_S
:
case
ERROR_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Error
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Error
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayerEncounteredError
;
forwarded_event
.
type
=
libvlc_MediaPlayerEncounteredError
;
...
@@ -350,11 +354,13 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
...
@@ -350,11 +354,13 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayerPaused
,
p_e
);
libvlc_MediaPlayerPaused
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayer
EndReach
ed
,
p_e
);
libvlc_MediaPlayer
Stopp
ed
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayerForward
,
p_e
);
libvlc_MediaPlayerForward
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayerBackward
,
p_e
);
libvlc_MediaPlayerBackward
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayerEndReached
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
libvlc_MediaPlayerEncounteredError
,
p_e
);
libvlc_MediaPlayerEncounteredError
,
p_e
);
...
...
src/control/mediacontrol_core.c
View file @
43a486b5
...
@@ -376,8 +376,8 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
...
@@ -376,8 +376,8 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
case
libvlc_Paused
:
case
libvlc_Paused
:
retval
->
streamstatus
=
mediacontrol_PauseStatus
;
retval
->
streamstatus
=
mediacontrol_PauseStatus
;
break
;
break
;
case
libvlc_
End
ed
:
case
libvlc_
Stopp
ed
:
retval
->
streamstatus
=
mediacontrol_
End
Status
;
retval
->
streamstatus
=
mediacontrol_
Stop
Status
;
break
;
break
;
case
libvlc_Forward
:
case
libvlc_Forward
:
retval
->
streamstatus
=
mediacontrol_ForwardStatus
;
retval
->
streamstatus
=
mediacontrol_ForwardStatus
;
...
@@ -385,6 +385,9 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
...
@@ -385,6 +385,9 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
case
libvlc_Backward
:
case
libvlc_Backward
:
retval
->
streamstatus
=
mediacontrol_BackwardStatus
;
retval
->
streamstatus
=
mediacontrol_BackwardStatus
;
break
;
break
;
case
libvlc_Ended
:
retval
->
streamstatus
=
mediacontrol_EndStatus
;
break
;
case
libvlc_Error
:
case
libvlc_Error
:
retval
->
streamstatus
=
mediacontrol_ErrorStatus
;
retval
->
streamstatus
=
mediacontrol_ErrorStatus
;
break
;
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