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

Unified Diff: webrtc/common_video/include/video_bitrate_allocator.h

Issue 2434073003: Extract bitrate allocation of spatial/temporal layers out of codec impl. (Closed)
Patch Set: Fixed sign mismatch Created 4 years, 2 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/common_video/include/video_bitrate_allocator.h
diff --git a/webrtc/modules/audio_coding/codecs/audio_format_conversion.h b/webrtc/common_video/include/video_bitrate_allocator.h
similarity index 50%
copy from webrtc/modules/audio_coding/codecs/audio_format_conversion.h
copy to webrtc/common_video/include/video_bitrate_allocator.h
index ff71282f7e2e42c8bb27a4cd23316fab15e41ff9..f8157a2afd788b6f3eea163eb39e1d036c880015 100644
--- a/webrtc/modules/audio_coding/codecs/audio_format_conversion.h
+++ b/webrtc/common_video/include/video_bitrate_allocator.h
@@ -8,16 +8,23 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_CONVERSION_H_
-#define WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_CONVERSION_H_
+#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_BITRATE_ALLOCATOR_H_
+#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_BITRATE_ALLOCATOR_H_
#include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/codecs/audio_format.h"
namespace webrtc {
-SdpAudioFormat CodecInstToSdp(const CodecInst& codec_inst);
+class VideoBitrateAllocator {
+ public:
+ VideoBitrateAllocator() {}
+ virtual ~VideoBitrateAllocator() {}
+
+ virtual BitrateAllocation GetAllocation(uint32_t total_bitrate,
+ uint32_t framerate) = 0;
+ virtual uint32_t GetPreferedBitrate(int frame_rate) = 0;
+};
} // namespace webrtc
-#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_FORMAT_CONVERSION_H_
+#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_BITRATE_ALLOCATOR_H_

Powered by Google App Engine
This is Rietveld 408576698