2 Module inspired by the MediaControl IDL
6 const float VERSION = 0.1;
9 AbsolutePosition, RelativePosition, ModuloPosition
13 ByteCount, SampleCount, MediaTime
17 PositionOrigin origin;
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; };
28 typedef sequence<string> PlaylistSeq;
29 typedef sequence<octet> ByteSeq;
39 typedef sequence<RGBPicture> RGBPictureSeq;
41 /* Cf stream_control.h */
42 enum PlayerStatus { PlayingStatus, PauseStatus, ForwardStatus, BackwardStatus, InitStatus, EndStatus, UndefinedStatus };
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) */
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
57 Position get_media_position(in PositionOrigin an_origin,
59 raises (InternalException, PositionKeyNotSupported);
61 void set_media_position(in Position a_position)
62 raises (InternalException, PositionKeyNotSupported, InvalidPosition);
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);
73 oneway void exit (); // Exits the player (not in the original spec)
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);
83 // Returns a snapshot of the currently displayed picture
84 RGBPicture snapshot (in Position a_position)
85 raises (InternalException);
87 RGBPictureSeq all_snapshots ()
88 raises (InternalException);
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);
94 StreamInformation get_stream_information ()
95 raises (InternalException);
97 unsigned short sound_get_volume()
98 raises (InternalException);
100 void sound_set_volume(in unsigned short volume)
101 raises (InternalException);