[vlc-devel] mediacontrol patch

Filippo Carone filippo at carone.org
Sat Dec 10 01:41:28 CET 2005


 Hi,
 I propose the following changes in the mediacontrol interface:

Index: control.h
===================================================================
--- control.h   (revision 13654)
+++ control.h   (working copy)
@@ -2,7 +2,7 @@
  * control.h: global header for mediacontrol
  *****************************************************************************
  * Copyright (C) 2005 the VideoLAN team
- * $Id: vlc.h 10101 2005-03-02 16:47:31Z robux4 $
+ * $Id$
  *
  * Authors: Olivier Aubert <olivier.aubert at liris.univ-lyon1.fr>
  *
@@ -142,7 +142,7 @@
   mediacontrol_new( char **args, mediacontrol_Exception *exception );

 mediacontrol_Instance *
-  mediacontrol_new_from_object( vlc_object_t *p_object,
+  mediacontrol_new_from_object( int vlc_object_id,
                                 mediacontrol_Exception *exception );

 mediacontrol_Position *

Index: src/control/core.c
===================================================================
--- src/control/core.c  (revision 13654)
+++ src/control/core.c  (working copy)
@@ -2,7 +2,7 @@
  * core.c: Core functions : init, playlist, stream management
  *****************************************************************************
  * Copyright (C) 2005 the VideoLAN team
- * $Id: vlc.c 10786 2005-04-23 23:19:17Z zorglub $
+ * $Id$
  *
  * Authors: Olivier Aubert <olivier.aubert at liris.univ-lyon1.fr>
  *
@@ -57,12 +57,15 @@
                        exception->message = strdup(m);


-mediacontrol_Instance* mediacontrol_new_from_object( vlc_object_t* p_object,
+mediacontrol_Instance* mediacontrol_new_from_object( int vlc_object_id,
                                                      mediacontrol_Exception *exception )
 {
     mediacontrol_Instance* retval;
     vlc_object_t *p_vlc;
+    vlc_object_t *p_object;

+    p_object = (vlc_object_t*) vlc_current_object(vlc_object_id);
+
     p_vlc = vlc_object_find( p_object, VLC_OBJECT_ROOT, FIND_PARENT );
     if( ! p_vlc )
     {

The basic reason behind these changes is the vlc_object_t pointer
cannot be retrieved from public APIs while control.h is public and the
vlc_object_id is the abstraction publicly used.

 Cheers,
 fc

-- 
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