[vlc-devel] [patch] mediacontrol core.c new function
Filippo Carone
filippo at carone.org
Mon Dec 12 11:11:11 CET 2005
I'm sending this one in order to get a review on this code and to
know if I can generally proceed in this way:
Index: src/control/core.c
===================================================================
--- src/control/core.c (revision 13694)
+++ src/control/core.c (working copy)
@@ -117,20 +117,16 @@
if( ! p_input )
{
- /*
- RAISE( mediacontrol_InternalException, "No input thread." );
- return( NULL );
- */
- retval->value = 0;
- return retval;
+ RAISE( mediacontrol_InternalException, "No input thread." );
+ return( NULL );
}
if( an_origin == mediacontrol_RelativePosition
|| an_origin == mediacontrol_ModuloPosition )
{
/* Relative or ModuloPosition make no sense */
- retval->value = 0;
- return retval;
+ RAISE( mediacontrol_InternalException, "Relative or Modulo position used to get media position. Use AbsolutePosition instead." );
+ return NULL;
}
/* We are asked for an AbsolutePosition. */
@@ -287,6 +283,19 @@
}
void
+mediacontrol_playlist_next_item( mediacontrol_Instance *self,
+ mediacontrol_Exception *exception )
+{
+ exception=mediacontrol_exception_init( exception );
+ if ( !self->p_playlist )
+ {
+ RAISE( mediacontrol_InternalException, "No playlist" );
+ return;
+ }
+ playlist_Next( self->p_playlist );
+}
+
+void
mediacontrol_playlist_clear( mediacontrol_Instance *self,
mediacontrol_Exception *exception )
{
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list