]> git.sesse.net Git - vlc/blob - modules/control/corba/MediaControl.idl
Mono audio filter is a channel_mixer and not a convertor.
[vlc] / modules / control / corba / MediaControl.idl
1 /*
2   Module inspired by the MediaControl IDL
3  */
4 module VLC {
5
6   const float VERSION = 0.1;
7
8   enum PositionOrigin {
9     AbsolutePosition, RelativePosition, ModuloPosition
10   };
11   
12   enum PositionKey {
13     ByteCount, SampleCount, MediaTime
14   };
15   
16   struct Position {
17     PositionOrigin origin;
18     PositionKey key;
19     long long value;
20   };
21   
22   exception PositionKeyNotSupported { string message; };
23   exception PositionOriginNotSupported { string message; };
24   exception InvalidPosition         { string message; };
25   exception PlaylistException       { string message; };
26   exception InternalException       { string message; };
27
28   typedef sequence<string> PlaylistSeq; 
29   typedef sequence<octet> ByteSeq;
30   
31   struct RGBPicture {
32     short width;
33     short height;
34     long type;
35     ByteSeq data;
36     long long date;
37   };
38   
39   typedef sequence<RGBPicture> RGBPictureSeq;
40   
41   /* Cf stream_control.h */
42   enum PlayerStatus { PlayingStatus, PauseStatus, ForwardStatus, BackwardStatus, InitStatus, EndStatus, UndefinedStatus };
43   
44   struct StreamInformation {
45     PlayerStatus streamstatus;
46     string url;        /* The URL of the current media stream */
47     long long position;     /* actual location in the stream (in ms) */
48     long long length;         /* total length of the stream (in ms) */
49   };
50   
51    // MediaControl interface is similar to
52    // ControlledStream interface in MSS.
53    // It can be inherited by flow endpoints or
54    // FlowConnection interfaces.
55   interface MediaControl
56   {
57     Position get_media_position(in PositionOrigin an_origin,
58                                 in PositionKey a_key)
59       raises (InternalException, PositionKeyNotSupported);
60     
61     void set_media_position(in Position a_position)
62       raises (InternalException, PositionKeyNotSupported, InvalidPosition);
63      
64     void start(in Position a_position)
65       raises (InternalException, InvalidPosition, PlaylistException);
66     void pause(in Position a_position)
67       raises (InternalException, InvalidPosition);
68     void resume(in Position a_position)
69       raises (InternalException, InvalidPosition);
70     void stop(in Position a_position)
71       raises (InternalException, InvalidPosition);
72
73     oneway void exit (); // Exits the player (not in the original spec)
74
75     void playlist_add_item (in string a_file)
76       raises (PlaylistException);
77     void playlist_clear ()
78       raises (PlaylistException);
79     // Returns the list of files in playlist
80     PlaylistSeq playlist_get_list ()
81       raises (PlaylistException);
82
83     // Returns a snapshot of the currently displayed picture
84     RGBPicture snapshot (in Position a_position)
85       raises (InternalException);
86
87     RGBPictureSeq all_snapshots ()
88       raises (InternalException);
89
90     // Displays the message string, between "begin" and "end" positions
91     void display_text (in string message, in Position begin, in Position end)
92       raises (InternalException);
93
94     StreamInformation get_stream_information ()
95       raises (InternalException);
96     
97     unsigned short sound_get_volume()
98       raises (InternalException);
99
100     void sound_set_volume(in unsigned short volume)
101       raises (InternalException);
102
103   };
104 };