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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/temporal_layers.h

Issue 2849723002: Extract TL config to VP8 libvpx flag conversion. (Closed)
Patch Set: rebase return type Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 1 /* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
2 * 2 *
3 * Use of this source code is governed by a BSD-style license 3 * Use of this source code is governed by a BSD-style license
4 * that can be found in the LICENSE file in the root of the source 4 * that can be found in the LICENSE file in the root of the source
5 * tree. An additional intellectual property rights grant can be found 5 * tree. An additional intellectual property rights grant can be found
6 * in the file PATENTS. All contributing project authors may 6 * in the file PATENTS. All contributing project authors may
7 * be found in the AUTHORS file in the root of the source tree. 7 * be found in the AUTHORS file in the root of the source tree.
8 */ 8 */
9 /* 9 /*
10 * This file defines the interface for doing temporal layers with VP8. 10 * This file defines the interface for doing temporal layers with VP8.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 class TemporalLayers { 64 class TemporalLayers {
65 public: 65 public:
66 // Factory for TemporalLayer strategy. Default behavior is a fixed pattern 66 // Factory for TemporalLayer strategy. Default behavior is a fixed pattern
67 // of temporal layers. See default_temporal_layers.cc 67 // of temporal layers. See default_temporal_layers.cc
68 virtual ~TemporalLayers() {} 68 virtual ~TemporalLayers() {}
69 69
70 // Returns the recommended VP8 encode flags needed. May refresh the decoder 70 // Returns the recommended VP8 encode flags needed. May refresh the decoder
71 // and/or update the reference buffers. 71 // and/or update the reference buffers.
72 virtual TemporalReferences UpdateLayerConfig(uint32_t timestamp) = 0; 72 virtual TemporalReferences UpdateLayerConfig(uint32_t timestamp) = 0;
73 73
74 int EncodeFlags(uint32_t timestamp);
75
76 // Update state based on new bitrate target and incoming framerate. 74 // Update state based on new bitrate target and incoming framerate.
77 // Returns the bitrate allocation for the active temporal layers. 75 // Returns the bitrate allocation for the active temporal layers.
78 virtual std::vector<uint32_t> OnRatesUpdated(int bitrate_kbps, 76 virtual std::vector<uint32_t> OnRatesUpdated(int bitrate_kbps,
79 int max_bitrate_kbps, 77 int max_bitrate_kbps,
80 int framerate) = 0; 78 int framerate) = 0;
81 79
82 // Update the encoder configuration with target bitrates or other parameters. 80 // Update the encoder configuration with target bitrates or other parameters.
83 // Returns true iff the configuration was actually modified. 81 // Returns true iff the configuration was actually modified.
84 virtual bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) = 0; 82 virtual bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) = 0;
85 83
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 public: 118 public:
121 TemporalLayersListener() {} 119 TemporalLayersListener() {}
122 virtual ~TemporalLayersListener() {} 120 virtual ~TemporalLayersListener() {}
123 121
124 virtual void OnTemporalLayersCreated(int simulcast_id, 122 virtual void OnTemporalLayersCreated(int simulcast_id,
125 TemporalLayers* layers) = 0; 123 TemporalLayers* layers) = 0;
126 }; 124 };
127 125
128 } // namespace webrtc 126 } // namespace webrtc
129 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_ 127 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_TEMPORAL_LAYERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698