mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Make VideoEncoder::GetEncoderInfo() pure virtual
Bug: webrtc:9722 Change-Id: I831a9c460425be86e5da2761769b8eecf231462f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293386 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Wan-Teh Chang <wtc@google.com> Cr-Commit-Position: refs/heads/main@{#39319}
This commit is contained in:
parent
2e540a28c0
commit
bd86684bf3
5 changed files with 9 additions and 6 deletions
|
@ -329,9 +329,4 @@ void VideoEncoder::OnRttUpdate(int64_t rtt_ms) {}
|
|||
void VideoEncoder::OnLossNotification(
|
||||
const LossNotification& loss_notification) {}
|
||||
|
||||
// TODO(webrtc:9722): Remove and make pure virtual.
|
||||
VideoEncoder::EncoderInfo VideoEncoder::GetEncoderInfo() const {
|
||||
return EncoderInfo();
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
|
|
@ -420,7 +420,7 @@ class RTC_EXPORT VideoEncoder {
|
|||
// The output of this method may change during runtime. For instance if a
|
||||
// hardware encoder fails, it may fall back to doing software encoding using
|
||||
// an implementation with different characteristics.
|
||||
virtual EncoderInfo GetEncoderInfo() const;
|
||||
virtual EncoderInfo GetEncoderInfo() const = 0;
|
||||
};
|
||||
} // namespace webrtc
|
||||
#endif // API_VIDEO_CODECS_VIDEO_ENCODER_H_
|
||||
|
|
|
@ -77,6 +77,10 @@ int32_t ConfigurableFrameSizeEncoder::Release() {
|
|||
void ConfigurableFrameSizeEncoder::SetRates(
|
||||
const RateControlParameters& parameters) {}
|
||||
|
||||
VideoEncoder::EncoderInfo ConfigurableFrameSizeEncoder::GetEncoderInfo() const {
|
||||
return EncoderInfo();
|
||||
}
|
||||
|
||||
int32_t ConfigurableFrameSizeEncoder::SetFrameSize(size_t size) {
|
||||
current_frame_size_ = size;
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
|
|
|
@ -49,6 +49,8 @@ class ConfigurableFrameSizeEncoder : public VideoEncoder {
|
|||
|
||||
void SetRates(const RateControlParameters& parameters) override;
|
||||
|
||||
EncoderInfo GetEncoderInfo() const override;
|
||||
|
||||
int32_t SetFrameSize(size_t size);
|
||||
|
||||
void SetCodecType(VideoCodecType codec_type_);
|
||||
|
|
|
@ -2280,6 +2280,8 @@ TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
|
|||
EXPECT_TRUE(IsReadyForEncode());
|
||||
}
|
||||
|
||||
EncoderInfo GetEncoderInfo() const override { return EncoderInfo(); }
|
||||
|
||||
void OnVideoStreamsCreated(VideoSendStream* send_stream,
|
||||
const std::vector<VideoReceiveStreamInterface*>&
|
||||
receive_streams) override {
|
||||
|
|
Loading…
Reference in a new issue