mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 20:47:06 +00:00
[libvpx] Update to v1.12.0
This commit is contained in:
1 parent
287a71dc66
commit
b5046d2a76
572 files changed
+52900
-29493
No files matched your search
@@ -29,8 +29,9 @@ static unsigned int MemGetLe32(const uint8_t *mem) {
|
||||
class IVFVideoSource : public CompressedVideoSource {
|
||||
public:
|
||||
explicit IVFVideoSource(const std::string &file_name)
|
||||
: file_name_(file_name), input_file_(NULL), compressed_frame_buf_(NULL),
|
||||
frame_sz_(0), frame_(0), end_of_file_(false) {}
|
||||
: file_name_(file_name), input_file_(nullptr),
|
||||
compressed_frame_buf_(nullptr), frame_sz_(0), frame_(0),
|
||||
end_of_file_(false) {}
|
||||
|
||||
virtual ~IVFVideoSource() {
|
||||
delete[] compressed_frame_buf_;
|
||||
@@ -41,13 +42,12 @@ class IVFVideoSource : public CompressedVideoSource {
|
||||
virtual void Init() {
|
||||
// Allocate a buffer for read in the compressed video frame.
|
||||
compressed_frame_buf_ = new uint8_t[libvpx_test::kCodeBufferSize];
|
||||
ASSERT_TRUE(compressed_frame_buf_ != NULL)
|
||||
<< "Allocate frame buffer failed";
|
||||
ASSERT_NE(compressed_frame_buf_, nullptr) << "Allocate frame buffer failed";
|
||||
}
|
||||
|
||||
virtual void Begin() {
|
||||
input_file_ = OpenTestDataFile(file_name_);
|
||||
ASSERT_TRUE(input_file_ != NULL)
|
||||
ASSERT_NE(input_file_, nullptr)
|
||||
<< "Input file open failed. Filename: " << file_name_;
|
||||
|
||||
// Read file header
|
||||
@@ -68,7 +68,7 @@ class IVFVideoSource : public CompressedVideoSource {
|
||||
}
|
||||
|
||||
void FillFrame() {
|
||||
ASSERT_TRUE(input_file_ != NULL);
|
||||
ASSERT_NE(input_file_, nullptr);
|
||||
uint8_t frame_hdr[kIvfFrameHdrSize];
|
||||
// Check frame header and read a frame from input_file.
|
||||
if (fread(frame_hdr, 1, kIvfFrameHdrSize, input_file_) !=
|
||||
@@ -87,7 +87,7 @@ class IVFVideoSource : public CompressedVideoSource {
|
||||
}
|
||||
|
||||
virtual const uint8_t *cxdata() const {
|
||||
return end_of_file_ ? NULL : compressed_frame_buf_;
|
||||
return end_of_file_ ? nullptr : compressed_frame_buf_;
|
||||
}
|
||||
virtual size_t frame_size() const { return frame_sz_; }
|
||||
virtual unsigned int frame_number() const { return frame_; }
|
||||
|
||||
Reference in new issue
Block a user