summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/AVStreams.idl
blob: 88cb38a4ed4e89d669bbb79729c604c3e042683c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
/* -*- C++ -*- */

// $Id$

// ============================================================================
//
// = LIBRARY
//    cos
// 
// = FILENAME
//   AVStreams.idl
//
// = AUTHOR
//    OMG
// 
// ============================================================================

#include "CosPropertyService.idl"

#pragma prefix "omg.org"

module AVStreams
{
  // = DESCRIPTION
  //    IDL for Control and Management of Audio/Video Streams
  //    Revised Submission

  struct QoS
  {
    // This structure represents QoS for a given type.
    // E.g. {"video_qos", <"video_framerate", 26>,
    //                    <"video_depth", 9>}
    string QoSType;
    // Name of the Qos type, e.g. "video_qos"

    CosPropertyService::Properties QoSParams;
    // Sequence of name value pairs, see e.g. above.
  };
  
  typedef sequence<QoS> streamQoS;
  // The QoS of a stream is a sequence of QoS structs (defined above)
  
  typedef sequence<string> flowSpec;
  // flowSpec is used to keep transport protocol information Each
  // string is one endpoint.
  
  typedef sequence<string> protocolSpec;
  // List of protocols supported protocol names registered by OMG.
  // e.g., TCP, UDP, AAL5, IPX, RTP

  typedef sequence<octet> key;
  // Used as a key for public-key encryption

  struct SFPStatus
  {
    // = TITLE
    //   This structure is defined for SFP1.0 Subsequent versions of
    //   the protocol may specify new structures
    //
    // = DESCRIPTION
    //   This structure is defined for SFP1.0 Subsequent versions of
    //   the protocol may specify new structures
    boolean isFormatted;
    boolean isSpecialFormat;
    boolean seqNums;
    boolean timestamps;
    boolean sourceIndicators;
  };

  enum flowState 
  {
    stopped,
    started,
    dead
  };
  // Represents the state of a flow.

  enum dirType 
  {
    dir_in,
    dir_out
  };
  // The direction of a flow.

  struct flowStatus
  {
    // = TITLE
    //   Used to store the status of a flow.

    string flowName;
    dirType directionality;
    flowState status;
    SFPStatus theFormat;
    QoS theQoS;
  };

  typedef CosPropertyService::Property streamEvent;
  // Used to convey events, in Basic_StreamCtrl::push_event.
  
  exception notSupported 
    {
      // Used to indicate that an operation is not supported.
    };

  exception PropertyException 
    {
      // Property exception: raised by VDev::configure ().
    };

  exception FPError 
    { 
      // An flow protocol related error.
      string flow_name; 
    };

  
  exception streamOpFailed
    {
      // Raised by operations on streams.
      string reason;
    };

  exception streamOpDenied
    {
      // Raised by operations on streams.
      string reason;
    };

  exception noSuchFlow 
    {
      // Used to indicate that an invalid flow name was used for the
      // operation.
    };

  exception QoSRequestFailed
    {
      //  Used to indicate failure in changing QoS.
      string reason;
    };


  interface Basic_StreamCtrl : CosPropertyService::PropertySet {
      // = DESCRIPTION
      //    Base class for StreamCtrl, implements basic stream start
      //    and stop functionality.

      // = Empty flowSpec => apply operation to all flows
      void stop (in flowSpec the_spec) raises (noSuchFlow);
      // Stop the transfer of data of the stream.Empty the_spec means
      // apply operation to all flows.
      
      void start (in flowSpec the_spec) raises (noSuchFlow);
      // Start the transfer of data in the stream. Empty the_spec
      // means apply operation to all flows.
      
      void destroy (in flowSpec the_spec) raises (noSuchFlow);
      // Tears down the stream. This will close the connection, and
      // delete the streamendpoint and vdev associated with this
      // stream Empty the_spec means apply operation to all flows.
      
      boolean modify_QoS (inout streamQoS new_qos,
                          in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed);
      // Changes the QoS associated with the stream Empty the_spec
      // means apply operation to all flows.
      
      oneway void push_event (in streamEvent the_event);
      // Called by StreamEndPoint when something goes wrong with a
      // flow.
      
      void set_FPStatus (in flowSpec the_spec,
                         in string fp_name,		
                         in any fp_settings)		
        raises (noSuchFlow, 
                FPError);
      // Used to control the flow protocol parameters.
      
      Object get_flow_connection (in string flow_name) 
        raises (noSuchFlow, 
                notSupported);
      // Not implemented in the light profile, will raise the
      // notsupported exception.
      
      void set_flow_connection (in string flow_name,
                                in Object flow_connection)
        raises (noSuchFlow, 
                notSupported);
      // Not implemented in the light profile, will raise the
      // notsupported exception.
    };

  interface Negotiator
    {
      // = DESCRIPTION
      //    This class is used to negotiate QoS between two stream endpoints

      boolean negotiate (in Negotiator remote_negotiator,
                         in streamQoS qos_spec);
      // Initiates the process of negotiating the qos_spec.
    };

  // Forward declarations.
  interface VDev;
  interface MMDevice;
  interface StreamEndPoint;
  interface StreamEndPoint_A;
  interface StreamEndPoint_B;
  
  interface StreamCtrl : Basic_StreamCtrl 
    {
      // = DESCRIPTION
      //    Implementation the A/V StreamCtrl class. this class
      //    is used to control the stream. It should be subclassed
      //    by applications that want to provide more control features.
      
      boolean bind_devs (in MMDevice a_party, in MMDevice b_party,
                         inout streamQoS the_qos,
                         in flowSpec the_flows)
        raises (streamOpFailed, 
                noSuchFlow, 
                QoSRequestFailed);
      // Establish a stream between a_party and b_party, with qos
      // the_qos, and for the flows in the_flows if the_flows is
      // empty, bind all the flows Causes a connection to be
      // established between the StreamEndpoints.  Returns
      // success/failure
      
      boolean bind (in StreamEndPoint_A a_party,
                    in StreamEndPoint_B b_party,
                    inout streamQoS the_qos,
                    in flowSpec the_flows)
        raises (streamOpFailed, 
                noSuchFlow, 
                QoSRequestFailed);
      // Establish a connection between two streamendpoints. This can
      // be used if the streamendpoints have been created independent
      // of a MMDevice
      
      void unbind_party (in StreamEndPoint the_ep,
                         in flowSpec the_spec)
        raises (streamOpFailed, noSuchFlow);
      // Unbind the_ep from the stream. Empty the_spec means apply to
      // all flows.
      
      void unbind ()
        raises (streamOpFailed);
      // unbind the stream. Same effect as Basic_StreamCtrl::destroy
      // ()
    };
  
  interface MCastConfigIf : CosPropertyService::PropertySet{

      // = DESCRIPTION
      //   Multicasting operations are not supported yet.

      boolean set_peer (in Object peer,
                        inout streamQoS the_qos,
                        in flowSpec the_spec)
        raises (QoSRequestFailed, 
                streamOpFailed);
      // Multicasting operations are not supported yet.
      
      void configure (in CosPropertyService::Property a_configuration);
      // Multicasting operations are not supported yet.
      
      void set_initial_configuration (in CosPropertyService::Properties initial);
      // Multicasting operations are not supported yet.
      
      // Uses <format_name> standardised by OMG and IETF
      void set_format (in string flowName, 
                       in string format_name)
        raises (notSupported);
      // Multicasting operations are not supported yet.
      
      // Note, some of these device params are standardised by OMG
      void set_dev_params (in string flowName,
                           in CosPropertyService::Properties new_params)
        raises (CosPropertyService::PropertyException,
                streamOpFailed);
      // Multicasting operations are not supported yet.
    };

  interface StreamEndPoint : CosPropertyService::PropertySet{
      // = DESCRIPTION
      //    The Stream EndPoint. Used to implement one endpoint of a
      //    stream that implements the transport layer.
      void stop (in flowSpec the_spec) 
        raises (noSuchFlow);
      // Stop the stream. Empty the_spec means, for all the flows.
      
      void start (in flowSpec the_spec) 
        raises (noSuchFlow);
      // Start the stream, Empty the_spec means, for all the flows.
      
      void destroy (in flowSpec the_spec) 
        raises (noSuchFlow);
      // Destroy the stream, Empty the_spec means, for all the flows.
      
      boolean connect (in StreamEndPoint responder,
                       inout streamQoS qos_spec,
                       in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed, 
                streamOpFailed);
      // Called by StreamCtrl. responder is the peer to connect with.
      
      boolean request_connection (in StreamEndPoint initiator,
                                  in boolean is_mcast,
                                  inout streamQoS qos,
                                  inout flowSpec the_spec)
        raises (streamOpDenied, noSuchFlow,
                QoSRequestFailed, FPError);
      // Called by the peer StreamEndPoint. The flow_spec indicates
      // the flows (which contain transport addresses etc.).
      
      boolean modify_QoS (inout streamQoS new_qos,
                          in flowSpec the_flows)
        raises (noSuchFlow, 
                QoSRequestFailed);
      // Change the transport qos on a stream.
      
      boolean set_protocol_restriction (in protocolSpec the_pspec);
      // Used to restrict the set of protocols.
      
      void disconnect(in flowSpec the_spec)
        raises (noSuchFlow, 
                streamOpFailed);
      // Disconnect the flows.
      
      void set_FPStatus (in flowSpec the_spec,
                         in string fp_name,
                         in any fp_settings)
        raises (noSuchFlow, 
                FPError);
      // Used to control the SFP parameters.

      Object get_fep (in string flow_name)
        raises (notSupported, 
                noSuchFlow);
      // Not implemented in the light profile, throws notsupported.
      
      string add_fep (in Object the_fep)
        // Can fail for reasons {duplicateFepName, duplicateRef}
        raises (notSupported, 
                streamOpFailed);
      // Not implemented in the light profile, throws notsupported.
      
      void remove_fep (in string fep_name)
        raises (notSupported, 
                streamOpFailed);
      // Not implemented in the light profile, throws notsupported.
      
      void set_negotiator (in Negotiator new_negotiator);
      // Used to "attach" a negotiator to the endpoint.

      void set_key (in string flow_name, 
                    in key the_key);
      // Used for public key encryption.
    
      void set_source_id (in long source_id);
      // Used to set a unique id for packets sent by this
      // streamendpoint.
    };

  interface StreamEndPoint_A : StreamEndPoint
    {
      // = DESCRIPTION
      //     The "A" side of a streamendpoint.
      boolean multiconnect (inout streamQoS the_qos,
                            inout flowSpec the_spec)
        raises (noSuchFlow, QoSRequestFailed, streamOpFailed);
      // Used for ATM-style multicast.

      boolean connect_leaf (in StreamEndPoint_B the_ep,
                            inout streamQoS the_qos,
                            in flowSpec the_flows)
        raises (streamOpFailed, noSuchFlow,
                QoSRequestFailed, notSupported);
      // Used for ATM-style multicast.

      void disconnect_leaf (in StreamEndPoint_B the_ep,
                            in flowSpec theSpec)
        raises(streamOpFailed, noSuchFlow);
      // Used for ATM-style multicast.
    };

  interface StreamEndPoint_B : StreamEndPoint 
    {
      boolean multiconnect (inout streamQoS the_qos,
                            inout flowSpec the_spec)
        raises (streamOpFailed, noSuchFlow,
                QoSRequestFailed, FPError);
      // Used for ATM-style multicast.
    };

  interface VDev : CosPropertyService::PropertySet
    {
      // = DESCRIPTION
      //    Implements the VDev interface. One of these is created per
      //    connection, and represents device-specific parameters.

      boolean set_peer (in StreamCtrl the_ctrl,
                        in VDev the_peer_dev,
                        inout streamQoS the_qos,
                        in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed, 
                streamOpFailed);
      // Called to tell the vdev who the streamctrl, peer vdev is.

      boolean set_Mcast_peer (in StreamCtrl the_ctrl,
                              in MCastConfigIf a_mcastconfigif,
                              inout streamQoS the_qos,
                              in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed, 
                streamOpFailed);
      // Used to set the streamctrl and multicast device.

      void configure (in CosPropertyService::Property the_config_mesg)
        raises (PropertyException, 
                streamOpFailed);
      // Called by the peer VDev to configure the device (catch all).

      // Uses <formatName> standardised by OMG and IETF
      void set_format (in string flowName, 
                       in string format_name)
        raises (notSupported);
      // Used to set a format on a flowname.

      // = Note, some of these device params are standardised by OMG
      void set_dev_params (in string flowName,
                           in CosPropertyService::Properties new_params)
        raises (PropertyException, 
                streamOpFailed);
      // Used to set device parameters.

      boolean modify_QoS (inout streamQoS the_qos,
                          in flowSpec the_spec)
        raises (noSuchFlow, 
                QoSRequestFailed);
      // Called to change QoS of the device.

    };

  interface MMDevice : CosPropertyService::PropertySet 
    {
      // = DESCRIPTION
      //     Implements a factory to create Endpoints and VDevs.
      StreamEndPoint_A create_A (in StreamCtrl the_requester,
                                 out VDev the_vdev,
                                 inout streamQoS the_qos,
                                 out boolean met_qos,
                                 inout string named_vdev,
                                 in flowSpec the_spec)
        raises (streamOpFailed, 
                streamOpDenied, 
                notSupported,
                QoSRequestFailed, 
                noSuchFlow);
      // Called by StreamCtrl to create a "A" type streamendpoint and
      // vdev.

      StreamEndPoint_B create_B(in StreamCtrl the_requester,
                                out VDev the_vdev,
                                inout streamQoS the_qos,
                                out boolean met_qos,
                                inout string named_vdev,
                                in flowSpec the_spec)
        raises (streamOpFailed, 
                streamOpDenied, 
                notSupported,
                QoSRequestFailed, 
                noSuchFlow);
      // Called by StreamCtrl to create a "B" type streamendpoint and
      // vdev.
    
      StreamCtrl bind (in MMDevice peer_device,
                       inout streamQoS the_qos,
                       out boolean is_met,
                       in flowSpec the_spec)
        raises (streamOpFailed, 
                noSuchFlow, 
                QoSRequestFailed);
      // Can be used to request the MMDevice to create a new
      // StreamCtrl, and call bind_devs on it.
    
      StreamCtrl bind_mcast (in MMDevice first_peer,
                             inout streamQoS the_qos,
                             out boolean is_met,
                             in flowSpec the_spec)
        raises (streamOpFailed, 
                noSuchFlow, 
                QoSRequestFailed);
      // Multicast bind.

      void destroy (in StreamEndPoint the_ep, 
                    in string vdev_name)
        // ie VDev not found
        raises (notSupported);
      // Remove the StreamEndPoint and the related vdev.
     
      string add_fdev (in Object the_fdev)
        raises (notSupported, 
                streamOpFailed);
      // Not supported in the light profile, raises notsupported.

      Object get_fdev (in string flow_name)
        raises (notSupported, 
                noSuchFlow);
      // Not supported in the light profile, raises notsupported.

      void remove_fdev (in string flow_name)
        raises (notSupported, 
                noSuchFlow);
      // Not supported in the light profile, raises notsupported.
    };

  // Define the exceptions.
  exception protocolNotSupported{};
  exception formatNotSupported{};
  exception formatMismatch{};
  exception FEPMismatch{};
  exception alreadyConnected{};
  exception invalidSettings{string settings;};
  exception notConnected{};
  exception deviceQosMismatch{};
  exception failedToConnect{string reason;};
  exception failedToListen{string reason;};

  // Forward declarations of the interfaces.
  interface FlowProducer;
  interface FlowConsumer;
  interface FlowEndPoint;
  interface FDev;

  interface FlowConnection : CosPropertyService::PropertySet{
    void stop();
    void start();
    void destroy();

    boolean modify_QoS(inout AVStreams::QoS new_qos)
      raises (AVStreams::QoSRequestFailed);

    boolean use_flow_protocol(in string fp_name,
                              in any fp_settings)
      raises (AVStreams::FPError, AVStreams::notSupported);

    oneway void push_event(in AVStreams::streamEvent the_event);

    boolean connect_devs(in FDev a_party, in FDev b_party,
                         inout AVStreams::QoS the_qos)
      raises (AVStreams::streamOpFailed, 
              AVStreams::streamOpDenied, 
              AVStreams::QoSRequestFailed);

    boolean connect(in FlowProducer flow_producer,
                    in FlowConsumer flow_consumer,
                    inout AVStreams::QoS the_qos)
      raises (formatMismatch, FEPMismatch, alreadyConnected);

    boolean disconnect();

    // The notSupported exception is raised where
    // flow cannot have multiple producers
    boolean add_producer(in FlowProducer flow_producer,
                         inout AVStreams::QoS the_qos)
      raises (alreadyConnected, AVStreams::notSupported);

    boolean add_consumer(in FlowConsumer flow_consumer,
                         inout AVStreams::QoS the_qos)
      raises (alreadyConnected);

    boolean drop(in FlowEndPoint target)
      raises (notConnected);
  };

  interface FlowEndPoint : CosPropertyService::PropertySet
    {
      boolean lock();
      void unlock();

      void stop();
      void start();
      void destroy();

      // Default is a nil object reference
      attribute AVStreams::StreamEndPoint related_sep;
      attribute FlowConnection related_flow_connection;

      FlowEndPoint get_connected_fep()
        raises (notConnected,AVStreams::notSupported);

      // syntax of fp_name is <flowProtocol>
      boolean use_flow_protocol(in string fp_name,
                                in any fp_settings)
        raises (AVStreams::FPError, AVStreams::notSupported);

      // set_format() initializes ëformatí 
      // as current media format e.g. MPEG.
      void set_format(in string format)
        raises (AVStreams::notSupported);

      void set_dev_params(in CosPropertyService::Properties new_settings)
        raises (CosPropertyService::PropertyException, AVStreams::streamOpFailed);

      void set_protocol_restriction(in AVStreams::protocolSpec the_spec)
        raises (AVStreams::notSupported);

      boolean is_fep_compatible(in FlowEndPoint fep) 
        raises (formatMismatch, deviceQosMismatch);

      boolean set_peer(in FlowConnection the_fc,
                       in FlowEndPoint the_peer_fep,
                       inout AVStreams::QoS the_qos)
        raises (AVStreams::QoSRequestFailed,
                AVStreams::streamOpFailed);

      boolean set_Mcast_peer(in FlowConnection the_fc,
                             in AVStreams::MCastConfigIf a_mcastconfigif,
                             inout AVStreams::QoS the_qos)
        raises (AVStreams::QoSRequestFailed);
    };

  interface FlowProducer : FlowEndPoint
    {

      boolean connect_to_peer(inout AVStreams::QoS the_qos,
                              in string address,
                              in string use_flow_protocol) // syntax <flowProtocol>
        raises(failedToConnect,AVStreams::FPError, AVStreams::QoSRequestFailed);

      string connect_mcast(inout AVStreams::QoS the_qos,
                           out boolean is_met,
                           in string address,
                           in string use_flow_protocol)
        raises (failedToConnect,
		AVStreams::notSupported,
		AVStreams::FPError,
		AVStreams::QoSRequestFailed);

      string get_rev_channel(in string pcol_name);

      void set_key(in AVStreams::key the_key);
      void set_source_id(in long source_id);
    };

  interface FlowConsumer : FlowEndPoint
    {

      // Needs to know its peer to choose its protocol correctly
      // Also to ask for a reverse channel for credit-based flow
      // control, if one is required
      string go_to_listen(inout AVStreams::QoS the_qos,
                          in boolean is_mcast,
                          in FlowProducer peer,
                          inout string flowProtocol)// syntax <flowProtocol>
        raises(failedToListen, AVStreams::FPError, 
               AVStreams::QoSRequestFailed);
    };

  interface FDev : CosPropertyService::PropertySet {
    FlowProducer create_producer(in FlowConnection the_requester,
                                 inout AVStreams::QoS the_qos,
                                 out boolean met_qos,
                                 inout string named_fdev)
      raises(AVStreams::streamOpFailed,
             AVStreams::streamOpDenied,
             AVStreams::notSupported,
             AVStreams::QoSRequestFailed);

    FlowConsumer create_consumer(in FlowConnection the_requester,
                                 inout AVStreams::QoS the_qos,
                                 out boolean met_qos,
                                 inout string named_fdev)
      raises(AVStreams::streamOpFailed,
             AVStreams::streamOpDenied,
             AVStreams::notSupported,
             AVStreams::QoSRequestFailed);

    FlowConnection bind(in FDev peer_device,
                        inout AVStreams::QoS the_qos,
                        out boolean is_met)
      raises (AVStreams::streamOpFailed,
              AVStreams::QoSRequestFailed);

    FlowConnection bind_mcast(in FDev first_peer,
                              inout AVStreams::QoS the_qos,
                              out boolean is_met)
      raises (AVStreams::streamOpFailed,
              AVStreams::QoSRequestFailed);

    void destroy(in FlowEndPoint the_ep, in string fdev_name)
      // ie FDev not found
      raises (AVStreams::notSupported);
  };

  enum PositionOrigin {
    AbsolutePosition, RelativePosition, ModuloPosition
  };

  enum PositionKey {
    ByteCount, SampleCount, MediaTime
  };

  struct Position {
    PositionOrigin origin;
    PositionKey key;
    long value;
  };

  exception PostionKeyNotSupported { PositionKey key;};
  exception InvalidPosition { PositionKey key;};

  // MediaControl interface is similar to
  // ControlledStream interface in MSS.
  // It can be inherited by flow endpoints or
  // FlowConnection interfaces.
  interface MediaControl{

    exception PostionKeyNotSupported { PositionKey key;};

    Position get_media_position(in PositionOrigin an_origin,
                                in PositionKey a_key)
      raises (PostionKeyNotSupported);

    void set_media_position(in Position a_position)
      raises (PostionKeyNotSupported, 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);
  };

// Additional sequences needed for the properties.

typedef sequence<FlowConnection> FlowConnection_seq;
typedef sequence<StreamEndPoint_A> StreamEndPoint_A_seq;
typedef sequence<StreamEndPoint_B> StreamEndPoint_B_seq;
typedef sequence<FlowEndPoint> FlowEndPoint_seq;
};