Remove VideoSendStreamInput::PutFrame.

PutFrame just copies the frame before swapping it, if it's required that
can easily be done outside this API before swapping the frame.

BUG=
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6229 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2014-05-23 09:41:45 +00:00
parent 6e98ef4b35
commit f3085e43ab
4 changed files with 2 additions and 21 deletions

View File

@ -125,10 +125,6 @@ class VideoAnalyzer : public PacketReceiver,
return receiver_->DeliverPacket(packet, length);
}
virtual void PutFrame(const I420VideoFrame& video_frame) OVERRIDE {
ADD_FAILURE() << "PutFrame() should not have been called in this test.";
}
virtual void SwapFrame(I420VideoFrame* video_frame) OVERRIDE {
I420VideoFrame* copy = NULL;
{

View File

@ -280,24 +280,12 @@ VideoSendStream::~VideoSendStream() {
rtp_rtcp_->Release();
}
void VideoSendStream::PutFrame(const I420VideoFrame& frame) {
input_frame_.CopyFrame(frame);
SwapFrame(&input_frame_);
}
void VideoSendStream::SwapFrame(I420VideoFrame* frame) {
// TODO(pbos): Warn if frame is "too far" into the future, or too old. This
// would help detect if frame's being used without NTP.
// TO REVIEWER: Is there any good check for this? Should it be
// skipped?
if (frame != &input_frame_)
input_frame_.SwapFrame(frame);
// TODO(pbos): Local rendering should not be done on the capture thread.
if (config_.local_renderer != NULL)
config_.local_renderer->RenderFrame(input_frame_, 0);
config_.local_renderer->RenderFrame(*frame, 0);
external_capture_->SwapFrame(&input_frame_);
external_capture_->SwapFrame(frame);
}
VideoSendStreamInput* VideoSendStream::Input() { return this; }

View File

@ -57,7 +57,6 @@ class VideoSendStream : public webrtc::VideoSendStream,
bool DeliverRtcp(const uint8_t* packet, size_t length);
// From VideoSendStreamInput.
virtual void PutFrame(const I420VideoFrame& frame) OVERRIDE;
virtual void SwapFrame(I420VideoFrame* frame) OVERRIDE;
// From webrtc::VideoSendStream.
@ -69,7 +68,6 @@ class VideoSendStream : public webrtc::VideoSendStream,
virtual std::string GetCName() OVERRIDE;
private:
I420VideoFrame input_frame_;
TransportAdapter transport_adapter_;
EncodedFrameCallbackAdapter encoded_frame_proxy_;
scoped_ptr<CriticalSectionWrapper> codec_lock_;

View File

@ -29,7 +29,6 @@ class VideoSendStreamInput {
// These methods do not lock internally and must be called sequentially.
// If your application switches input sources synchronization must be done
// externally to make sure that any old frames are not delivered concurrently.
virtual void PutFrame(const I420VideoFrame& video_frame) = 0;
virtual void SwapFrame(I420VideoFrame* video_frame) = 0;
protected: