[vlc-devel] libvlc evolution ?

Olivier Aubert oaubert at bat710.univ-lyon1.fr
Tue Apr 15 16:40:09 CEST 2003


Hello.

I would like to know if there are any plans about the evolution of the
libvlc interface. I am developping an application that needs to remotely
control vlc, and I developped a CORBA plugin (which uses the IDL quoted
at the end of this message). I have a student working on extending the
python vlcmodule to provide the same interface natively from python.

In the corba plugin, I had to implement some glue code to match the IDL
definition with the VLC internals. As the python module will have the
same interface, I plan to factorize the VLC-specific code in a C library
which will be close to the IDL definition, and reuse it for both the
CORBA and the python plugins.

I would like to know if VLC developpers are planning to make the libvlc
interface evolve to something richer, that I could then use in my own
library, or if it will stay basic, so that I will have to fiddle with
the vlc internals in my own lib.


For information, I had to patch the src/playlist/playlist.c file, in the
playlist_Command function, to be able to specify a starting position for
a stream : I think that we should call PlayItem before changing the
input_status, to make sure that the p_input is correctly defined :  

388c308,309
<             input_SetStatus( p_playlist->p_input, INPUT_STATUS_PLAY );
---
>         PlayItem( p_playlist );
>         input_SetStatus( p_playlist->p_input, INPUT_STATUS_PLAY );



Thanks.

Olivier


----------------------- The current MediaControl.idl -------------------

module VLC {
   enum PositionOrigin {
   	AbsolutePosition, RelativePosition, ModuloPosition
   };
   
   enum PositionKey {
   	ByteCount, SampleCount, MediaTime
   };
   
   struct Position {
   	PositionOrigin origin;
   	PositionKey key;
   	long value;
   };
   
   exception PositionKeyNotSupported { PositionKey key;};
   exception InvalidPosition { PositionKey key;};

  typedef sequence<string> PlaylistSeq; 
  typedef sequence<octet> ByteSeq;

  struct RGBPicture {
    short width;
    short height;
    long type;
    ByteSeq data;
  };

   // MediaControl interface is similar to
   // ControlledStream interface in MSS.
   // See: 
   // It can be inherited by flow endpoints or
   // FlowConnection interfaces.
  interface MediaControl
  {
    exception PositionKeyNotSupported { PositionKey key;};
    
    Position get_media_position(in PositionOrigin an_origin,
				in PositionKey a_key)
      raises (PositionKeyNotSupported);
    
    void set_media_position(in Position a_position)
      raises (PositionKeyNotSupported, InvalidPosition);
     
    void start(in Position a_position)
      raises(InvalidPosition);
    void pause(in Position a_position)
      raises(InvalidPosition);
    void resume(in Position a_position)
      raises(InvalidPosition);
    void stop(in Position a_position)
      raises(InvalidPosition);
    void exit (); // Exits the player (not in the original spec)
    void add_to_playlist (in string a_file);
    // Returns the list of files in playlist
    PlaylistSeq get_playlist ();

    // Returns a snapshot of the currently displayed picture
    RGBPicture snapshot (in Position a_position);

    // Displays the message string, between "begin" and "end" positions
    void display_text (in string message, in Position begin, in Position
end);
  };
};



-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list