[vlc-devel] commit: Move users of playlist_select() inline. (JP Dinger )
git version control
git at videolan.org
Tue Mar 10 17:09:23 CET 2009
vlc | branch: master | JP Dinger <jpd at m2x.nl> | Tue Mar 10 13:22:06 2009 +0100| [6395b3e54482ef1506f0ba88afb58ba1f6c8434a] | committer: Rémi Denis-Courmont
Move users of playlist_select() inline.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6395b3e54482ef1506f0ba88afb58ba1f6c8434a
---
projects/mozilla/vlcplugin.cpp | 46 ------------------------------------
projects/mozilla/vlcplugin.h | 50 ++++++++++++++++++++++++++++++++--------
2 files changed, 40 insertions(+), 56 deletions(-)
diff --git a/projects/mozilla/vlcplugin.cpp b/projects/mozilla/vlcplugin.cpp
index 1c4a083..51704b1 100644
--- a/projects/mozilla/vlcplugin.cpp
+++ b/projects/mozilla/vlcplugin.cpp
@@ -344,24 +344,6 @@ int VlcPlugin::playlist_add_extended_untrusted( const char *mrl, const char *nam
return item;
}
-void VlcPlugin::playlist_play( libvlc_exception_t *ex )
-{
- if( libvlc_media_player||playlist_select(0,ex) )
- libvlc_media_player_play(libvlc_media_player,ex);
-}
-
-void VlcPlugin::playlist_play_item( int idx, libvlc_exception_t *ex )
-{
- if( playlist_select(idx,ex) )
- libvlc_media_player_play(libvlc_media_player,ex);
-}
-
-void VlcPlugin::playlist_stop( libvlc_exception_t *ex )
-{
- if( libvlc_media_player )
- libvlc_media_player_stop(libvlc_media_player,ex);
-}
-
bool VlcPlugin::playlist_select( int idx, libvlc_exception_t *ex )
{
libvlc_media_t *p_m = NULL;
@@ -401,24 +383,6 @@ bad_unlock:
return false;
}
-void VlcPlugin::playlist_next( libvlc_exception_t *ex )
-{
- if( playlist_select(playlist_index+1,ex) )
- libvlc_media_player_play(libvlc_media_player,ex);
-}
-
-void VlcPlugin::playlist_prev( libvlc_exception_t *ex )
-{
- if( playlist_select(playlist_index-1,ex) )
- libvlc_media_player_play(libvlc_media_player,ex);
-}
-
-void VlcPlugin::playlist_pause( libvlc_exception_t *ex )
-{
- if( libvlc_media_player )
- libvlc_media_player_pause(libvlc_media_player,ex);
-}
-
void VlcPlugin::playlist_delete_item( int idx, libvlc_exception_t *ex )
{
libvlc_media_list_lock(libvlc_media_list);
@@ -442,26 +406,16 @@ int VlcPlugin::playlist_count( libvlc_exception_t *ex )
return items_count;
}
-int VlcPlugin::playlist_isplaying( libvlc_exception_t *ex )
-{
- int is_playing = 0;
- if( libvlc_media_player )
- is_playing = libvlc_media_player_is_playing( libvlc_media_player, ex );
- return is_playing;
-}
-
void VlcPlugin::toggle_fullscreen( libvlc_exception_t *ex )
{
if( playlist_isplaying(ex) )
libvlc_toggle_fullscreen(libvlc_media_player,ex);
}
-
void VlcPlugin::set_fullscreen( int yes, libvlc_exception_t *ex )
{
if( playlist_isplaying(ex) )
libvlc_set_fullscreen(libvlc_media_player,yes,ex);
}
-
int VlcPlugin::get_fullscreen( libvlc_exception_t *ex )
{
int r = 0;
diff --git a/projects/mozilla/vlcplugin.h b/projects/mozilla/vlcplugin.h
index 403a727..ed109ae 100644
--- a/projects/mozilla/vlcplugin.h
+++ b/projects/mozilla/vlcplugin.h
@@ -147,22 +147,51 @@ public:
int b_toolbar;
char * psz_target;
- bool playlist_select(int,libvlc_exception_t *);
+ void playlist_play(libvlc_exception_t *ex)
+ {
+ if( libvlc_media_player||playlist_select(0,ex) )
+ libvlc_media_player_play(libvlc_media_player,ex);
+ }
+ void playlist_play_item(int idx,libvlc_exception_t *ex)
+ {
+ if( playlist_select(idx,ex) )
+ libvlc_media_player_play(libvlc_media_player,ex);
+ }
+ void playlist_stop(libvlc_exception_t *ex)
+ {
+ if( libvlc_media_player )
+ libvlc_media_player_stop(libvlc_media_player,ex);
+ }
+ void playlist_next(libvlc_exception_t *ex)
+ {
+ if( playlist_select(playlist_index+1,ex) )
+ libvlc_media_player_play(libvlc_media_player,ex);
+ }
+ void playlist_prev(libvlc_exception_t *ex)
+ {
+ if( playlist_select(playlist_index-1,ex) )
+ libvlc_media_player_play(libvlc_media_player,ex);
+ }
+ void playlist_pause(libvlc_exception_t *ex)
+ {
+ if( libvlc_media_player )
+ libvlc_media_player_pause(libvlc_media_player,ex);
+ }
+ int playlist_isplaying(libvlc_exception_t *ex)
+ {
+ int is_playing = 0;
+ if( libvlc_media_player )
+ is_playing = libvlc_media_player_is_playing(
+ libvlc_media_player, ex );
+ return is_playing;
+ }
int playlist_add( const char *, libvlc_exception_t * );
int playlist_add_extended_untrusted( const char *, const char *, int,
const char **, libvlc_exception_t * );
- void playlist_play( libvlc_exception_t * );
- void playlist_play_item( int, libvlc_exception_t * );
- void playlist_stop( libvlc_exception_t * );
- void playlist_next( libvlc_exception_t * );
- void playlist_prev( libvlc_exception_t * );
- void playlist_pause( libvlc_exception_t * );
void playlist_delete_item( int, libvlc_exception_t * );
-
void playlist_clear( libvlc_exception_t * );
- int playlist_count( libvlc_exception_t * );
- int playlist_isplaying( libvlc_exception_t * );
+ int playlist_count( libvlc_exception_t * );
void toggle_fullscreen( libvlc_exception_t * );
void set_fullscreen( int, libvlc_exception_t * );
@@ -171,6 +200,7 @@ public:
int player_has_vout( libvlc_exception_t * );
private:
+ bool playlist_select(int,libvlc_exception_t *);
void set_player_window( libvlc_exception_t * );
/* VLC reference */
More information about the vlc-devel
mailing list