Removing functionality for inserting pre-encoded frames instead of raw

video frames. The functionality hasn't been used for a long time and
should be done properly if used in the future.

This is a pre-step for implementing CPU overload control.

R=pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4194 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org
2013-06-07 13:57:57 +00:00
parent b69cc15467
commit 3ba883f0fc
9 changed files with 12 additions and 434 deletions

View File

@ -134,9 +134,6 @@ class VideoCaptureDataCallback
public:
virtual void OnIncomingCapturedFrame(const int32_t id,
I420VideoFrame& videoFrame) = 0;
virtual void OnIncomingCapturedEncodedFrame(const int32_t id,
VideoFrame& videoFrame,
VideoCodecType codecType) = 0;
virtual void OnCaptureDelayChanged(const int32_t id,
const int32_t delay) = 0;
protected:

View File

@ -225,41 +225,6 @@ int32_t VideoCaptureImpl::DeliverCapturedFrame(I420VideoFrame& captureFrame,
return 0;
}
int32_t VideoCaptureImpl::DeliverEncodedCapturedFrame(
VideoFrame& captureFrame, int64_t capture_time,
VideoCodecType codecType) {
UpdateFrameCount(); // frame count used for local frame rate callback.
const bool callOnCaptureDelayChanged = _setCaptureDelay != _captureDelay;
// Capture delay changed
if (_setCaptureDelay != _captureDelay) {
_setCaptureDelay = _captureDelay;
}
// Set the capture time
if (capture_time != 0) {
captureFrame.SetRenderTime(capture_time);
}
else {
captureFrame.SetRenderTime(TickTime::MillisecondTimestamp());
}
if (captureFrame.RenderTimeMs() == last_capture_time_) {
// We don't allow the same capture time for two frames, drop this one.
return -1;
}
last_capture_time_ = captureFrame.RenderTimeMs();
if (_dataCallBack) {
if (callOnCaptureDelayChanged) {
_dataCallBack->OnCaptureDelayChanged(_id, _captureDelay);
}
_dataCallBack->OnIncomingCapturedEncodedFrame(_id, captureFrame, codecType);
}
return 0;
}
int32_t VideoCaptureImpl::IncomingFrame(
uint8_t* videoFrame,
int32_t videoFrameLength,
@ -336,14 +301,8 @@ int32_t VideoCaptureImpl::IncomingFrame(
}
else // Encoded format
{
if (_capture_encoded_frame.CopyFrame(videoFrameLength, videoFrame) != 0)
{
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
"Failed to copy captured frame of length %d",
static_cast<int>(videoFrameLength));
}
DeliverEncodedCapturedFrame(_capture_encoded_frame, captureTime,
frameInfo.codecType);
assert(false);
return -1;
}
const uint32_t processTime =

View File

@ -101,9 +101,6 @@ protected:
virtual ~VideoCaptureImpl();
int32_t DeliverCapturedFrame(I420VideoFrame& captureFrame,
int64_t capture_time);
int32_t DeliverEncodedCapturedFrame(VideoFrame& captureFrame,
int64_t capture_time,
VideoCodecType codec_type);
int32_t _id; // Module ID
char* _deviceUniqueId; // current Device unique name;