📄 avstreams.idl
字号:
/* -*- C++ -*- */
//=============================================================================
/**
* @file AVStreams.idl
*
* AVStreams.idl,v 1.32 2001/04/03 00:21:04 crodrigu Exp
*
* @author Sumedh Mungee <sumedh@cs.wustl.edu>
* @author Nagarajan Surendran <naga@cs.wustl.edu>
*/
//=============================================================================
#ifndef TAO_AV_STREAMS_IDL
#define TAO_AV_STREAMS_IDL
#include "CosPropertyService.idl"
#pragma prefix "omg.org"
/**
* @brief IDL for Control and Management of Audio/Video Streams
* Revised Submission.
*/
module AVStreams
{
/**
* @struct QoS
* @brief This structure represents QoS for a given type.
* E.g. {"video_qos", <"video_framerate", 26>,
* <"video_depth", 9>}
*/
struct QoS
{
string QoSType;
/// Name of the Qos type, e.g. "video_qos"
CosPropertyService::Properties QoSParams;
/// Sequence of name value pairs, see e.g. above.
};
/// The QoS of a stream is a sequence of QoS structs (defined above)
typedef sequence<QoS> streamQoS;
/// flowSpec is used to keep transport protocol information Each
/// string is one endpoint.
typedef sequence<string> flowSpec;
/// List of protocols supported protocol names registered by OMG.
/// e.g., TCP, UDP, AAL5, IPX, RTP
typedef sequence<string> protocolSpec;
/// Used as a key for public-key encryption
typedef sequence<octet> key;
/**
* @struct SFPStatus
* @brief This structure is defined for SFP1.0 Subsequent versions of
* the protocol may specify new structures.
*/
struct SFPStatus
{
boolean isFormatted;
boolean isSpecialFormat;
boolean seqNums;
boolean timestamps;
boolean sourceIndicators;
};
/**
* @enum flowState
* @brief Represents the state of a flow
*/
enum flowState
{
stopped,
started,
dead
};
/**
* @enum dirType
* @brief The direction of a flow.
*/
enum dirType
{
dir_in,
dir_out
};
/**
* @struct flowStatus
* @brief Used to store the status of a flow.
*/
struct flowStatus
{
string flowName;
dirType directionality;
flowState status;
SFPStatus theFormat;
QoS theQoS;
};
/// Used to convey events, in Basic_StreamCtrl::push_event.
typedef CosPropertyService::Property streamEvent;
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
* @brief Base class for StreamCtrl, implements basic stream start
* and stop functionality.
*/
interface Basic_StreamCtrl : CosPropertyService::PropertySet {
// = Empty flowSpec => apply operation to all flows
/// Stop the transfer of data of the stream.Empty the_spec means
/// apply operation to all flows.
void stop (in flowSpec the_spec) raises (noSuchFlow);
/// Start the transfer of data in the stream. Empty the_spec
/// means apply operation to all flows.
void start (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.
void destroy (in flowSpec the_spec) raises (noSuchFlow);
/// Changes the QoS associated with the stream Empty the_spec
/// means apply operation to all flows.
boolean modify_QoS (inout streamQoS new_qos,
in flowSpec the_spec)
raises (noSuchFlow,
QoSRequestFailed);
/// Called by StreamEndPoint when something goes wrong with a
/// flow.
oneway void push_event (in streamEvent the_event);
/// Used to control the flow protocol parameters.
void set_FPStatus (in flowSpec the_spec,
in string fp_name,
in any fp_settings)
raises (noSuchFlow,
FPError);
/// Not implemented in the light profile, will raise the
/// notsupported exception.
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);
};
/**
* @interface Negotiator
* @brief This interface is used to negotiate QoS between two stream
* endpoints.
*/
interface Negotiator
{
/// Initiates the process of negotiating the qos_spec.
boolean negotiate (in Negotiator remote_negotiator,
in streamQoS qos_spec);
};
// Forward declarations.
interface VDev;
interface MMDevice;
interface StreamEndPoint;
interface StreamEndPoint_A;
interface StreamEndPoint_B;
/**
* @interface StreamCtrl
* @brief 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.
*/
interface StreamCtrl : Basic_StreamCtrl
{
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_dev(in MMDevice dev, in flowSpec the_spec)
raises (streamOpFailed, noSuchFlow);
/// Unbind the_ep from the stream. Empty the_spec means apply to
/// all flows.
void unbind_party (in StreamEndPoint the_ep,
in flowSpec the_spec)
raises (streamOpFailed, noSuchFlow);
/// unbind the stream. Same effect as Basic_StreamCtrl::destroy ()
void unbind ()
raises (streamOpFailed);
VDev get_related_vdev(in MMDevice adev,
out StreamEndPoint sep)
raises (streamOpFailed);
};
/**
* @interface MCastConfigIf
* @brief Interface for multicasting operations.
*/
interface MCastConfigIf : CosPropertyService::PropertySet{
/// Set a peer in the multicast tree.
boolean set_peer (in Object peer,
inout streamQoS the_qos,
in flowSpec the_spec)
raises (QoSRequestFailed,
streamOpFailed);
/// Configure the multicast stream.
void configure (in CosPropertyService::Property a_configuration);
/// Sets the initial configuration to be used for all added peers.
void set_initial_configuration (in CosPropertyService::Properties initial);
/// Uses <format_name> standardised by OMG and IETF
/// Multicasting operations are not supported yet.
void set_format (in string flowName,
in string format_name)
raises (notSupported);
/// Note, some of these device params are standardised by OMG
/// Multicasting operations are not supported yet.
void set_dev_params (in string flowName,
in CosPropertyService::Properties new_params)
// raises (CosPropertyService::PropertyException,
// streamOpFailed);
raises (PropertyException,
streamOpFailed);
};
/**
* @interface StreamEndpoint
* @brief The Stream EndPoint. Used to implement one endpoint of a
* stream that implements the transport layer.
*/
interface StreamEndPoint : CosPropertyService::PropertySet{
/// Stop the stream. Empty the_spec means, for all the flows.
void stop (in flowSpec the_spec)
raises (noSuchFlow);
/// Start the stream, Empty the_spec means, for all the flows.
void start (in flowSpec the_spec)
raises (noSuchFlow);
/// Destroy the stream, Empty the_spec means, for all the flows.
void destroy (in flowSpec the_spec)
raises (noSuchFlow);
/// Called by StreamCtrl. responder is the peer to connect with.
boolean connect (in StreamEndPoint responder,
inout streamQoS qos_spec,
in flowSpec the_spec)
raises (noSuchFlow,
QoSRequestFailed,
streamOpFailed);
/// Called by the peer StreamEndPoint. The flow_spec indicates
/// the flows (which contain transport addresses etc.).
boolean request_connection (in StreamEndPoint initiator,
in boolean is_mcast,
inout streamQoS qos,
inout flowSpec the_spec)
raises (streamOpDenied, noSuchFlow,
QoSRequestFailed, FPError);
/// Change the transport qos on a stream.
boolean modify_QoS (inout streamQoS new_qos,
in flowSpec the_flows)
raises (noSuchFlow,
QoSRequestFailed);
/// Used to restrict the set of protocols.
boolean set_protocol_restriction (in protocolSpec the_pspec);
/// Disconnect the flows.
void disconnect(in flowSpec the_spec)
raises (noSuchFlow,
streamOpFailed);
/// Used to control the SFP parameters.
void set_FPStatus (in flowSpec the_spec,
in string fp_name,
in any fp_settings)
raises (noSuchFlow,
FPError);
/// Not implemented in the light profile, throws notsupported.
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);
/// Used to "attach" a negotiator to the endpoint.
void set_negotiator (in Negotiator new_negotiator);
/// Used for public key encryption.
void set_key (in string flow_name,
in key the_key);
/// Used to set a unique id for packets sent by this
/// streamendpoint.
void set_source_id (in long source_id);
};
/**
* @interface StreamEndPoint_A
* @brief The "A" side of a streamendpoint.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -