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

Unified Diff: webrtc/call/config.h

Issue 3004723002: Move RtpExtension to api/ directory and config.h/.cc to call/. (Closed)
Patch Set: Fix mistake Created 3 years, 4 months 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
Index: webrtc/call/config.h
diff --git a/webrtc/config.h b/webrtc/call/config.h
similarity index 66%
rename from webrtc/config.h
rename to webrtc/call/config.h
index 962e0f2fb9ac844ff243c0425c1b9df4dca76a4d..9845ffa7827b8a34040b91d0ff3549d847022760 100644
--- a/webrtc/config.h
+++ b/webrtc/call/config.h
@@ -10,8 +10,8 @@
// TODO(pbos): Move Config from common.h to here.
the sun 2017/08/28 18:52:56 obsolete comment
stefan-webrtc 2017/08/29 08:37:17 I don't know if it's obsolete to be honest, not cl
the sun 2017/08/28 18:52:56 Add another comment here, or file an issue, that t
stefan-webrtc 2017/08/29 08:37:17 I had to split them already because of dependency
-#ifndef WEBRTC_CONFIG_H_
-#define WEBRTC_CONFIG_H_
+#ifndef WEBRTC_CALL_CONFIG_H_
+#define WEBRTC_CALL_CONFIG_H_
#include <string>
#include <vector>
@@ -56,83 +56,6 @@ struct UlpfecConfig {
int red_rtx_payload_type;
};
-// RTP header extension, see RFC 5285.
-struct RtpExtension {
- RtpExtension() {}
- RtpExtension(const std::string& uri, int id) : uri(uri), id(id) {}
- RtpExtension(const std::string& uri, int id, bool encrypt) : uri(uri),
- id(id), encrypt(encrypt) {}
- std::string ToString() const;
- bool operator==(const RtpExtension& rhs) const {
- return uri == rhs.uri && id == rhs.id && encrypt == rhs.encrypt;
- }
- static bool IsSupportedForAudio(const std::string& uri);
- static bool IsSupportedForVideo(const std::string& uri);
- // Return "true" if the given RTP header extension URI may be encrypted.
- static bool IsEncryptionSupported(const std::string& uri);
-
- // Returns the named header extension if found among all extensions,
- // nullptr otherwise.
- static const RtpExtension* FindHeaderExtensionByUri(
- const std::vector<RtpExtension>& extensions,
- const std::string& uri);
-
- // Return a list of RTP header extensions with the non-encrypted extensions
- // removed if both the encrypted and non-encrypted extension is present for
- // the same URI.
- static std::vector<RtpExtension> FilterDuplicateNonEncrypted(
- const std::vector<RtpExtension>& extensions);
-
- // Header extension for audio levels, as defined in:
- // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03
- static const char kAudioLevelUri[];
- static const int kAudioLevelDefaultId;
-
- // Header extension for RTP timestamp offset, see RFC 5450 for details:
- // http://tools.ietf.org/html/rfc5450
- static const char kTimestampOffsetUri[];
- static const int kTimestampOffsetDefaultId;
-
- // Header extension for absolute send time, see url for details:
- // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
- static const char kAbsSendTimeUri[];
- static const int kAbsSendTimeDefaultId;
-
- // Header extension for coordination of video orientation, see url for
- // details:
- // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ts_126114v120700p.pdf
- static const char kVideoRotationUri[];
- static const int kVideoRotationDefaultId;
-
- // Header extension for video content type. E.g. default or screenshare.
- static const char kVideoContentTypeUri[];
- static const int kVideoContentTypeDefaultId;
-
- // Header extension for video timing.
- static const char kVideoTimingUri[];
- static const int kVideoTimingDefaultId;
-
- // Header extension for transport sequence number, see url for details:
- // http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions
- static const char kTransportSequenceNumberUri[];
- static const int kTransportSequenceNumberDefaultId;
-
- static const char kPlayoutDelayUri[];
- static const int kPlayoutDelayDefaultId;
-
- // Encryption of Header Extensions, see RFC 6904 for details:
- // https://tools.ietf.org/html/rfc6904
- static const char kEncryptHeaderExtensionsUri[];
-
- // Inclusive min and max IDs for one-byte header extensions, per RFC5285.
- static const int kMinId;
- static const int kMaxId;
-
- std::string uri;
- int id = 0;
- bool encrypt = false;
-};
-
struct VideoStream {
VideoStream();
~VideoStream();
@@ -177,6 +100,7 @@ class VideoEncoderConfig {
virtual void FillVideoCodecVp8(VideoCodecVP8* vp8_settings) const;
virtual void FillVideoCodecVp9(VideoCodecVP9* vp9_settings) const;
virtual void FillVideoCodecH264(VideoCodecH264* h264_settings) const;
+
private:
~EncoderSpecificSettings() override {}
friend class VideoEncoderConfig;
@@ -263,4 +187,4 @@ class VideoEncoderConfig {
} // namespace webrtc
-#endif // WEBRTC_CONFIG_H_
+#endif // WEBRTC_CALL_CONFIG_H_

Powered by Google App Engine
This is Rietveld 408576698