AVStreams.idl

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 //=============================================================================
00003 /**
00004  *  @file   AVStreams.idl
00005  *
00006  *  $Id: AVStreams.idl 64667 2005-03-16 07:01:51Z jtc $
00007  *
00008  *  @author Sumedh Mungee <sumedh@cs.wustl.edu> 
00009  *  @author Nagarajan Surendran <naga@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_AV_STREAMS_IDL
00015 #define TAO_AV_STREAMS_IDL
00016 
00017 #include "CosProperty.idl"
00018 
00019 #pragma prefix "omg.org"
00020 
00021 /** 
00022   * @brief  IDL for Control and Management of Audio/Video Streams
00023   *         Revised Submission.
00024   */ 
00025 module AVStreams
00026 {
00027 
00028   /** 
00029    *  @struct QoS
00030    *  @brief  This structure represents QoS for a given type.
00031    *           E.g. {"video_qos", <"video_framerate", 26>,
00032    *                  <"video_depth", 9>}
00033    */
00034   struct QoS
00035   {
00036     string QoSType;
00037     /// Name of the Qos type, e.g. "video_qos"
00038 
00039     CosPropertyService::Properties QoSParams;
00040     /// Sequence of name value pairs, see e.g. above.
00041   };
00042 
00043   /// The QoS of a stream is a sequence of QoS structs (defined above)  
00044   typedef sequence<QoS> streamQoS;
00045 
00046   /// flowSpec is used to keep transport protocol information Each
00047   /// string is one endpoint.
00048   typedef sequence<string> flowSpec;
00049 
00050   /// List of protocols supported protocol names registered by OMG.
00051   /// e.g., TCP, UDP, AAL5, IPX, RTP
00052   typedef sequence<string> protocolSpec;
00053 
00054   /// Used as a key for public-key encryption
00055   typedef sequence<octet> key;
00056 
00057   /**
00058    *  @struct SFPStatus
00059    *  @brief This structure is defined for SFP1.0 Subsequent versions of
00060    *         the protocol may specify new structures.
00061    */
00062   struct SFPStatus
00063   {
00064     boolean isFormatted;
00065     boolean isSpecialFormat;
00066     boolean seqNums;
00067     boolean timestamps;
00068     boolean sourceIndicators;
00069   };
00070 
00071   /**
00072    *  @enum flowState
00073    *  @brief Represents the state of a flow
00074    */
00075   enum flowState 
00076   {
00077     stopped,
00078     started,
00079     dead
00080   };
00081 
00082   /**
00083    *  @enum dirType
00084    *  @brief The direction of a flow.
00085    */
00086   enum dirType 
00087   {
00088     dir_in,
00089     dir_out
00090   };
00091 
00092   /** 
00093    *  @struct flowStatus
00094    *  @brief Used to store the status of a flow.
00095    */
00096   struct flowStatus
00097   {
00098 
00099     string flowName;
00100     dirType directionality;
00101     flowState status;
00102     SFPStatus theFormat;
00103     QoS theQoS;
00104   };
00105 
00106   /// Used to convey events, in Basic_StreamCtrl::push_event.
00107   typedef CosPropertyService::Property streamEvent;
00108 
00109   
00110   exception notSupported 
00111     {
00112       /// Used to indicate that an operation is not supported.
00113     };
00114 
00115   exception PropertyException 
00116     {
00117       /// Property exception: raised by VDev::configure ().
00118     };
00119 
00120   exception FPError 
00121     { 
00122       /// An flow protocol related error.
00123       string flow_name; 
00124     };
00125 
00126   
00127   exception streamOpFailed
00128     {
00129       /// Raised by operations on streams.
00130       string reason;
00131     };
00132 
00133   exception streamOpDenied
00134     {
00135       /// Raised by operations on streams.
00136       string reason;
00137     };
00138 
00139   exception noSuchFlow 
00140     {
00141       /// Used to indicate that an invalid flow name was used for the
00142       /// operation.
00143     };
00144 
00145   exception QoSRequestFailed
00146     {
00147       ///  Used to indicate failure in changing QoS.
00148       string reason;
00149     };
00150 
00151   /**
00152     * @interface Basic_StreamCtrl
00153     * @brief Base class for StreamCtrl, implements basic stream start
00154     *        and stop functionality.
00155     */
00156   interface Basic_StreamCtrl : CosPropertyService::PropertySet {
00157 
00158       // = Empty flowSpec => apply operation to all flows
00159       /// Stop the transfer of data of the stream.Empty the_spec means
00160       /// apply operation to all flows.
00161       void stop (in flowSpec the_spec) raises (noSuchFlow);
00162 
00163       /// Start the transfer of data in the stream. Empty the_spec
00164       /// means apply operation to all flows.
00165       void start (in flowSpec the_spec) raises (noSuchFlow);
00166       
00167       /// Tears down the stream. This will close the connection, and
00168       /// delete the streamendpoint and vdev associated with this
00169       /// stream Empty the_spec means apply operation to all flows.
00170       void destroy (in flowSpec the_spec) raises (noSuchFlow);
00171       
00172       /// Changes the QoS associated with the stream Empty the_spec
00173       /// means apply operation to all flows.
00174       boolean modify_QoS (inout streamQoS new_qos,
00175                           in flowSpec the_spec)
00176         raises (noSuchFlow, 
00177                 QoSRequestFailed);
00178 
00179       /// Called by StreamEndPoint when something goes wrong with a
00180       /// flow.
00181       oneway void push_event (in streamEvent the_event);
00182       
00183       /// Used to control the flow protocol parameters.
00184       void set_FPStatus (in flowSpec the_spec,
00185                          in string fp_name,             
00186                          in any fp_settings)            
00187         raises (noSuchFlow, 
00188                 FPError);
00189       
00190       /// Not implemented in the light profile, will raise the
00191       /// notsupported exception.
00192       Object get_flow_connection (in string flow_name) 
00193         raises (noSuchFlow, 
00194                 notSupported);
00195       
00196       /// Not implemented in the light profile, will raise the
00197       /// notsupported exception.
00198       void set_flow_connection (in string flow_name,
00199                                 in Object flow_connection)
00200         raises (noSuchFlow, 
00201                 notSupported);
00202     };
00203 
00204   /**
00205    *  @interface Negotiator
00206    *  @brief This interface is used to negotiate QoS between two stream
00207    *         endpoints.
00208    */
00209   interface Negotiator
00210     {
00211       /// Initiates the process of negotiating the qos_spec.
00212       boolean negotiate (in Negotiator remote_negotiator,
00213                          in streamQoS qos_spec);
00214     };
00215 
00216   // Forward declarations.
00217   interface VDev;
00218   interface MMDevice;
00219   interface StreamEndPoint;
00220   interface StreamEndPoint_A;
00221   interface StreamEndPoint_B;
00222 
00223   /**
00224    * @interface StreamCtrl
00225    * @brief  Implementation the A/V StreamCtrl class. this class
00226    *          is used to control the stream. It should be subclassed
00227    *          by applications that want to provide more control features.
00228    */
00229   interface StreamCtrl : Basic_StreamCtrl 
00230     {
00231       
00232       boolean bind_devs (in MMDevice a_party, in MMDevice b_party,
00233                          inout streamQoS the_qos,
00234                          in flowSpec the_flows)
00235         raises (streamOpFailed, 
00236                 noSuchFlow, 
00237                 QoSRequestFailed);
00238       /// Establish a stream between a_party and b_party, with qos
00239       /// the_qos, and for the flows in the_flows if the_flows is
00240       /// empty, bind all the flows Causes a connection to be
00241       /// established between the StreamEndpoints.  Returns
00242       /// success/failure
00243       
00244       boolean bind (in StreamEndPoint_A a_party,
00245                     in StreamEndPoint_B b_party,
00246                     inout streamQoS the_qos,
00247                     in flowSpec the_flows)
00248         raises (streamOpFailed, 
00249                 noSuchFlow, 
00250                 QoSRequestFailed);
00251       /// Establish a connection between two streamendpoints. This can
00252       /// be used if the streamendpoints have been created independent
00253       /// of a MMDevice
00254       
00255       void unbind_dev(in MMDevice dev, in flowSpec the_spec) 
00256         raises (streamOpFailed, noSuchFlow);
00257 
00258       /// Unbind the_ep from the stream. Empty the_spec means apply to
00259       /// all flows.
00260       void unbind_party (in StreamEndPoint the_ep,
00261                          in flowSpec the_spec)
00262         raises (streamOpFailed, noSuchFlow);
00263 
00264       /// unbind the stream. Same effect as Basic_StreamCtrl::destroy ()
00265       void unbind ()
00266         raises (streamOpFailed);
00267 
00268       VDev get_related_vdev(in MMDevice adev, 
00269                             out StreamEndPoint sep) 
00270         raises (streamOpFailed);
00271 
00272     };
00273 
00274   /**
00275    *  @interface MCastConfigIf
00276    *  @brief Interface for multicasting operations.
00277    */
00278   interface MCastConfigIf : CosPropertyService::PropertySet{
00279       /// Set a peer in the multicast tree.     
00280       boolean set_peer (in Object peer,
00281                         inout streamQoS the_qos,
00282                         in flowSpec the_spec)
00283         raises (QoSRequestFailed, 
00284                 streamOpFailed);
00285 
00286       /// Configure the multicast stream.      
00287       void configure (in CosPropertyService::Property a_configuration);
00288 
00289       /// Sets the initial configuration to be used for all added peers.     
00290       void set_initial_configuration (in CosPropertyService::Properties initial);
00291 
00292       
00293       /// Uses <format_name> standardised by OMG and IETF
00294       /// Multicasting operations are not supported yet.
00295       void set_format (in string flowName, 
00296                        in string format_name)
00297         raises (notSupported);
00298 
00299       
00300       /// Note, some of these device params are standardised by OMG
00301       /// Multicasting operations are not supported yet.
00302       void set_dev_params (in string flowName,
00303                            in CosPropertyService::Properties new_params)
00304         //   raises (CosPropertyService::PropertyException,
00305         //      streamOpFailed);
00306         raises (PropertyException,
00307                 streamOpFailed);
00308 
00309   };
00310 
00311   /**
00312    *  @interface StreamEndpoint
00313    *  @brief The Stream EndPoint. Used to implement one endpoint of a
00314    *         stream that implements the transport layer.
00315    */
00316   interface StreamEndPoint : CosPropertyService::PropertySet{
00317 
00318       /// Stop the stream. Empty the_spec means, for all the flows.
00319       void stop (in flowSpec the_spec) 
00320         raises (noSuchFlow);
00321 
00322       /// Start the stream, Empty the_spec means, for all the flows.      
00323       void start (in flowSpec the_spec) 
00324         raises (noSuchFlow);
00325 
00326       /// Destroy the stream, Empty the_spec means, for all the flows.      
00327       void destroy (in flowSpec the_spec) 
00328         raises (noSuchFlow);
00329       
00330       /// Called by StreamCtrl. responder is the peer to connect with.
00331       boolean connect (in StreamEndPoint responder,
00332                        inout streamQoS qos_spec,
00333                        in flowSpec the_spec)
00334         raises (noSuchFlow, 
00335                 QoSRequestFailed, 
00336                 streamOpFailed);
00337       
00338       /// Called by the peer StreamEndPoint. The flow_spec indicates
00339       /// the flows (which contain transport addresses etc.).
00340       boolean request_connection (in StreamEndPoint initiator,
00341                                   in boolean is_mcast,
00342                                   inout streamQoS qos,
00343                                   inout flowSpec the_spec)
00344         raises (streamOpDenied, noSuchFlow,
00345                 QoSRequestFailed, FPError);
00346       
00347       /// Change the transport qos on a stream.
00348       boolean modify_QoS (inout streamQoS new_qos,
00349                           in flowSpec the_flows)
00350         raises (noSuchFlow, 
00351                 QoSRequestFailed);
00352       
00353       /// Used to restrict the set of protocols.
00354       boolean set_protocol_restriction (in protocolSpec the_pspec);
00355       
00356       /// Disconnect the flows.
00357       void disconnect(in flowSpec the_spec)
00358         raises (noSuchFlow, 
00359                 streamOpFailed);
00360       
00361       /// Used to control the SFP parameters.
00362       void set_FPStatus (in flowSpec the_spec,
00363                          in string fp_name,
00364                          in any fp_settings)
00365         raises (noSuchFlow, 
00366                 FPError);
00367 
00368       /// Not implemented in the light profile, throws notsupported.
00369       Object get_fep (in string flow_name)
00370         raises (notSupported, 
00371                 noSuchFlow);
00372       
00373       /// Not implemented in the light profile, throws notsupported.
00374       string add_fep (in Object the_fep)
00375         /// Can fail for reasons {duplicateFepName, duplicateRef}
00376         raises (notSupported, 
00377                 streamOpFailed);
00378       
00379       /// Not implemented in the light profile, throws notsupported.
00380       void remove_fep (in string fep_name)
00381         raises (notSupported, 
00382                 streamOpFailed);
00383       
00384       /// Used to "attach" a negotiator to the endpoint.
00385       void set_negotiator (in Negotiator new_negotiator);
00386 
00387       /// Used for public key encryption.
00388       void set_key (in string flow_name, 
00389                     in key the_key);
00390     
00391       /// Used to set a unique id for packets sent by this
00392       /// streamendpoint.
00393       void set_source_id (in long source_id);
00394   };
00395 
00396   /**
00397    *  @interface StreamEndPoint_A
00398    *  @brief The "A" side of a streamendpoint.
00399    */
00400   interface StreamEndPoint_A : StreamEndPoint
00401     {
00402       /// Used for ATM-style multicast.
00403       boolean multiconnect (inout streamQoS the_qos,
00404                             inout flowSpec the_spec)
00405         raises (noSuchFlow, QoSRequestFailed, streamOpFailed);
00406 
00407       /// Used for ATM-style multicast.
00408       boolean connect_leaf (in StreamEndPoint_B the_ep,
00409                             inout streamQoS the_qos,
00410                             in flowSpec the_flows)
00411         raises (streamOpFailed, noSuchFlow,
00412                 QoSRequestFailed, notSupported);
00413 
00414       /// Used for ATM-style multicast.
00415       void disconnect_leaf (in StreamEndPoint_B the_ep,
00416                             in flowSpec theSpec)
00417         raises(streamOpFailed, noSuchFlow, notSupported);
00418     };
00419 
00420   /**
00421    *  @interface StreamEndPoint_B
00422    *  @brief The "B" side of a streamendpoint.
00423    */
00424   interface StreamEndPoint_B : StreamEndPoint 
00425     {
00426       /// Used for ATM-style multicast.
00427       boolean multiconnect (inout streamQoS the_qos,
00428                             inout flowSpec the_spec)
00429         raises (streamOpFailed, noSuchFlow,
00430                 QoSRequestFailed, FPError);
00431 
00432     };
00433 
00434   /**
00435    *  @interface VDev
00436    *  @brief Implements the VDev interface. One of these is created per
00437    *         connection, and represents device-specific parameters.
00438    */
00439   interface VDev : CosPropertyService::PropertySet
00440     {
00441       /// Called to tell the vdev who the streamctrl, peer vdev is.
00442       boolean set_peer (in StreamCtrl the_ctrl,
00443                         in VDev the_peer_dev,
00444                         inout streamQoS the_qos,
00445                         in flowSpec the_spec)
00446         raises (noSuchFlow, 
00447                 QoSRequestFailed, 
00448                 streamOpFailed);
00449 
00450       /// Used to set the streamctrl and multicast device.
00451       boolean set_Mcast_peer (in StreamCtrl the_ctrl,
00452                               in MCastConfigIf a_mcastconfigif,
00453                               inout streamQoS the_qos,
00454                               in flowSpec the_spec)
00455         raises (noSuchFlow, 
00456                 QoSRequestFailed, 
00457                 streamOpFailed);
00458 
00459       /// Called by the peer VDev to configure the device (catch all).
00460       void configure (in CosPropertyService::Property the_config_mesg)
00461         raises (PropertyException, 
00462                 streamOpFailed);
00463 
00464       /// Uses <formatName> standardised by OMG and IETF
00465       /// Used to set a format on a flowname.
00466       void set_format (in string flowName, 
00467                        in string format_name)
00468         raises (notSupported);
00469 
00470       // = Note, some of these device params are standardised by OMG
00471       /// Used to set device parameters.
00472       void set_dev_params (in string flowName,
00473                            in CosPropertyService::Properties new_params)
00474         raises (PropertyException, 
00475                 streamOpFailed);
00476 
00477       /// Called to change QoS of the device.
00478       boolean modify_QoS (inout streamQoS the_qos,
00479                           in flowSpec the_spec)
00480         raises (noSuchFlow, 
00481                 QoSRequestFailed);
00482 
00483 
00484     };
00485 
00486   /** 
00487    *  @interface MMDevice
00488    *  @brief Implements a factory to create Endpoints and VDevs.
00489    */
00490   interface MMDevice : CosPropertyService::PropertySet 
00491     {
00492       /// Called by StreamCtrl to create a "A" type streamendpoint and
00493       /// vdev.
00494       StreamEndPoint_A create_A (in StreamCtrl the_requester,
00495                                  out VDev the_vdev,
00496                                  inout streamQoS the_qos,
00497                                  out boolean met_qos,
00498                                  inout string named_vdev,
00499                                  in flowSpec the_spec)
00500         raises (streamOpFailed, 
00501                 streamOpDenied, 
00502                 notSupported,
00503                 QoSRequestFailed, 
00504                 noSuchFlow);
00505 
00506       /// Called by StreamCtrl to create a "B" type streamendpoint and
00507       /// vdev.
00508       StreamEndPoint_B create_B(in StreamCtrl the_requester,
00509                                 out VDev the_vdev,
00510                                 inout streamQoS the_qos,
00511                                 out boolean met_qos,
00512                                 inout string named_vdev,
00513                                 in flowSpec the_spec)
00514         raises (streamOpFailed, 
00515                 streamOpDenied, 
00516                 notSupported,
00517                 QoSRequestFailed, 
00518                 noSuchFlow);
00519     
00520       /// Can be used to request the MMDevice to create a new
00521       /// StreamCtrl, and call bind_devs on it.
00522       StreamCtrl bind (in MMDevice peer_device,
00523                        inout streamQoS the_qos,
00524                        out boolean is_met,
00525                        in flowSpec the_spec)
00526         raises (streamOpFailed, 
00527                 noSuchFlow, 
00528                 QoSRequestFailed);
00529     
00530       /// Multicast bind.
00531       StreamCtrl bind_mcast (in MMDevice first_peer,
00532                              inout streamQoS the_qos,
00533                              out boolean is_met,
00534                              in flowSpec the_spec)
00535         raises (streamOpFailed, 
00536                 noSuchFlow, 
00537                 QoSRequestFailed);
00538 
00539       /// Remove the StreamEndPoint and the related vdev.
00540       void destroy (in StreamEndPoint the_ep, 
00541                     in string vdev_name)
00542         // ie VDev not found
00543         raises (notSupported);
00544      
00545       /// Not supported in the light profile, raises notsupported.
00546       string add_fdev (in Object the_fdev)
00547         raises (notSupported, 
00548                 streamOpFailed);
00549 
00550       /// Not supported in the light profile, raises notsupported.
00551       Object get_fdev (in string flow_name)
00552         raises (notSupported, 
00553                 noSuchFlow);
00554 
00555       /// Not supported in the light profile, raises notsupported.
00556       void remove_fdev (in string flow_name)
00557         raises (notSupported, 
00558                 noSuchFlow,
00559                 streamOpFailed);
00560     };
00561 
00562   // Define the exceptions.
00563   exception protocolNotSupported{};
00564   exception formatNotSupported{};
00565   exception formatMismatch{};
00566   exception FEPMismatch{};
00567   exception alreadyConnected{};
00568   exception invalidSettings{string settings;};
00569   exception notConnected{};
00570   exception deviceQosMismatch{};
00571   exception failedToConnect{string reason;};
00572   exception failedToListen{string reason;};
00573 
00574   // Forward declarations of the interfaces.
00575   interface FlowProducer;
00576   interface FlowConsumer;
00577   interface FlowEndPoint;
00578   interface FDev;
00579 
00580   interface FlowConnection : CosPropertyService::PropertySet{
00581     void stop();
00582     void start();
00583     void destroy();
00584 
00585     boolean modify_QoS(inout AVStreams::QoS new_qos)
00586       raises (AVStreams::QoSRequestFailed);
00587 
00588     boolean use_flow_protocol(in string fp_name,
00589                               in any fp_settings)
00590       raises (AVStreams::FPError, AVStreams::notSupported);
00591 
00592     oneway void push_event(in AVStreams::streamEvent the_event);
00593 
00594     boolean connect_devs(in FDev a_party, in FDev b_party,
00595                          inout AVStreams::QoS the_qos)
00596       raises (AVStreams::streamOpFailed, 
00597               AVStreams::streamOpDenied, 
00598               AVStreams::QoSRequestFailed);
00599 
00600     boolean connect(in FlowProducer flow_producer,
00601                     in FlowConsumer flow_consumer,
00602                     inout AVStreams::QoS the_qos)
00603       raises (formatMismatch, FEPMismatch, alreadyConnected);
00604 
00605     boolean disconnect();
00606 
00607     // The notSupported exception is raised where
00608     // flow cannot have multiple producers
00609     boolean add_producer(in FlowProducer flow_producer,
00610                          inout AVStreams::QoS the_qos)
00611       raises (alreadyConnected, AVStreams::notSupported);
00612 
00613     boolean add_consumer(in FlowConsumer flow_consumer,
00614                          inout AVStreams::QoS the_qos)
00615       raises (alreadyConnected);
00616 
00617     boolean drop(in FlowEndPoint target)
00618       raises (notConnected);
00619   };
00620 
00621   interface FlowEndPoint : CosPropertyService::PropertySet
00622     {
00623       boolean lock();
00624       void unlock();
00625 
00626       void stop();
00627       void start();
00628       void destroy();
00629 
00630       /// Default is a nil object reference
00631       attribute AVStreams::StreamEndPoint related_sep;
00632       attribute FlowConnection related_flow_connection;
00633 
00634       FlowEndPoint get_connected_fep()
00635         raises (notConnected,AVStreams::notSupported);
00636 
00637       /// syntax of fp_name is <flowProtocol>
00638       boolean use_flow_protocol(in string fp_name,
00639                                 in any fp_settings)
00640         raises (AVStreams::FPError, AVStreams::notSupported);
00641 
00642       /// set_format() initializes ëformatí 
00643       /// as current media format e.g. MPEG.
00644       void set_format(in string format)
00645         raises (AVStreams::notSupported);
00646 
00647       void set_dev_params(in CosPropertyService::Properties new_settings)
00648         //      raises (CosPropertyService::PropertyException, AVStreams::streamOpFailed);
00649         raises (PropertyException, AVStreams::streamOpFailed);
00650       
00651       void set_protocol_restriction(in AVStreams::protocolSpec the_spec)
00652         raises (AVStreams::notSupported);
00653 
00654       boolean is_fep_compatible(in FlowEndPoint fep) 
00655         raises (formatMismatch, deviceQosMismatch);
00656 
00657       boolean set_peer(in FlowConnection the_fc,
00658                        in FlowEndPoint the_peer_fep,
00659                        inout AVStreams::QoS the_qos)
00660         raises (AVStreams::QoSRequestFailed,
00661                 AVStreams::streamOpFailed);
00662 
00663       boolean set_Mcast_peer(in FlowConnection the_fc,
00664                              in AVStreams::MCastConfigIf a_mcastconfigif,
00665                              inout AVStreams::QoS the_qos)
00666         raises (AVStreams::QoSRequestFailed);
00667 
00668       boolean connect_to_peer(inout AVStreams::QoS the_qos,
00669                               in string address,
00670                               in string use_flow_protocol) // syntax <flowProtocol>
00671         raises(failedToConnect,AVStreams::FPError, AVStreams::QoSRequestFailed);
00672 
00673       /// Needs to know its peer to choose its protocol correctly
00674       /// Also to ask for a reverse channel for credit-based flow
00675       /// control, if one is required
00676       string go_to_listen(inout AVStreams::QoS the_qos,
00677                           in boolean is_mcast,
00678                           in FlowEndPoint peer,
00679                           inout string flowProtocol)// syntax <flowProtocol>
00680         // The out value of flowProtocol contains SFP version
00681         // supported and all options including "Credit".
00682         raises(failedToListen, AVStreams::FPError, 
00683                AVStreams::QoSRequestFailed);
00684     };
00685 
00686   interface FlowProducer : FlowEndPoint
00687     {
00688       string connect_mcast(inout AVStreams::QoS the_qos,
00689                            out boolean is_met,
00690                            in string address,
00691                            in string use_flow_protocol)
00692         raises (failedToConnect,
00693                 AVStreams::notSupported,
00694                 AVStreams::FPError,
00695                 AVStreams::QoSRequestFailed);
00696 
00697       string get_rev_channel(in string pcol_name);
00698       void set_key(in AVStreams::key the_key);
00699       void set_source_id(in long source_id);
00700     };
00701 
00702   interface FlowConsumer : FlowEndPoint
00703     {
00704     };
00705 
00706   interface FDev : CosPropertyService::PropertySet {
00707     FlowProducer create_producer(in FlowConnection the_requester,
00708                                  inout AVStreams::QoS the_qos,
00709                                  out boolean met_qos,
00710                                  inout string named_fdev)
00711       raises(AVStreams::streamOpFailed,
00712              AVStreams::streamOpDenied,
00713              AVStreams::notSupported,
00714              AVStreams::QoSRequestFailed);
00715 
00716     FlowConsumer create_consumer(in FlowConnection the_requester,
00717                                  inout AVStreams::QoS the_qos,
00718                                  out boolean met_qos,
00719                                  inout string named_fdev)
00720       raises(AVStreams::streamOpFailed,
00721              AVStreams::streamOpDenied,
00722              AVStreams::notSupported,
00723              AVStreams::QoSRequestFailed);
00724 
00725     FlowConnection bind(in FDev peer_device,
00726                         inout AVStreams::QoS the_qos,
00727                         out boolean is_met)
00728       raises (AVStreams::streamOpFailed,
00729               AVStreams::QoSRequestFailed);
00730 
00731     FlowConnection bind_mcast(in FDev first_peer,
00732                               inout AVStreams::QoS the_qos,
00733                               out boolean is_met)
00734       raises (AVStreams::streamOpFailed,
00735               AVStreams::QoSRequestFailed);
00736 
00737     void destroy(in FlowEndPoint the_ep, in string fdev_name)
00738       // ie FDev not found
00739       raises (AVStreams::notSupported);
00740   };
00741 
00742   enum PositionOrigin {
00743     AbsolutePosition, RelativePosition, ModuloPosition
00744   };
00745 
00746   enum PositionKey {
00747     ByteCount, SampleCount, MediaTime
00748   };
00749 
00750   struct Position {
00751     PositionOrigin origin;
00752     PositionKey key;
00753     long value;
00754   };
00755 
00756   exception PostionKeyNotSupported { PositionKey key;};
00757   exception InvalidPosition { PositionKey key;};
00758 
00759   /**
00760    *  @interface MediaControl
00761    *  @brief MediaControl interface is similar to ControlledStream 
00762    *         interface in MSS.  It can be inherited by flow endpoints or
00763    *         FlowConnection interfaces.
00764    */
00765   interface MediaControl{
00766 
00767     exception PostionKeyNotSupported { PositionKey key;};
00768 
00769     Position get_media_position(in PositionOrigin an_origin,
00770                                 in PositionKey a_key)
00771       raises (PostionKeyNotSupported);
00772 
00773     void set_media_position(in Position a_position)
00774       raises (PostionKeyNotSupported, InvalidPosition);
00775 
00776     void start(in Position a_position)
00777       raises(InvalidPosition);
00778     void pause(in Position a_position)
00779       raises(InvalidPosition);
00780     void resume(in Position a_position)
00781       raises(InvalidPosition);
00782     void stop(in Position a_position)
00783       raises(InvalidPosition);
00784   };
00785 
00786   // Additional sequences needed for the properties.
00787 
00788   typedef sequence<FlowConnection> FlowConnection_seq;
00789   typedef sequence<StreamEndPoint_A> StreamEndPoint_A_seq;
00790   typedef sequence<StreamEndPoint_B> StreamEndPoint_B_seq;
00791   typedef sequence<FlowEndPoint> FlowEndPoint_seq;
00792   typedef sequence<Object>  Object_seq;
00793 };
00794 
00795 #endif /* TAO_AV_STREAMS_IDL */

Generated on Tue Feb 2 17:47:49 2010 for TAO_AV by  doxygen 1.4.7