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

Unified Diff: webrtc/common_types.h

Issue 2489843002: Revert of Extract bitrate allocation of spatial/temporal layers out of codec impl. (Closed)
Patch Set: Created 4 years, 1 month 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 | « webrtc/api/android/jni/androidmediaencoder_jni.cc ('k') | webrtc/common_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_types.h
diff --git a/webrtc/common_types.h b/webrtc/common_types.h
index bf90afa96432afa16f170c3d4c6e3e8d16ecc9f2..24ba00a8450e4e9869c544f772c774105af0100c 100644
--- a/webrtc/common_types.h
+++ b/webrtc/common_types.h
@@ -18,7 +18,6 @@
#include <string>
#include <vector>
-#include "webrtc/base/optional.h"
#include "webrtc/common_video/rotation.h"
#include "webrtc/typedefs.h"
@@ -523,7 +522,7 @@
bool automaticResizeOn;
bool frameDroppingOn;
int keyFrameInterval;
- TemporalLayersFactory* tl_factory;
+ const TemporalLayersFactory* tl_factory;
};
// VP9 specific.
@@ -564,10 +563,6 @@
kVideoCodecUnknown
};
-// Translates from name of codec to codec type and vice versa.
-rtc::Optional<std::string> CodecTypeToPayloadName(VideoCodecType type);
-rtc::Optional<VideoCodecType> PayloadNameToCodecType(const std::string& name);
-
union VideoCodecUnion {
VideoCodecVP8 VP8;
VideoCodecVP9 VP9;
@@ -642,35 +637,6 @@
// TODO(hta): Consider replacing the union with a pointer type.
// This will allow removing the VideoCodec* types from this file.
VideoCodecUnion codecSpecific;
-};
-
-class BitrateAllocation {
- public:
- static const size_t kMaxBitrateBps;
- BitrateAllocation();
-
- bool SetBitrate(size_t spatial_index,
- size_t temporal_index,
- uint32_t bitrate_bps);
-
- uint32_t GetBitrate(size_t spatial_index, size_t temporal_index) const;
-
- // Get the sum of all the temporal layer for a specific spatial layer.
- uint32_t GetSpatialLayerSum(size_t spatial_index) const;
-
- uint32_t get_sum_bps() const { return sum_; } // Sum of all bitrates.
- uint32_t get_sum_kbps() const { return (sum_ + 500) / 1000; }
-
- inline bool operator==(const BitrateAllocation& other) const {
- return memcmp(bitrates_, other.bitrates_, sizeof(bitrates_)) == 0;
- }
- inline bool operator!=(const BitrateAllocation& other) const {
- return !(*this == other);
- }
-
- private:
- uint32_t sum_;
- uint32_t bitrates_[kMaxSpatialLayers][kMaxTemporalStreams];
};
// Bandwidth over-use detector options. These are used to drive
« no previous file with comments | « webrtc/api/android/jni/androidmediaencoder_jni.cc ('k') | webrtc/common_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698