mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
[libvpx] Update to v1.12.0
This commit is contained in:
@@ -23,7 +23,7 @@ namespace libvpx_test {
|
||||
class Y4mVideoSource : public VideoSource {
|
||||
public:
|
||||
Y4mVideoSource(const std::string &file_name, unsigned int start, int limit)
|
||||
: file_name_(file_name), input_file_(NULL), img_(new vpx_image_t()),
|
||||
: file_name_(file_name), input_file_(nullptr), img_(new vpx_image_t()),
|
||||
start_(start), limit_(limit), frame_(0), framerate_numerator_(0),
|
||||
framerate_denominator_(0), y4m_() {}
|
||||
|
||||
@@ -35,13 +35,13 @@ class Y4mVideoSource : public VideoSource {
|
||||
virtual void OpenSource() {
|
||||
CloseSource();
|
||||
input_file_ = OpenTestDataFile(file_name_);
|
||||
ASSERT_TRUE(input_file_ != NULL)
|
||||
ASSERT_NE(input_file_, nullptr)
|
||||
<< "Input file open failed. Filename: " << file_name_;
|
||||
}
|
||||
|
||||
virtual void ReadSourceToStart() {
|
||||
ASSERT_TRUE(input_file_ != NULL);
|
||||
ASSERT_FALSE(y4m_input_open(&y4m_, input_file_, NULL, 0, 0));
|
||||
ASSERT_NE(input_file_, nullptr);
|
||||
ASSERT_FALSE(y4m_input_open(&y4m_, input_file_, nullptr, 0, 0));
|
||||
framerate_numerator_ = y4m_.fps_n;
|
||||
framerate_denominator_ = y4m_.fps_d;
|
||||
frame_ = 0;
|
||||
@@ -62,7 +62,7 @@ class Y4mVideoSource : public VideoSource {
|
||||
}
|
||||
|
||||
virtual vpx_image_t *img() const {
|
||||
return (frame_ < limit_) ? img_.get() : NULL;
|
||||
return (frame_ < limit_) ? img_.get() : nullptr;
|
||||
}
|
||||
|
||||
// Models a stream where Timebase = 1/FPS, so pts == frame.
|
||||
@@ -80,7 +80,7 @@ class Y4mVideoSource : public VideoSource {
|
||||
virtual unsigned int limit() const { return limit_; }
|
||||
|
||||
virtual void FillFrame() {
|
||||
ASSERT_TRUE(input_file_ != NULL);
|
||||
ASSERT_NE(input_file_, nullptr);
|
||||
// Read a frame from input_file.
|
||||
y4m_input_fetch_frame(&y4m_, input_file_, img_.get());
|
||||
}
|
||||
@@ -101,9 +101,9 @@ class Y4mVideoSource : public VideoSource {
|
||||
void CloseSource() {
|
||||
y4m_input_close(&y4m_);
|
||||
y4m_ = y4m_input();
|
||||
if (input_file_ != NULL) {
|
||||
if (input_file_ != nullptr) {
|
||||
fclose(input_file_);
|
||||
input_file_ = NULL;
|
||||
input_file_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user