Rename I420VideoFrame to VideoFrame.

This is a mechanical change since it affects so many
files.
I420VideoFrame -> VideoFrame
and reformatted.

Rationale: in the next CL I420VideoFrame will
get an indication of Pixel Format (I420 for
starters) and of storage type: usually
UNOWNED, could be SHMEM, and in the near
future will be possibly TEXTURE. See
https://codereview.chromium.org/1154153003
for the change that happened in Cr.

BUG=4730, chromium:440843
R=jiayl@webrtc.org, niklas.enbom@webrtc.org, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/52629004

Cr-Commit-Position: refs/heads/master@{#9339}
This commit is contained in:
Miguel Casas-Sanchez
2015-05-29 17:21:40 -07:00
parent c2cb266c93
commit 4765070b8d
158 changed files with 639 additions and 699 deletions

View File

@ -46,8 +46,7 @@ VCMReceiveCallback* VCMDecodedFrameCallback::UserReceiveCallback()
return _receiveCallback;
}
int32_t VCMDecodedFrameCallback::Decoded(I420VideoFrame& decodedImage)
{
int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage) {
// TODO(holmer): We should improve this so that we can handle multiple
// callbacks from one call to Decode().
VCMFrameInformation* frameInfo;

View File

@ -40,7 +40,7 @@ public:
void SetUserReceiveCallback(VCMReceiveCallback* receiveCallback);
VCMReceiveCallback* UserReceiveCallback();
virtual int32_t Decoded(I420VideoFrame& decodedImage);
virtual int32_t Decoded(VideoFrame& decodedImage);
virtual int32_t ReceivedDecodedReferenceFrame(const uint64_t pictureId);
virtual int32_t ReceivedDecodedFrame(const uint64_t pictureId);

View File

@ -98,10 +98,9 @@ VCMGenericEncoder::InitEncode(const VideoCodec* settings,
return 0;
}
int32_t
VCMGenericEncoder::Encode(const I420VideoFrame& inputFrame,
const CodecSpecificInfo* codecSpecificInfo,
const std::vector<FrameType>& frameTypes) {
int32_t VCMGenericEncoder::Encode(const VideoFrame& inputFrame,
const CodecSpecificInfo* codecSpecificInfo,
const std::vector<FrameType>& frameTypes) {
std::vector<VideoFrameType> video_frame_types(frameTypes.size(),
kDeltaFrame);
VCMEncodedFrame::ConvertFrameTypes(frameTypes, &video_frame_types);
@ -176,7 +175,7 @@ VCMGenericEncoder::SetPeriodicKeyFrames(bool enable)
int32_t VCMGenericEncoder::RequestFrame(
const std::vector<FrameType>& frame_types) {
I420VideoFrame image;
VideoFrame image;
std::vector<VideoFrameType> video_frame_types(frame_types.size(),
kDeltaFrame);
VCMEncodedFrame::ConvertFrameTypes(frame_types, &video_frame_types);

View File

@ -99,7 +99,7 @@ public:
* cameraFrameRate : Request or information from the remote side
* frameType : The requested frame type to encode
*/
int32_t Encode(const I420VideoFrame& inputFrame,
int32_t Encode(const VideoFrame& inputFrame,
const CodecSpecificInfo* codecSpecificInfo,
const std::vector<FrameType>& frameTypes);
/**

View File

@ -172,7 +172,7 @@ class VideoCodingModuleImpl : public VideoCodingModule {
return receiver_->SetVideoProtection(videoProtection, enable);
}
int32_t AddVideoFrame(const I420VideoFrame& videoFrame,
int32_t AddVideoFrame(const VideoFrame& videoFrame,
const VideoContentMetrics* contentMetrics,
const CodecSpecificInfo* codecSpecificInfo) override {
return sender_->AddVideoFrame(

View File

@ -99,7 +99,7 @@ class VideoSender {
int32_t RegisterProtectionCallback(VCMProtectionCallback* protection);
void SetVideoProtection(bool enable, VCMVideoProtection videoProtection);
int32_t AddVideoFrame(const I420VideoFrame& videoFrame,
int32_t AddVideoFrame(const VideoFrame& videoFrame,
const VideoContentMetrics* _contentMetrics,
const CodecSpecificInfo* codecSpecificInfo);

View File

@ -297,7 +297,7 @@ void VideoSender::SetVideoProtection(bool enable,
}
}
// Add one raw video frame to the encoder, blocking.
int32_t VideoSender::AddVideoFrame(const I420VideoFrame& videoFrame,
int32_t VideoSender::AddVideoFrame(const VideoFrame& videoFrame,
const VideoContentMetrics* contentMetrics,
const CodecSpecificInfo* codecSpecificInfo) {
CriticalSectionScoped cs(_sendCritSect);

View File

@ -71,8 +71,8 @@ MATCHER_P(MatchesVp8StreamInfo, expected, "") {
class EmptyFrameGenerator : public FrameGenerator {
public:
EmptyFrameGenerator(int width, int height) : width_(width), height_(height) {}
I420VideoFrame* NextFrame() override {
frame_.reset(new I420VideoFrame());
VideoFrame* NextFrame() override {
frame_.reset(new VideoFrame());
frame_->CreateEmptyFrame(width_, height_, width_, (width_ + 1) / 2,
(width_ + 1) / 2);
return frame_.get();
@ -81,7 +81,7 @@ class EmptyFrameGenerator : public FrameGenerator {
private:
const int width_;
const int height_;
rtc::scoped_ptr<I420VideoFrame> frame_;
rtc::scoped_ptr<VideoFrame> frame_;
};
class PacketizationCallback : public VCMPacketizationCallback {