Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
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
Show 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 {
libvlc_MediaPlayerBuffering
,
libvlc_MediaPlayerPlaying
,
libvlc_MediaPlayerPaused
,
libvlc_MediaPlayer
EndReach
ed
,
libvlc_MediaPlayer
Stopp
ed
,
libvlc_MediaPlayerForward
,
libvlc_MediaPlayerBackward
,
libvlc_MediaPlayerEndReached
,
libvlc_MediaPlayerEncounteredError
,
libvlc_MediaPlayerTimeChanged
,
libvlc_MediaPlayerPositionChanged
,
...
...
include/vlc/libvlc_structures.h
View file @
43a486b5
...
...
@@ -125,7 +125,7 @@ typedef struct libvlc_media_player_t libvlc_media_player_t;
*
* Expected states by web plugins are:
* 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
{
...
...
@@ -134,9 +134,10 @@ typedef enum libvlc_state_t
libvlc_Buffering
,
libvlc_Playing
,
libvlc_Paused
,
libvlc_
End
ed
,
libvlc_
Stopp
ed
,
libvlc_Forward
,
libvlc_Backward
,
libvlc_Ended
,
libvlc_Error
}
libvlc_state_t
;
...
...
include/vlc/mediacontrol_structures.h
View file @
43a486b5
...
...
@@ -68,9 +68,9 @@ typedef enum {
typedef
enum
{
mediacontrol_UndefinedStatus
=
0
,
mediacontrol_InitStatus
,
mediacontrol_BufferingStatus
,
mediacontrol_PlayingStatus
,
mediacontrol_PauseStatus
,
mediacontrol_
End
Status
,
mediacontrol_PauseStatus
,
mediacontrol_
Stop
Status
,
mediacontrol_ForwardStatus
,
mediacontrol_BackwardStatus
,
mediacontrol_ErrorStatus
,
mediacontrol_E
ndStatus
,
mediacontrol_E
rrorStatus
,
}
mediacontrol_PlayerStatus
;
/**
...
...
include/vlc_input.h
View file @
43a486b5
...
...
@@ -532,9 +532,10 @@ enum input_state_e
BUFFERING_S
,
PLAYING_S
,
PAUSE_S
,
END
_S
,
STOP
_S
,
FORWARD_S
,
BACKWARD_S
,
END_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,
}
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
);
}
...
...
modules/gui/ncurses.c
View file @
43a486b5
...
...
@@ -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
);
}
else
if
(
val
.
i_int
==
STOP_S
)
{
mvnprintw
(
y
++
,
0
,
COLS
,
_
(
" State : Stopped %s"
),
psz_state
);
}
else
if
(
val
.
i_int
==
OPENING_S
)
{
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] =
EVENT
(
libvlc_MediaPlayerBuffering
),
EVENT
(
libvlc_MediaPlayerPlaying
),
EVENT
(
libvlc_MediaPlayerPaused
),
EVENT
(
libvlc_MediaPlayer
EndReach
ed
),
EVENT
(
libvlc_MediaPlayer
Stopp
ed
),
EVENT
(
libvlc_MediaPlayerForward
),
EVENT
(
libvlc_MediaPlayerBackward
),
EVENT
(
libvlc_MediaPlayerEndReached
),
EVENT
(
libvlc_MediaPlayerTimeChanged
),
EVENT
(
libvlc_MediaPlayerPositionChanged
),
EVENT
(
libvlc_MediaPlayerSeekableChanged
),
...
...
src/control/media_list_player.c
View file @
43a486b5
src/control/media_player.c
View file @
43a486b5
...
...
@@ -56,9 +56,10 @@ static const libvlc_state_t vlc_to_libvlc_state_array[] =
[
BUFFERING_S
]
=
libvlc_Buffering
,
[
PLAYING_S
]
=
libvlc_Playing
,
[
PAUSE_S
]
=
libvlc_Paused
,
[
END_S
]
=
libvlc_End
ed
,
[
STOP_S
]
=
libvlc_Stopp
ed
,
[
FORWARD_S
]
=
libvlc_Forward
,
[
BACKWARD_S
]
=
libvlc_Backward
,
[
END_S
]
=
libvlc_Ended
,
[
ERROR_S
]
=
libvlc_Error
,
};
...
...
@@ -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
);
forwarded_event
.
type
=
libvlc_MediaPlayerPaused
;
break
;
case
END
_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_
End
ed
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayer
EndReach
ed
;
case
STOP
_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_
Stopp
ed
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayer
Stopp
ed
;
break
;
case
FORWARD_S
:
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 )
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Backward
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayerBackward
;
break
;
case
END_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Ended
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayerEndReached
;
case
ERROR_S
:
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Error
,
NULL
);
forwarded_event
.
type
=
libvlc_MediaPlayerEncounteredError
;
...
...
@@ -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_MediaPlayerPaused
,
p_e
);
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_MediaPlayerForward
,
p_e
);
libvlc_event_manager_register_event_type
(
p_mi
->
p_event_manager
,
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_MediaPlayerEncounteredError
,
p_e
);
...
...
src/control/mediacontrol_core.c
View file @
43a486b5
...
...
@@ -376,8 +376,8 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
case
libvlc_Paused
:
retval
->
streamstatus
=
mediacontrol_PauseStatus
;
break
;
case
libvlc_
End
ed
:
retval
->
streamstatus
=
mediacontrol_
End
Status
;
case
libvlc_
Stopp
ed
:
retval
->
streamstatus
=
mediacontrol_
Stop
Status
;
break
;
case
libvlc_Forward
:
retval
->
streamstatus
=
mediacontrol_ForwardStatus
;
...
...
@@ -385,6 +385,9 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
case
libvlc_Backward
:
retval
->
streamstatus
=
mediacontrol_BackwardStatus
;
break
;
case
libvlc_Ended
:
retval
->
streamstatus
=
mediacontrol_EndStatus
;
break
;
case
libvlc_Error
:
retval
->
streamstatus
=
mediacontrol_ErrorStatus
;
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