Introduce VideoFrame::id to keep track of frames inside application.

Also switch webrtc code from deprecated constructors to the builder API.

Change-Id: Ie325bf1e9b4ff1e413fef3431ced8ed9ff725107
Bug: webrtc:10138
Reviewed-on: https://webrtc-review.googlesource.com/c/114422
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26132}
This commit is contained in:
Artem Titov
2019-01-03 23:49:37 +01:00
committed by Commit Bot
parent 12cea05119
commit 1ebfb6aac7
47 changed files with 538 additions and 179 deletions

View File

@ -11,6 +11,7 @@
#include <memory>
#include <vector>
#include "absl/memory/memory.h"
#include "api/test/mock_video_encoder.h"
#include "api/video/i420_buffer.h"
#include "api/video_codecs/vp8_temporal_layers.h"
@ -76,8 +77,12 @@ class EmptyFrameGenerator : public FrameGenerator {
public:
EmptyFrameGenerator(int width, int height) : width_(width), height_(height) {}
VideoFrame* NextFrame() override {
frame_.reset(new VideoFrame(I420Buffer::Create(width_, height_),
webrtc::kVideoRotation_0, 0));
frame_ = absl::make_unique<VideoFrame>(
VideoFrame::Builder()
.set_video_frame_buffer(I420Buffer::Create(width_, height_))
.set_rotation(webrtc::kVideoRotation_0)
.set_timestamp_us(0)
.build());
return frame_.get();
}