import { OcaCounter } from '../../types/OcaCounter.js'; import { OcaCounterSet } from '../../types/OcaCounterSet.js'; import { IOcaIODirection } from '../../types/OcaIODirection.js'; import { IOcaMediaStreamEndpoint, OcaMediaStreamEndpoint, } from '../../types/OcaMediaStreamEndpoint.js'; import { IOcaMediaStreamEndpointCommand } from '../../types/OcaMediaStreamEndpointCommand.js'; import { IOcaMediaStreamEndpointState } from '../../types/OcaMediaStreamEndpointState.js'; import { OcaMediaStreamEndpointStatus } from '../../types/OcaMediaStreamEndpointStatus.js'; import { IOcaMediaStreamMode } from '../../types/OcaMediaStreamMode.js'; import { IOcaMediaStreamModeCapability, OcaMediaStreamModeCapability, } from '../../types/OcaMediaStreamModeCapability.js'; import { IOcaMediaTransportTimingParameters, OcaMediaTransportTimingParameters, } from '../../types/OcaMediaTransportTimingParameters.js'; import { OcaPort } from '../../types/OcaPort.js'; import { IOcaPortClockMapEntry, OcaPortClockMapEntry, } from '../../types/OcaPortClockMapEntry.js'; import { IOcaPortID, OcaPortID } from '../../types/OcaPortID.js'; import { OcaTimeReferenceType } from '../../types/OcaTimeReferenceType.js'; import { Arguments } from '../arguments.js'; import { PropertyEvent } from '../property_event.js'; import { RemoteDevice } from '../remote_device.js'; import { OcaNetworkApplication } from './OcaNetworkApplication.js'; /** * Connection Management 4 (CM4) class. Specifies the device's control interface * to media transport functions. This is the anchoring class for CM4 data * structures. Abstract class that shall be subclassed for each media transport * Adaptation. * @extends OcaNetworkApplication * @class OcaMediaTransportApplication */ export declare class OcaMediaTransportApplication extends OcaNetworkApplication { /** * This event is emitted whenever Ports changes. */ OnPortsChanged: PropertyEvent; /** * This event is emitted whenever PortClockMap changes. */ OnPortClockMapChanged: PropertyEvent>; /** * This event is emitted whenever MaxInputEndpoints changes. */ OnMaxInputEndpointsChanged: PropertyEvent; /** * This event is emitted whenever MaxOutputEndpoints changes. */ OnMaxOutputEndpointsChanged: PropertyEvent; /** * This event is emitted whenever MaxPortsPerChannel changes. */ OnMaxPortsPerChannelChanged: PropertyEvent; /** * This event is emitted whenever MaxChannelsPerEndpoint changes. */ OnMaxChannelsPerEndpointChanged: PropertyEvent; /** * This event is emitted whenever MediaStreamModeCapabilities changes. */ OnMediaStreamModeCapabilitiesChanged: PropertyEvent< OcaMediaStreamModeCapability[] >; /** * This event is emitted whenever TransportTimingParameters changes. */ OnTransportTimingParametersChanged: PropertyEvent< OcaMediaTransportTimingParameters >; /** * This event is emitted whenever AlignmentLevelLimits changes. */ OnAlignmentLevelLimitsChanged: PropertyEvent>; /** * This event is emitted whenever Endpoints changes. */ OnEndpointsChanged: PropertyEvent; /** * This event is emitted whenever EndpointStatuses changes. */ OnEndpointStatusesChanged: PropertyEvent< Map >; /** * This event is emitted whenever TransportSessionControlAgentONos changes. */ OnTransportSessionControlAgentONosChanged: PropertyEvent; constructor(objectNumber: number, device: RemoteDevice); /** * Adds an input or output port.. * * @method OcaMediaTransportApplication#AddPort * @param {string} Name * @param {IOcaIODirection} Mode * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaPortID`. */ AddPort(Name: string, Mode: IOcaIODirection): Promise; /** * Deletes an input or output port.. * * @method OcaMediaTransportApplication#DeletePort * @param {IOcaPortID} ID * * @returns {Promise} */ DeletePort(ID: IOcaPortID): Promise; /** * Gets the list of ports owned by this object. * * @method OcaMediaTransportApplication#GetPorts * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaPort[]`. */ GetPorts(): Promise; /** * Gets the name of the designated port. * * @method OcaMediaTransportApplication#GetPortName * @param {IOcaPortID} PortID * * @returns {Promise} * A promise which resolves to a single value of type ``string``. */ GetPortName(PortID: IOcaPortID): Promise; /** * Sets the name of the designated port. * * @method OcaMediaTransportApplication#SetPortName * @param {IOcaPortID} PortID * @param {string} Name * * @returns {Promise} */ SetPortName(PortID: IOcaPortID, Name: string): Promise; /** * Gets the value of the **PortClockMap** property. * * @method OcaMediaTransportApplication#GetPortClockMap * @returns {Promise>} * A promise which resolves to a single value of type ``Map``. */ GetPortClockMap(): Promise>; /** * Sets the value of the **PortClockMap** property. * * @method OcaMediaTransportApplication#SetPortClockMap * @param {Map} Map * * @returns {Promise} */ SetPortClockMap(Map: Map): Promise; /** * Adds or replaces an entry in the **PortClockMap** property. * * @method OcaMediaTransportApplication#SetPortClockMapEntry * @param {IOcaPortID} ID * @param {IOcaPortClockMapEntry} Entry * * @returns {Promise} */ SetPortClockMapEntry( ID: IOcaPortID, Entry: IOcaPortClockMapEntry ): Promise; /** * Deletes the **PortClockMap** entry identified by the given ID. * * @method OcaMediaTransportApplication#DeletePortClockMapEntry * @param {IOcaPortID} ID * * @returns {Promise} */ DeletePortClockMapEntry(ID: IOcaPortID): Promise; /** * Retrieves the value of the **PortClockMap** entry identified by the given * port ID. * * @method OcaMediaTransportApplication#GetPortClockMapEntry * @param {IOcaPortID} ID * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaPortClockMapEntry`. */ GetPortClockMapEntry(ID: IOcaPortID): Promise; /** * Gets the maximum number of input and output stream endpoints this media * transport application supports. * The return values of this method are * * - MaxOutputCount of type ``number`` * - MaxInputCount of type ``number`` * * @method OcaMediaTransportApplication#GetMaxEndpointCounts * @returns {Promise>} */ GetMaxEndpointCounts(): Promise>; /** * Gets the maximum number of ports per stream endpoint channel this media * transport application supports. * * @method OcaMediaTransportApplication#GetMaxPortsPerChannel * @returns {Promise} * A promise which resolves to a single value of type ``number``. */ GetMaxPortsPerChannel(): Promise; /** * Gets the maximum number of channels per stream endpoint this media * transport application supports. * * @method OcaMediaTransportApplication#GetMaxChannelsPerEndpoint * @returns {Promise} * A promise which resolves to a single value of type ``number``. */ GetMaxChannelsPerEndpoint(): Promise; /** * Sets the alignment level limits for stream endpoints attached to this media * transport application. * * @method OcaMediaTransportApplication#SetAlignmentLevelLimits * @param {IOcaInterval} Limits * * @returns {Promise} */ SetAlignmentLevelLimits(Limits: IOcaInterval): Promise; /** * Gets this media transport application's media stream mode capability * descriptors. * * @method OcaMediaTransportApplication#GetMediaStreamModeCapabilities * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaMediaStreamModeCapability[]`. */ GetMediaStreamModeCapabilities(): Promise; /** * Sets this media transport application's media stream mode capability * descriptors. May only be called when there are no media stream endpoints * defined. If this condition is not met, the call will return status value * **InvalidRequest.** * * @method OcaMediaTransportApplication#SetMediaStreamModeCapabilities * @param {IOcaMediaStreamModeCapability[]} Capabilities * * @returns {Promise} */ SetMediaStreamModeCapabilities( Capabilities: IOcaMediaStreamModeCapability[] ): Promise; /** * Gets a specific media stream mode capability descriptor. * * @method OcaMediaTransportApplication#GetMediaStreamModeCapability * @param {number} CapabilityID * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaMediaStreamModeCapability`. */ GetMediaStreamModeCapability( CapabilityID: number ): Promise; /** * Gets this media transport application's media transport timing parameters. * * @method OcaMediaTransportApplication#GetTransportTimingParameters * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaMediaTransportTimingParameters`. */ GetTransportTimingParameters(): Promise; /** * Sets this media transport application's media transport timing parameters. * Optional method. * * @method OcaMediaTransportApplication#SetTransportTimingParameters * @param {IOcaMediaTransportTimingParameters} Parameters * * @returns {Promise} */ SetTransportTimingParameters( Parameters: IOcaMediaTransportTimingParameters ): Promise; /** * Gets the min and max alignment levels for stream endpoints attached to this * media transport application. * * @method OcaMediaTransportApplication#GetAlignmentLevelLimits * @returns {Promise>} * A promise which resolves to a single value of type :class:`OcaInterval`. */ GetAlignmentLevelLimits(): Promise>; /** * Gets the descriptors of all the stream endpoints owned by this media * transport application object. * * @method OcaMediaTransportApplication#GetEndpoints * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaMediaStreamEndpoint[]`. */ GetEndpoints(): Promise; /** * Retrieves the descriptor of a given stream endpoint. * * @method OcaMediaTransportApplication#GetEndpoint * @param {number} ID * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaMediaStreamEndpoint`. */ GetEndpoint(ID: number): Promise; /** * Gets the status of all the stream endpoints collected by this media * transport application. Key of returned map is endpoint ID. * * @method OcaMediaTransportApplication#GetEndpointStatuses * @returns {Promise>} * A promise which resolves to a single value of type ``Map``. */ GetEndpointStatuses(): Promise>; /** * Gets the status of a single stream endpoint. * * @method OcaMediaTransportApplication#GetEndpointStatus * @param {number} ID * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaMediaStreamEndpointStatus`. */ GetEndpointStatus(ID: number): Promise; /** * Adds an Endpoint to this media transport application object. Parameters of * the new Endpoint shall be given in the **Endpoint** parameter; Device shall * return the same parameter with the new Endpoint ID filled in. The new * Endpoint's **AlignmentLevel** value shall be within the bounds set by the * property **AlignmentLevelLimits**. * * @method OcaMediaTransportApplication#AddEndpoint * @param {IOcaMediaStreamEndpoint} Endpoint * @param {IOcaMediaStreamEndpointState} InitialStatus * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaMediaStreamEndpoint`. */ AddEndpoint( Endpoint: IOcaMediaStreamEndpoint, InitialStatus: IOcaMediaStreamEndpointState ): Promise; /** * Deletes a stream endpoint from this media transport application object. * * @method OcaMediaTransportApplication#DeleteEndpoint * @param {number} ID * * @returns {Promise} */ DeleteEndpoint(ID: number): Promise; /** * Changes the state of a given Endpoint. * * @method OcaMediaTransportApplication#ApplyEndpointCommand * @param {number} EndpointID * @param {IOcaMediaStreamEndpointCommand} Command * * @returns {Promise} */ ApplyEndpointCommand( EndpointID: number, Command: IOcaMediaStreamEndpointCommand ): Promise; /** * Sets the **UserLabel** field of the of the referenced Endpoint. * * @method OcaMediaTransportApplication#SetEndpointUserLabel * @param {number} EndpointID * @param {string} Label * * @returns {Promise} */ SetEndpointUserLabel(EndpointID: number, Label: string): Promise; /** * Sets the **CurrentStreamMode** field of the of the designated stream * endpoint. * * @method OcaMediaTransportApplication#SetEndpointMediaStreamMode * @param {number} EndpointID * @param {IOcaMediaStreamMode} StreamMode * * @returns {Promise} */ SetEndpointMediaStreamMode( EndpointID: number, StreamMode: IOcaMediaStreamMode ): Promise; /** * Sets an Endpoint's ChannelMap field. Mapping rules: * * - Input Endpoint maps shall specify only OCA Output Ports. * * - Output Endpoint maps shall specify only OCA Input Ports. * * - Input Endpoint maps may specify any number of OCA Output Ports per * stream channel. * * - Output Endpoint maps may specify at most one OCA Input Port per stream * channel. * * * * @method OcaMediaTransportApplication#SetEndpointChannelMap * @param {number} EndpointID * @param {Map} ChannelMap * * @returns {Promise} */ SetEndpointChannelMap( EndpointID: number, ChannelMap: Map ): Promise; /** * Sets **OcaEndpoint.AlignmentLevel** for the identified endpoint. * * @method OcaMediaTransportApplication#SetEndpointAlignmentLevel * @param {number} EndpointID * @param {number} Level * * @returns {Promise} */ SetEndpointAlignmentLevel(EndpointID: number, Level: number): Promise; /** * Gets type and ID of this Endpoint's time source. * The return values of this method are * * - ReferenceType of type ``IOcaTimeReferenceType`` * - ReferenceID of type ``string`` * * @method OcaMediaTransportApplication#GetEndpointTimeSource * @param {number} ID * * @returns {Promise>} */ GetEndpointTimeSource( ID: number ): Promise>; /** * Sets the AdaptationData field of the given Endpoint. * * @method OcaMediaTransportApplication#SetEndpointAdaptationData * @param {number} EndpointID * @param {Uint8Array} Data * * @returns {Promise} */ SetEndpointAdaptationData( EndpointID: number, Data: Uint8Array ): Promise; /** * Retrieves map of counter sets of all Endpoints. * * @method OcaMediaTransportApplication#GetEndpointCounterSets * @returns {Promise>} * A promise which resolves to a single value of type ``Map``. */ GetEndpointCounterSets(): Promise>; /** * Gets the Counterset of a designated Endpoint. * * @method OcaMediaTransportApplication#GetEndpointCounterSet * @param {number} EndpointID * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaCounterSet`. */ GetEndpointCounterSet(EndpointID: number): Promise; /** * Retrieves a Counter of a designated Endpoint * * @method OcaMediaTransportApplication#GetEndpointCounter * @param {number} EndpointID * @param {number} CounterID * * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaCounter`. */ GetEndpointCounter( EndpointID: number, CounterID: number ): Promise; /** * Adds a Notifier to the designated Counter. * * @method OcaMediaTransportApplication#AttachEndpointCounterNotifier * @param {number} EndpointID * @param {number} CounterID * @param {number} NotifierONo * * @returns {Promise} */ AttachEndpointCounterNotifier( EndpointID: number, CounterID: number, NotifierONo: number ): Promise; /** * Removes a Notifier from the designated Counter. * * @method OcaMediaTransportApplication#DetachEndpointCounterNotifier * @param {number} EndpointID * @param {number} CounterID * @param {number} NotifierONo * * @returns {Promise} */ DetachEndpointCounterNotifier( EndpointID: number, CounterID: number, NotifierONo: number ): Promise; /** * Resets Counter(s) of one or all of this media transport application * object's Endpoints. * * - If given Counter ID is zero, resets entire Counterset; otherwise, resets * designated Counter only. * * - If given Endpoint ID is zero, resets the designated Counter(s) in all * this media transport application object's Endpoints; otherwise, resets * the designated Counter(s) in the designated Endpoint only. * * * Resetting a Counter causes its value to be set to its initial value, as * defined in its **OcaCounter** instance. * * @method OcaMediaTransportApplication#ResetEndpointCounterSet * @param {number} EndpointID * @param {number} CounterID * * @returns {Promise} */ ResetEndpointCounterSet(EndpointID: number, CounterID: number): Promise; /** * Gets list of ONos of Media Transport Session Agents associated with this * media transport application object, or empty list if there aren't any. * * @method OcaMediaTransportApplication#GetTransportSessionControlAgentONos * @returns {Promise} * A promise which resolves to a single value of type ``number[]``. */ GetTransportSessionControlAgentONos(): Promise; /** * Sets list of ONos of Media Transport Session Agents associated with this * media transport application object. Optional method, mainly useful for * dynamic devices. * * @method OcaMediaTransportApplication#SetTransportSessionControlAgentONos * @param {number[]} ONos * * @returns {Promise} */ SetTransportSessionControlAgentONos(ONos: number[]): Promise; }