haikuwebkit/Source/WebCore/platform/mediastream/RTCRtpCapabilities.h

47 lines
1.7 KiB
C
Raw Permalink Normal View History

Add support for sender/receiver getCapabilities https://bugs.webkit.org/show_bug.cgi?id=191192 Reviewed by Eric Carlson. LayoutTests/imported/w3c: * web-platform-tests/webrtc/RTCRtpCapabilities-helper.js: (string_appeared_here.validateRtpCapabilities): Change already made upstream. * web-platform-tests/webrtc/RTCRtpReceiver-getCapabilities-expected.txt: * web-platform-tests/webrtc/RTCRtpSender-getCapabilities-expected.txt: * web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt: Source/WebCore: Expose sender/receiver RTCRtpCapabilities to JS. Add corresponding IDL and plumbing down to libwebrtc peer connection factory. Covered by rebased tests. * CMakeLists.txt: * DerivedSources.make: * Modules/mediastream/PeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::receiverCapabilities): (WebCore::PeerConnectionBackend::senderCapabilities): * Modules/mediastream/PeerConnectionBackend.h: * Modules/mediastream/RTCRtpCapabilities.idl: Added. * Modules/mediastream/RTCRtpReceiver.cpp: (WebCore::RTCRtpReceiver::getCapabilities): * Modules/mediastream/RTCRtpReceiver.h: * Modules/mediastream/RTCRtpReceiver.idl: * Modules/mediastream/RTCRtpSender.cpp: (WebCore::RTCRtpSender::getCapabilities): * Modules/mediastream/RTCRtpSender.h: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::receiverCapabilities): (WebCore::PeerConnectionBackend::senderCapabilities): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mediastream/RTCPMuxPolicy.h: * platform/mediastream/RTCRtpCapabilities.h: Added. * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::typeFromKind): (WebCore::fromStdString): (WebCore::toChannels): (WebCore::toRTCRtpCapabilities): (WebCore::LibWebRTCProvider::receiverCapabilities): (WebCore::LibWebRTCProvider::senderCapabilities): * platform/mediastream/libwebrtc/LibWebRTCProvider.h: Canonical link: https://commits.webkit.org/206150@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-07 04:01:49 +00:00
/*
* Copyright (C) 2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#if ENABLE(WEB_RTC)
Implement transceiver setCodecPreferences https://bugs.webkit.org/show_bug.cgi?id=190840 <rdar://problem/45496326> Reviewed by Eric Carlson. LayoutTests/imported/w3c: * web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt: Source/ThirdParty/libwebrtc: * Configurations/libwebrtc.iOS.exp: * Configurations/libwebrtc.iOSsim.exp: * Configurations/libwebrtc.mac.exp: Source/WebCore: Add binding code to pipe setCodecPreferences up to webrtc backend, Covered by updated and rebased tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Modules/mediastream/RTCRtpCapabilities.idl: * Modules/mediastream/RTCRtpCodecCapability.idl: Added. * Modules/mediastream/RTCRtpTransceiver.cpp: (WebCore::RTCRtpTransceiver::setCodecPreferences): * Modules/mediastream/RTCRtpTransceiver.h: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/mediastream/RTCRtpTransceiverBackend.h: * Modules/mediastream/libwebrtc/LibWebRTCObservers.h: (WebCore::toExceptionCode): Deleted. * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: (WebCore::toRtpCodecCapability): (WebCore::LibWebRTCRtpTransceiverBackend::setCodecPreferences): * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h: * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp: (WebCore::toExceptionCode): (WebCore::toException): * Modules/mediastream/libwebrtc/LibWebRTCUtils.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mediastream/RTCRtpCapabilities.h: (): Deleted. * platform/mediastream/RTCRtpCodecCapability.h: Added. * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::toRTCRtpCapabilities): LayoutTests: * webrtc/video-mute-vp8.html: Canonical link: https://commits.webkit.org/218842@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-01 12:55:46 +00:00
#include "RTCRtpCodecCapability.h"
Add support for sender/receiver getCapabilities https://bugs.webkit.org/show_bug.cgi?id=191192 Reviewed by Eric Carlson. LayoutTests/imported/w3c: * web-platform-tests/webrtc/RTCRtpCapabilities-helper.js: (string_appeared_here.validateRtpCapabilities): Change already made upstream. * web-platform-tests/webrtc/RTCRtpReceiver-getCapabilities-expected.txt: * web-platform-tests/webrtc/RTCRtpSender-getCapabilities-expected.txt: * web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt: Source/WebCore: Expose sender/receiver RTCRtpCapabilities to JS. Add corresponding IDL and plumbing down to libwebrtc peer connection factory. Covered by rebased tests. * CMakeLists.txt: * DerivedSources.make: * Modules/mediastream/PeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::receiverCapabilities): (WebCore::PeerConnectionBackend::senderCapabilities): * Modules/mediastream/PeerConnectionBackend.h: * Modules/mediastream/RTCRtpCapabilities.idl: Added. * Modules/mediastream/RTCRtpReceiver.cpp: (WebCore::RTCRtpReceiver::getCapabilities): * Modules/mediastream/RTCRtpReceiver.h: * Modules/mediastream/RTCRtpReceiver.idl: * Modules/mediastream/RTCRtpSender.cpp: (WebCore::RTCRtpSender::getCapabilities): * Modules/mediastream/RTCRtpSender.h: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::receiverCapabilities): (WebCore::PeerConnectionBackend::senderCapabilities): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mediastream/RTCPMuxPolicy.h: * platform/mediastream/RTCRtpCapabilities.h: Added. * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::typeFromKind): (WebCore::fromStdString): (WebCore::toChannels): (WebCore::toRTCRtpCapabilities): (WebCore::LibWebRTCProvider::receiverCapabilities): (WebCore::LibWebRTCProvider::senderCapabilities): * platform/mediastream/libwebrtc/LibWebRTCProvider.h: Canonical link: https://commits.webkit.org/206150@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-07 04:01:49 +00:00
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
struct RTCRtpCapabilities {
struct HeaderExtensionCapability {
String uri;
};
Implement transceiver setCodecPreferences https://bugs.webkit.org/show_bug.cgi?id=190840 <rdar://problem/45496326> Reviewed by Eric Carlson. LayoutTests/imported/w3c: * web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt: Source/ThirdParty/libwebrtc: * Configurations/libwebrtc.iOS.exp: * Configurations/libwebrtc.iOSsim.exp: * Configurations/libwebrtc.mac.exp: Source/WebCore: Add binding code to pipe setCodecPreferences up to webrtc backend, Covered by updated and rebased tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Modules/mediastream/RTCRtpCapabilities.idl: * Modules/mediastream/RTCRtpCodecCapability.idl: Added. * Modules/mediastream/RTCRtpTransceiver.cpp: (WebCore::RTCRtpTransceiver::setCodecPreferences): * Modules/mediastream/RTCRtpTransceiver.h: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/mediastream/RTCRtpTransceiverBackend.h: * Modules/mediastream/libwebrtc/LibWebRTCObservers.h: (WebCore::toExceptionCode): Deleted. * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: (WebCore::toRtpCodecCapability): (WebCore::LibWebRTCRtpTransceiverBackend::setCodecPreferences): * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h: * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp: (WebCore::toExceptionCode): (WebCore::toException): * Modules/mediastream/libwebrtc/LibWebRTCUtils.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mediastream/RTCRtpCapabilities.h: (): Deleted. * platform/mediastream/RTCRtpCodecCapability.h: Added. * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::toRTCRtpCapabilities): LayoutTests: * webrtc/video-mute-vp8.html: Canonical link: https://commits.webkit.org/218842@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-01 12:55:46 +00:00
Vector<RTCRtpCodecCapability> codecs;
Add support for sender/receiver getCapabilities https://bugs.webkit.org/show_bug.cgi?id=191192 Reviewed by Eric Carlson. LayoutTests/imported/w3c: * web-platform-tests/webrtc/RTCRtpCapabilities-helper.js: (string_appeared_here.validateRtpCapabilities): Change already made upstream. * web-platform-tests/webrtc/RTCRtpReceiver-getCapabilities-expected.txt: * web-platform-tests/webrtc/RTCRtpSender-getCapabilities-expected.txt: * web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt: Source/WebCore: Expose sender/receiver RTCRtpCapabilities to JS. Add corresponding IDL and plumbing down to libwebrtc peer connection factory. Covered by rebased tests. * CMakeLists.txt: * DerivedSources.make: * Modules/mediastream/PeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::receiverCapabilities): (WebCore::PeerConnectionBackend::senderCapabilities): * Modules/mediastream/PeerConnectionBackend.h: * Modules/mediastream/RTCRtpCapabilities.idl: Added. * Modules/mediastream/RTCRtpReceiver.cpp: (WebCore::RTCRtpReceiver::getCapabilities): * Modules/mediastream/RTCRtpReceiver.h: * Modules/mediastream/RTCRtpReceiver.idl: * Modules/mediastream/RTCRtpSender.cpp: (WebCore::RTCRtpSender::getCapabilities): * Modules/mediastream/RTCRtpSender.h: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::PeerConnectionBackend::receiverCapabilities): (WebCore::PeerConnectionBackend::senderCapabilities): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/mediastream/RTCPMuxPolicy.h: * platform/mediastream/RTCRtpCapabilities.h: Added. * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::typeFromKind): (WebCore::fromStdString): (WebCore::toChannels): (WebCore::toRTCRtpCapabilities): (WebCore::LibWebRTCProvider::receiverCapabilities): (WebCore::LibWebRTCProvider::senderCapabilities): * platform/mediastream/libwebrtc/LibWebRTCProvider.h: Canonical link: https://commits.webkit.org/206150@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-07 04:01:49 +00:00
Vector<HeaderExtensionCapability> headerExtensions;
};
}; // namespace WebCore
#endif