Add SwapFrame() to VideoSendStreamInput.

Optionally prevents doing a frame copy when putting frames into a
VideoSendStream. PutFrame() is still there, which copies the frame.

Also removes time_since_capture_ms as a parameter, since
I420VideoFrame::render_time_ms() denotes when the frame was captured.

BUG=2657
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5265 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2013-12-11 16:26:16 +00:00
parent 4c3faa9d73
commit 724947b8ef
21 changed files with 199 additions and 164 deletions

View File

@ -12,7 +12,6 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/common.h"
#include "webrtc/common_video/test/frame_generator.h"
#include "webrtc/modules/video_coding/codecs/interface/mock/mock_video_codec_interface.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
@ -22,6 +21,7 @@
#include "webrtc/modules/video_coding/main/test/test_util.h"
#include "webrtc/system_wrappers/interface/clock.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/test/frame_generator.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/test/testsupport/gtest_disable.h"
@ -70,7 +70,7 @@ MATCHER_P(MatchesVp8StreamInfo, expected, "") {
class EmptyFrameGenerator : public FrameGenerator {
public:
virtual I420VideoFrame& NextFrame() OVERRIDE { return frame_; }
I420VideoFrame* NextFrame() OVERRIDE { frame_.ResetSize(); return &frame_; }
private:
I420VideoFrame frame_;
@ -180,7 +180,7 @@ class TestVideoSender : public ::testing::Test {
void AddFrame() {
assert(generator_.get());
sender_->AddVideoFrame(generator_->NextFrame(), NULL, NULL);
sender_->AddVideoFrame(*generator_->NextFrame(), NULL, NULL);
}
SimulatedClock clock_;