<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=OjpK78</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=OjpK78"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/OjpK78/"/>
	<updated>2026-11-04T18:39:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MediaControlIDL&amp;diff=8248</id>
		<title>MediaControlIDL</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MediaControlIDL&amp;diff=8248"/>
		<updated>2007-04-11T00:05:55Z</updated>

		<summary type="html">&lt;p&gt;OjpK78: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{example code|for=Python bindings}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module VLC {&lt;br /&gt;
&lt;br /&gt;
  const float VERSION = 1.0;&lt;br /&gt;
&lt;br /&gt;
  enum PositionOrigin {&lt;br /&gt;
    AbsolutePosition, &lt;br /&gt;
    RelativePosition, &lt;br /&gt;
    // Like relative, but wraps at the end of a file for instance:&lt;br /&gt;
    ModuloPosition&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  enum PositionKey {&lt;br /&gt;
    // For raw access&lt;br /&gt;
    ByteCount, &lt;br /&gt;
    // Frame number&lt;br /&gt;
    SampleCount,&lt;br /&gt;
    // In milliseconds&lt;br /&gt;
    MediaTime&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  struct Position {&lt;br /&gt;
    PositionOrigin origin;&lt;br /&gt;
    PositionKey key;&lt;br /&gt;
    long long value;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  exception PositionKeyNotSupported    { string message; };&lt;br /&gt;
  exception PositionOriginNotSupported { string message; };&lt;br /&gt;
  exception InvalidPosition            { string message; };&lt;br /&gt;
  exception PlaylistException          { string message; };&lt;br /&gt;
  exception InternalException          { string message; };&lt;br /&gt;
&lt;br /&gt;
  typedef sequence&amp;lt;string&amp;gt; PlaylistSeq;&lt;br /&gt;
  typedef sequence&amp;lt;octet&amp;gt; ByteSeq;&lt;br /&gt;
&lt;br /&gt;
  struct RGBPicture {&lt;br /&gt;
    short width;&lt;br /&gt;
    short height;&lt;br /&gt;
    long type;&lt;br /&gt;
    ByteSeq data;&lt;br /&gt;
    // Timestamp (absolute position in the movie) in ms&lt;br /&gt;
    long long date;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  struct StreamInformation {&lt;br /&gt;
    short width;&lt;br /&gt;
    short height;&lt;br /&gt;
    float aspect_ratio;&lt;br /&gt;
    long bitrate;&lt;br /&gt;
    string codec;&lt;br /&gt;
    string author;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  typedef sequence&amp;lt;RGBPicture&amp;gt; RGBPictureSeq;&lt;br /&gt;
&lt;br /&gt;
  enum PlayerStatus { PlayingStatus, PauseStatus, ForwardStatus, BackwardStatus, InitStatus, EndStatus, UndefinedStatus };&lt;br /&gt;
&lt;br /&gt;
  struct StatusInformation {&lt;br /&gt;
    PlayerStatus streamstatus;&lt;br /&gt;
    string url;             /* The URL of the current media stream   */&lt;br /&gt;
    long long position;     /* actual location in the stream (in ms) */&lt;br /&gt;
    long long length;       /* total length of the stream (in ms)    */&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  interface Playlist &lt;br /&gt;
  {&lt;br /&gt;
    // Return a playlist item id&lt;br /&gt;
    int add(in string a_file)&lt;br /&gt;
      raises (PlaylistException);&lt;br /&gt;
&lt;br /&gt;
    void next(in string a_file)&lt;br /&gt;
      raises (PlaylistException);&lt;br /&gt;
&lt;br /&gt;
    void prev(in string a_file)&lt;br /&gt;
      raises (PlaylistException);&lt;br /&gt;
&lt;br /&gt;
    // Set the new current item&lt;br /&gt;
    void set(int item_id)&lt;br /&gt;
      raises (PlaylistException);&lt;br /&gt;
&lt;br /&gt;
    void remove(int item_id)&lt;br /&gt;
      raises (PlaylistException);&lt;br /&gt;
&lt;br /&gt;
    // Clear the whole playlist&lt;br /&gt;
    void clear ()&lt;br /&gt;
      raises (PlaylistException);&lt;br /&gt;
&lt;br /&gt;
    // Return the list of files in playlist&lt;br /&gt;
    PlaylistSeq get_list ()&lt;br /&gt;
      raises (PlaylistException);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  // MediaControl interface is similar to&lt;br /&gt;
  // ControlledStream interface in MSS.&lt;br /&gt;
  // It can be inherited by flow endpoints or&lt;br /&gt;
  // FlowConnection interfaces.&lt;br /&gt;
  interface MediaControl&lt;br /&gt;
  {&lt;br /&gt;
    // *** Initialization&lt;br /&gt;
    // Exit the player&lt;br /&gt;
    oneway void exit ();&lt;br /&gt;
&lt;br /&gt;
    // Return the IDL API version&lt;br /&gt;
    string get_api_version();&lt;br /&gt;
&lt;br /&gt;
    // Return the player version (player name   version)&lt;br /&gt;
    string get_player_version();&lt;br /&gt;
&lt;br /&gt;
    // *** Playback control&lt;br /&gt;
    // The a_position parameters are facultative.&lt;br /&gt;
    void start(in Position a_position)&lt;br /&gt;
      raises (InternalException, InvalidPosition, PlaylistException);&lt;br /&gt;
&lt;br /&gt;
    void pause(in Position a_position)&lt;br /&gt;
      raises (InternalException, InvalidPosition);&lt;br /&gt;
&lt;br /&gt;
    void resume(in Position a_position)&lt;br /&gt;
      raises (InternalException, InvalidPosition);&lt;br /&gt;
&lt;br /&gt;
    void stop(in Position a_position)&lt;br /&gt;
      raises (InternalException, InvalidPosition);&lt;br /&gt;
&lt;br /&gt;
    Position get_media_position(in PositionOrigin an_origin,&lt;br /&gt;
				in PositionKey a_key)&lt;br /&gt;
      raises (InternalException, PositionKeyNotSupported);&lt;br /&gt;
&lt;br /&gt;
    void set_media_position(in Position a_position)&lt;br /&gt;
      raises (InternalException, PositionKeyNotSupported, InvalidPosition);&lt;br /&gt;
&lt;br /&gt;
    // Rate control. The rate is a signed value, corresponding to&lt;br /&gt;
    // the percentage of the speed ( 100 = normal, -100 = reverse...)&lt;br /&gt;
&lt;br /&gt;
    int get_rate()&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    void set_rate(int rate)&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    // *** Media information&lt;br /&gt;
&lt;br /&gt;
    StatusInformation get_status_information ()&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    // Return information about the current stream&lt;br /&gt;
    StreamInformation get_stream_information ()&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    // *** Playlist handling&lt;br /&gt;
    Playlist playlist()&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    // *** Video&lt;br /&gt;
&lt;br /&gt;
    // Return a snapshot of the currently displayed picture&lt;br /&gt;
    RGBPicture snapshot (in Position a_position)&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    // Return the whole snapshot cache contents&lt;br /&gt;
    RGBPictureSeq all_snapshots ()&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    // Display the message string as caption, &lt;br /&gt;
    // between &amp;quot;begin&amp;quot; and &amp;quot;end&amp;quot; positions&lt;br /&gt;
    void render_text (in string message, in Position begin, in Position end)&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    // Set the visual ID (XID in X-Window, HWIN on Win32, ??? on MacOS&lt;br /&gt;
    // X) for the player window&lt;br /&gt;
    void set_visual(long xid)&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    boolean get_fullscreen()&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    void set_fullscreen(boolean full)&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    // *** Audio&lt;br /&gt;
&lt;br /&gt;
    // Volume is normalized in [0..100]&lt;br /&gt;
    unsigned short sound_get_volume()&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    void sound_set_volume(in unsigned short volume)&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
&lt;br /&gt;
    void sound_mute()&lt;br /&gt;
      raises (InternalException);&lt;br /&gt;
  };&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Example code]]&lt;/div&gt;</summary>
		<author><name>OjpK78</name></author>
	</entry>
</feed>