Base screenshare layers on TemporalReferences.

Decouples encode flags and calculates them the same for both default and
screencast temporal layers.

With this change encoders could start using TemporalReferences for
temporal-layers flags, but they can not be used by asynchronous encoders
(hardware encoders) yet.

Also removes 'timestamp' as a dead parameter to FrameEncoded().

BUG=chromium:702017, webrtc:7349
R=marpan@google.com, sprang@webrtc.org, marpan@webrtc.org

Review-Url: https://codereview.webrtc.org/2769263002 .
Cr-Commit-Position: refs/heads/master@{#17397}
This commit is contained in:
Peter Boström
2017-03-27 15:01:49 -04:00
parent d8cfa1af38
commit 1436c83cd1
8 changed files with 166 additions and 161 deletions

View File

@ -29,12 +29,12 @@ constexpr uint32_t kFramerateFps = 5;
class MockTemporalLayers : public TemporalLayers {
public:
MOCK_METHOD1(EncodeFlags, int(uint32_t));
MOCK_METHOD1(UpdateLayerConfig, TemporalReferences(uint32_t));
MOCK_METHOD3(OnRatesUpdated, std::vector<uint32_t>(int, int, int));
MOCK_METHOD1(UpdateConfiguration, bool(vpx_codec_enc_cfg_t*));
MOCK_METHOD3(PopulateCodecSpecific,
void(bool, CodecSpecificInfoVP8*, uint32_t));
MOCK_METHOD3(FrameEncoded, void(unsigned int, uint32_t, int));
MOCK_METHOD2(FrameEncoded, void(unsigned int, int));
MOCK_CONST_METHOD0(CurrentLayerId, int());
};
} // namespace