Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: talk/media/base/mediaengine.h

Issue 1486123002: Return a copy of the supported RTP header extensions instead of a reference. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/media/base/fakemediaengine.h ('k') | talk/media/webrtc/webrtcvideoengine2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/base/mediaengine.h
diff --git a/talk/media/base/mediaengine.h b/talk/media/base/mediaengine.h
index d39f2b45e6d0f945ce7509bbf9bfda19ed00ba34..c31fd72c8497abfbab4e4ebd74ac6ce0ebb1f517 100644
--- a/talk/media/base/mediaengine.h
+++ b/talk/media/base/mediaengine.h
@@ -57,6 +57,10 @@ namespace cricket {
class VideoCapturer;
+struct RtpCapabilities {
+ std::vector<RtpHeaderExtension> header_extensions;
+};
+
// MediaEngineInterface is an abstraction of a media engine which can be
// subclassed to support different media componentry backends.
// It supports voice and video operations in the same class to facilitate
@@ -108,11 +112,9 @@ class MediaEngineInterface {
virtual int GetInputLevel() = 0;
virtual const std::vector<AudioCodec>& audio_codecs() = 0;
- virtual const std::vector<RtpHeaderExtension>&
- audio_rtp_header_extensions() = 0;
+ virtual RtpCapabilities GetAudioCapabilities() = 0;
virtual const std::vector<VideoCodec>& video_codecs() = 0;
- virtual const std::vector<RtpHeaderExtension>&
- video_rtp_header_extensions() = 0;
+ virtual RtpCapabilities GetVideoCapabilities() = 0;
// Starts AEC dump using existing file.
virtual bool StartAecDump(rtc::PlatformFile file) = 0;
@@ -202,14 +204,14 @@ class CompositeMediaEngine : public MediaEngineInterface {
virtual const std::vector<AudioCodec>& audio_codecs() {
return voice_.codecs();
}
- virtual const std::vector<RtpHeaderExtension>& audio_rtp_header_extensions() {
- return voice_.rtp_header_extensions();
+ virtual RtpCapabilities GetAudioCapabilities() {
+ return voice_.GetCapabilities();
}
virtual const std::vector<VideoCodec>& video_codecs() {
return video_.codecs();
}
- virtual const std::vector<RtpHeaderExtension>& video_rtp_header_extensions() {
- return video_.rtp_header_extensions();
+ virtual RtpCapabilities GetVideoCapabilities() {
+ return video_.GetCapabilities();
}
virtual bool StartAecDump(rtc::PlatformFile file) {
« no previous file with comments | « talk/media/base/fakemediaengine.h ('k') | talk/media/webrtc/webrtcvideoengine2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698