Revert "Changed argument occurences of const I420VideoFrame* to const I420VideoFrame& and non-const I420VideoFrame& to I420VideoFrame*."

This reverts commit r8731.

Reason for revert: Breakes Chromium FYI bots.

TBR=hbos, tommi

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

Cr-Commit-Position: refs/heads/master@{#8733}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8733 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
magjed@webrtc.org
2015-03-16 13:46:52 +00:00
parent 93d9d6503e
commit 2056ee3e3c
72 changed files with 290 additions and 275 deletions

View File

@@ -657,11 +657,11 @@ bool MediaCodecVideoDecoder::DeliverPendingOutputs(
I420VideoFrame texture_image(
&native_handle_, width, height, output_timestamp_, 0);
texture_image.set_ntp_time_ms(output_ntp_time_ms_);
callback_status = callback_->Decoded(&texture_image);
callback_status = callback_->Decoded(texture_image);
} else {
decoded_image_.set_timestamp(output_timestamp_);
decoded_image_.set_ntp_time_ms(output_ntp_time_ms_);
callback_status = callback_->Decoded(&decoded_image_);
callback_status = callback_->Decoded(decoded_image_);
}
if (callback_status > 0) {
ALOGE("callback error");

View File

@@ -115,7 +115,7 @@ class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule {
return false;
}
if (callback_) {
callback_->OnIncomingCapturedFrame(id_, &sample);
callback_->OnIncomingCapturedFrame(id_, sample);
}
return true;
}

View File

@@ -44,7 +44,7 @@ class PassthroughStream: public webrtc::VideoRenderCallback {
virtual ~PassthroughStream() {
}
virtual int32_t RenderFrame(const uint32_t stream_id,
webrtc::I420VideoFrame* videoFrame) {
webrtc::I420VideoFrame& videoFrame) {
rtc::CritScope cs(&stream_critical_);
// Send frame for rendering directly
if (running_ && renderer_) {

View File

@@ -44,7 +44,7 @@ class WebRtcPassthroughRenderTest : public testing::Test {
}
virtual int32_t RenderFrame(const uint32_t stream_id,
webrtc::I420VideoFrame* videoFrame) {
webrtc::I420VideoFrame& videoFrame) {
++frame_num_;
LOG(INFO) << "RenderFrame stream_id: " << stream_id
<< " frame_num: " << frame_num_;
@@ -143,21 +143,21 @@ TEST_F(WebRtcPassthroughRenderTest, Renderer) {
int test_frame_num = 10;
// RenderFrame without starting the render
for (int i = 0; i < test_frame_num; ++i) {
stream1->RenderFrame(stream_id1, &frame);
stream1->RenderFrame(stream_id1, frame);
}
EXPECT_EQ(0, renderer1.frame_num());
// Start the render and test again.
EXPECT_FALSE(StartRender(stream_id3));
EXPECT_TRUE(StartRender(stream_id1));
for (int i = 0; i < test_frame_num; ++i) {
stream1->RenderFrame(stream_id1, &frame);
stream1->RenderFrame(stream_id1, frame);
}
EXPECT_EQ(test_frame_num, renderer1.frame_num());
// Stop the render and test again.
EXPECT_FALSE(StopRender(stream_id3));
EXPECT_TRUE(StopRender(stream_id1));
for (int i = 0; i < test_frame_num; ++i) {
stream1->RenderFrame(stream_id1, &frame);
stream1->RenderFrame(stream_id1, frame);
}
// The frame number should not have changed.
EXPECT_EQ(test_frame_num, renderer1.frame_num());
@@ -166,7 +166,7 @@ TEST_F(WebRtcPassthroughRenderTest, Renderer) {
EXPECT_TRUE(StartRender(stream_id2));
test_frame_num = 30;
for (int i = 0; i < test_frame_num; ++i) {
stream2->RenderFrame(stream_id2, &frame);
stream2->RenderFrame(stream_id2, frame);
}
EXPECT_EQ(test_frame_num, renderer2.frame_num());
}

View File

@@ -354,7 +354,7 @@ bool WebRtcVideoCapturer::GetPreferredFourccs(
}
void WebRtcVideoCapturer::OnIncomingCapturedFrame(const int32_t id,
webrtc::I420VideoFrame* sample) {
webrtc::I420VideoFrame& sample) {
// This would be a normal CritScope, except that it's possible that:
// (1) whatever system component producing this frame has taken a lock, and
// (2) Stop() probably calls back into that system component, which may take
@@ -371,12 +371,12 @@ void WebRtcVideoCapturer::OnIncomingCapturedFrame(const int32_t id,
// Log the size and pixel aspect ratio of the first captured frame.
if (1 == captured_frames_) {
LOG(LS_INFO) << "Captured frame size "
<< sample->width() << "x" << sample->height()
<< sample.width() << "x" << sample.height()
<< ". Expected format " << GetCaptureFormat()->ToString();
}
if (start_thread_->IsCurrent()) {
SignalFrameCapturedOnStartThread(sample);
SignalFrameCapturedOnStartThread(&sample);
} else {
// This currently happens on with at least VideoCaptureModuleV4L2 and
// possibly other implementations of WebRTC's VideoCaptureModule.
@@ -385,7 +385,7 @@ void WebRtcVideoCapturer::OnIncomingCapturedFrame(const int32_t id,
// thread hop.
start_thread_->Invoke<void>(
rtc::Bind(&WebRtcVideoCapturer::SignalFrameCapturedOnStartThread,
this, sample));
this, &sample));
}
}

View File

@@ -81,7 +81,7 @@ class WebRtcVideoCapturer : public VideoCapturer,
private:
// Callback when a frame is captured by camera.
virtual void OnIncomingCapturedFrame(const int32_t id,
webrtc::I420VideoFrame* frame);
webrtc::I420VideoFrame& frame);
virtual void OnCaptureDelayChanged(const int32_t id,
const int32_t delay);