res/ari/resource_bridges: Add the ability to manipulate the video source

In multi-party bridges, Asterisk currently supports two video modes:
 * Follow the talker, in which the speaker with the most energy is shown
   to all participants but the speaker, and the speaker sees the
   previous video source
 * Explicitly set video sources, in which all participants see a locked
   video source

Prior to this patch, ARI had no ability to manipulate the video source.
This isn't important for two-party bridges, in which Asterisk merely
relays the video between the participants. However, in a multi-party
bridge, it can be advantageous to allow an external application to
manipulate the video source.

This patch provides two new routes to accomplish this:
(1) setVideoSource: POST /bridges/{bridgeId}/videoSource/{channelId}
    Sets a video source to an explicit channel
(2) clearVideoSource: DELETE /bridges/{bridgeId}/videoSource
    Removes any explicit video source, and sets the video mode to talk
    detection

ASTERISK-26595 #close

Change-Id: I98e455d5bffc08ea5e8d6b84ccaf063c714e6621
This commit is contained in:
Matt Jordan
2016-11-08 10:11:41 -06:00
parent a58d359701
commit d23b4af477
15 changed files with 645 additions and 14 deletions

31
CHANGES
View File

@@ -12,6 +12,37 @@
--- Functionality changes from Asterisk 13.12.0 to Asterisk 13.13.0 ----------
------------------------------------------------------------------------------
AMI
------------------
* Events that reference a bridge may now contain two new optional fields:
- 'BridgeVideoSourceMode': the video source mode for the bridge.
Can be one of 'none', 'talker', or 'single'.
- 'BridgeVideoSource': the unique ID of the channel that is the video
source in this bridge, if one exists.
* A new event, BridgeVideoSourceUpdate, has been added with a class
authorization of CALL. The event is raised when the video source changes
in a multi-party mixing bridge.
ARI
------------------
* The bridges resource now exposes two new operations:
- POST /bridges/{bridgeId}/videoSource/{channelId}: Set a video source in a
multi-party mixing bridge
- DELETE /bridges/{bridgeId}/videoSource: Remove the set video source,
reverting to talk detection for the video source
* The bridge model in any returned response or event now contains the following
optional fields:
- video_mode: the video source mode for the bridge. Can be one of 'none',
'talker', or 'single'.
- video_source_id: the unique ID of the channel that is the video source
in this bridge, if one exists.
* A new event, BridgeVideoSourceChanged, has been added for bridges.
Applications subscribed to a bridge will receive this event when the source
of video changes in a mixing bridge.
res_pjsip
------------------
* Automatic dual stack support is now implemented. Depending on DNS resolution