New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separating audio and video capabilities #81

Closed
aboba opened this Issue May 9, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@aboba
Copy link
Contributor

aboba commented May 9, 2014

Currently, getCapabilities is defined as follows:

partial interface RTCRtpSender {
static RTCRtpCapabilities getCapabilities ();
};

partial interface RTCRtpReceiver {
static RTCRtpCapabilities getCapabilities ();
};

The implication is that getCapabilities() returns both audio and video capabilities in a single RTCRtpCapabilities object.

However, if getCapabilities wasn't defined as static, then it could return only capabilities of the appropriate kind:

For example, with respect to the RTCRtpSender object, it could work this way:

var audioSender = new RTCRtpSender(audioTrack, transport);
var videoSender = new RTCRtpSender(videoTrack, transport);
rtpAudioSendCaps = audioSender.getCapabilities();
rtpVideoSendCaps = videoSender.getCapabilities();

With the RTCRtpReceiver object, it could work this way:

   var audioReceiver = new RTCRtpReceiver(transport);
   var videoReceiver = new RTCRtpReceiver(transport);
   rtpAudioRecvCaps = audioReceiver.getCapabilities("audio"); 
   rtpVideoRecvCaps = videoReceiver.getCapabilities("video"); 

The advantage of doing it this way is that a subsequent call to createParameters could be more specific:

var audioRecvParams = RTCRtpReceiver.createParameters(
"audio", remote.rtpAudioSendCaps);
var videoRecvParams = RTCRtpReceiver.createParameters(
"video", remote.rtpVideoSendCaps);

So an alternative would be as follows:

partial interface RTCRtpReceiver {
RTCRtpCapabilities getCapabilities (DOMString kind);
}

partial interface RTCRtpSender {
RTCRtpCapabilities getCapabilities ();
};

@aboba

This comment has been minimized.

Copy link
Contributor

aboba commented May 10, 2014

Suggestion from Peter Thatcher:
http://lists.w3.org/Archives/Public/public-ortc/2014May/0066.html

I'd be happy with

.getCapabilities() => returns combined audio+video capabilities
.getCapabilities("audio") => returns audio capabilities
.getCapabilities("video") => returns video capabilities

robin-raymond pushed a commit to robin-raymond/ortc that referenced this issue May 14, 2014

Robin Raymond
- ICE restart explanation added, as described in Issue 59
w3c#59

-Fixes for error handling, as described in Issue 75
w3c#75

- Fixes for miscellaneous NITs, as described in Issue 76
w3c#76

- Enable retrieval of the SSRC to be used by RTCP, as described in Issue 77
w3c#77

- Support for retrieval of audio and video capabilities, as described in Issue 81
w3c#81

- getStats interface updated, as described in Issue 82
w3c#82

- Partially addressed SVC issues described in Issue 83
w3c#83

- Partially addressed statistics update issues described in Issue 85
w3c#85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment