Reland "Update internal SW codecs to return unique_ptrs"
This reverts commit 34c8e6bce8af0c31f2b0b31d691a6a931fa3cb7b. Reason for revert: Fix Android compilation Original change's description: > Revert "Update internal SW codecs to return unique_ptrs" > > This reverts commit 4fe6adc06a8524ac25f85260bfe392eb31dae6b4. > > Reason for revert: Breaks android compile. > > Original change's description: > > Update internal SW codecs to return unique_ptrs > > > > TBR=stefan@webrtc.org > > > > Bug: webrtc:7925 > > Change-Id: I84239b071a2608d928f09b06809090eec5eafb14 > > Reviewed-on: https://webrtc-review.googlesource.com/21165 > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Reviewed-by: Erik Språng <sprang@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#20650} > > TBR=magjed@webrtc.org,sprang@webrtc.org,stefan@webrtc.org > > Change-Id: If33c3a0ee0dfce63d105558a2897a472f0633306 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:7925 > Reviewed-on: https://webrtc-review.googlesource.com/22540 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#20652} TBR=magjed@webrtc.org,sprang@webrtc.org,stefan@webrtc.org Change-Id: Ic8551af4687e927c9b605060155abdd5bc6208b2 Bug: webrtc:7925 Reviewed-on: https://webrtc-review.googlesource.com/22541 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20655}
This commit is contained in:
committed by
Commit Bot
parent
fdb92012fb
commit
46a2765c56
@ -12,6 +12,8 @@
|
||||
#ifndef MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
|
||||
#define MODULES_VIDEO_CODING_CODECS_VP9_INCLUDE_VP9_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "modules/video_coding/include/video_codec_interface.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -19,7 +21,7 @@ namespace webrtc {
|
||||
class VP9Encoder : public VideoEncoder {
|
||||
public:
|
||||
static bool IsSupported();
|
||||
static VP9Encoder* Create();
|
||||
static std::unique_ptr<VP9Encoder> Create();
|
||||
|
||||
virtual ~VP9Encoder() {}
|
||||
};
|
||||
@ -27,7 +29,7 @@ class VP9Encoder : public VideoEncoder {
|
||||
class VP9Decoder : public VideoDecoder {
|
||||
public:
|
||||
static bool IsSupported();
|
||||
static VP9Decoder* Create();
|
||||
static std::unique_ptr<VP9Decoder> Create();
|
||||
|
||||
virtual ~VP9Decoder() {}
|
||||
};
|
||||
|
||||
@ -20,9 +20,13 @@ constexpr uint32_t kTimestampIncrementPerFrame = 3000;
|
||||
|
||||
class TestVp9Impl : public VideoCodecTest {
|
||||
protected:
|
||||
VideoEncoder* CreateEncoder() override { return VP9Encoder::Create(); }
|
||||
std::unique_ptr<VideoEncoder> CreateEncoder() override {
|
||||
return VP9Encoder::Create();
|
||||
}
|
||||
|
||||
VideoDecoder* CreateDecoder() override { return VP9Decoder::Create(); }
|
||||
std::unique_ptr<VideoDecoder> CreateDecoder() override {
|
||||
return VP9Decoder::Create();
|
||||
}
|
||||
|
||||
VideoCodec codec_settings() override {
|
||||
VideoCodec codec_settings;
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/keep_ref_until_done.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/ptr_util.h"
|
||||
#include "rtc_base/random.h"
|
||||
#include "rtc_base/timeutils.h"
|
||||
#include "rtc_base/trace_event.h"
|
||||
@ -52,8 +53,8 @@ bool VP9Encoder::IsSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
VP9Encoder* VP9Encoder::Create() {
|
||||
return new VP9EncoderImpl();
|
||||
std::unique_ptr<VP9Encoder> VP9Encoder::Create() {
|
||||
return rtc::MakeUnique<VP9EncoderImpl>();
|
||||
}
|
||||
|
||||
void VP9EncoderImpl::EncoderOutputCodedPacketCallback(vpx_codec_cx_pkt* pkt,
|
||||
@ -841,8 +842,8 @@ bool VP9Decoder::IsSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
VP9Decoder* VP9Decoder::Create() {
|
||||
return new VP9DecoderImpl();
|
||||
std::unique_ptr<VP9Decoder> VP9Decoder::Create() {
|
||||
return rtc::MakeUnique<VP9DecoderImpl>();
|
||||
}
|
||||
|
||||
VP9DecoderImpl::VP9DecoderImpl()
|
||||
|
||||
@ -22,7 +22,7 @@ bool VP9Encoder::IsSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
VP9Encoder* VP9Encoder::Create() {
|
||||
std::unique_ptr<VP9Encoder> VP9Encoder::Create() {
|
||||
RTC_NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
@ -31,7 +31,7 @@ bool VP9Decoder::IsSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
VP9Decoder* VP9Decoder::Create() {
|
||||
std::unique_ptr<VP9Decoder> VP9Decoder::Create() {
|
||||
RTC_NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user