Adding codecType to OnIncomingCapturedEncodedFrame
partially reverting r3013. Review URL: https://webrtc-codereview.appspot.com/965010 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3055 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
c66e8b3f31
commit
ac993fef2c
@ -134,7 +134,8 @@ public:
|
|||||||
virtual void OnIncomingCapturedFrame(const WebRtc_Word32 id,
|
virtual void OnIncomingCapturedFrame(const WebRtc_Word32 id,
|
||||||
I420VideoFrame& videoFrame) = 0;
|
I420VideoFrame& videoFrame) = 0;
|
||||||
virtual void OnIncomingCapturedEncodedFrame(const WebRtc_Word32 id,
|
virtual void OnIncomingCapturedEncodedFrame(const WebRtc_Word32 id,
|
||||||
VideoFrame& videoFrame) = 0;
|
VideoFrame& videoFrame,
|
||||||
|
VideoCodecType codecType) = 0;
|
||||||
virtual void OnCaptureDelayChanged(const WebRtc_Word32 id,
|
virtual void OnCaptureDelayChanged(const WebRtc_Word32 id,
|
||||||
const WebRtc_Word32 delay) = 0;
|
const WebRtc_Word32 delay) = 0;
|
||||||
protected:
|
protected:
|
||||||
|
@ -180,7 +180,8 @@ class TestVideoCaptureCallback : public VideoCaptureDataCallback {
|
|||||||
last_frame_.CopyFrame(videoFrame);
|
last_frame_.CopyFrame(videoFrame);
|
||||||
}
|
}
|
||||||
virtual void OnIncomingCapturedEncodedFrame(const WebRtc_Word32 id,
|
virtual void OnIncomingCapturedEncodedFrame(const WebRtc_Word32 id,
|
||||||
webrtc::VideoFrame& videoFrame)
|
webrtc::VideoFrame& videoFrame,
|
||||||
|
webrtc::VideoCodecType codecType)
|
||||||
{
|
{
|
||||||
assert(!"NOTIMPLEMENTED");
|
assert(!"NOTIMPLEMENTED");
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,8 @@ WebRtc_Word32 VideoCaptureImpl::DeliverCapturedFrame(I420VideoFrame&
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_Word32 VideoCaptureImpl::DeliverEncodedCapturedFrame(
|
WebRtc_Word32 VideoCaptureImpl::DeliverEncodedCapturedFrame(
|
||||||
VideoFrame& captureFrame, WebRtc_Word64 capture_time) {
|
VideoFrame& captureFrame, WebRtc_Word64 capture_time,
|
||||||
|
VideoCodecType codecType) {
|
||||||
UpdateFrameCount(); // frame count used for local frame rate callback.
|
UpdateFrameCount(); // frame count used for local frame rate callback.
|
||||||
|
|
||||||
const bool callOnCaptureDelayChanged = _setCaptureDelay != _captureDelay;
|
const bool callOnCaptureDelayChanged = _setCaptureDelay != _captureDelay;
|
||||||
@ -243,7 +244,7 @@ WebRtc_Word32 VideoCaptureImpl::DeliverEncodedCapturedFrame(
|
|||||||
if (callOnCaptureDelayChanged) {
|
if (callOnCaptureDelayChanged) {
|
||||||
_dataCallBack->OnCaptureDelayChanged(_id, _captureDelay);
|
_dataCallBack->OnCaptureDelayChanged(_id, _captureDelay);
|
||||||
}
|
}
|
||||||
_dataCallBack->OnIncomingCapturedEncodedFrame(_id, captureFrame);
|
_dataCallBack->OnIncomingCapturedEncodedFrame(_id, captureFrame, codecType);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -320,7 +321,8 @@ WebRtc_Word32 VideoCaptureImpl::IncomingFrame(
|
|||||||
"Failed to copy captured frame of length %d",
|
"Failed to copy captured frame of length %d",
|
||||||
static_cast<int>(videoFrameLength));
|
static_cast<int>(videoFrameLength));
|
||||||
}
|
}
|
||||||
DeliverEncodedCapturedFrame(_capture_encoded_frame, captureTime);
|
DeliverEncodedCapturedFrame(_capture_encoded_frame, captureTime,
|
||||||
|
frameInfo.codecType);
|
||||||
}
|
}
|
||||||
|
|
||||||
const WebRtc_UWord32 processTime =
|
const WebRtc_UWord32 processTime =
|
||||||
|
@ -100,9 +100,9 @@ protected:
|
|||||||
virtual ~VideoCaptureImpl();
|
virtual ~VideoCaptureImpl();
|
||||||
WebRtc_Word32 DeliverCapturedFrame(I420VideoFrame& captureFrame,
|
WebRtc_Word32 DeliverCapturedFrame(I420VideoFrame& captureFrame,
|
||||||
WebRtc_Word64 capture_time);
|
WebRtc_Word64 capture_time);
|
||||||
WebRtc_Word32 DeliverEncodedCapturedFrame(
|
WebRtc_Word32 DeliverEncodedCapturedFrame(VideoFrame& captureFrame,
|
||||||
VideoFrame& captureFrame,
|
WebRtc_Word64 capture_time,
|
||||||
WebRtc_Word64 capture_time);
|
VideoCodecType codec_type);
|
||||||
|
|
||||||
WebRtc_Word32 _id; // Module ID
|
WebRtc_Word32 _id; // Module ID
|
||||||
char* _deviceUniqueId; // current Device unique name;
|
char* _deviceUniqueId; // current Device unique name;
|
||||||
|
@ -359,7 +359,8 @@ void ViECapturer::OnIncomingCapturedFrame(const WebRtc_Word32 capture_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ViECapturer::OnIncomingCapturedEncodedFrame(const WebRtc_Word32 capture_id,
|
void ViECapturer::OnIncomingCapturedEncodedFrame(const WebRtc_Word32 capture_id,
|
||||||
VideoFrame& video_frame) {
|
VideoFrame& video_frame,
|
||||||
|
VideoCodecType codec_type) {
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVideo, ViEId(engine_id_, capture_id_),
|
WEBRTC_TRACE(kTraceStream, kTraceVideo, ViEId(engine_id_, capture_id_),
|
||||||
"%s(capture_id: %d)", __FUNCTION__, capture_id);
|
"%s(capture_id: %d)", __FUNCTION__, capture_id);
|
||||||
CriticalSectionScoped cs(capture_cs_.get());
|
CriticalSectionScoped cs(capture_cs_.get());
|
||||||
@ -367,6 +368,7 @@ void ViECapturer::OnIncomingCapturedEncodedFrame(const WebRtc_Word32 capture_id,
|
|||||||
// is slightly off since it's being set when the frame has been received from
|
// is slightly off since it's being set when the frame has been received from
|
||||||
// the camera, and not when the camera actually captured the frame.
|
// the camera, and not when the camera actually captured the frame.
|
||||||
video_frame.SetRenderTime(video_frame.RenderTimeMs() - FrameDelay());
|
video_frame.SetRenderTime(video_frame.RenderTimeMs() - FrameDelay());
|
||||||
|
assert(codec_type != kVideoCodecUnknown);
|
||||||
if (encoded_frame_.Length() != 0) {
|
if (encoded_frame_.Length() != 0) {
|
||||||
// The last encoded frame has not been sent yet. Need to wait.
|
// The last encoded frame has not been sent yet. Need to wait.
|
||||||
deliver_event_.Reset();
|
deliver_event_.Reset();
|
||||||
|
@ -118,7 +118,8 @@ class ViECapturer
|
|||||||
virtual void OnIncomingCapturedFrame(const WebRtc_Word32 id,
|
virtual void OnIncomingCapturedFrame(const WebRtc_Word32 id,
|
||||||
I420VideoFrame& video_frame);
|
I420VideoFrame& video_frame);
|
||||||
virtual void OnIncomingCapturedEncodedFrame(const WebRtc_Word32 capture_id,
|
virtual void OnIncomingCapturedEncodedFrame(const WebRtc_Word32 capture_id,
|
||||||
VideoFrame& video_frame);
|
VideoFrame& video_frame,
|
||||||
|
VideoCodecType codec_type);
|
||||||
virtual void OnCaptureDelayChanged(const WebRtc_Word32 id,
|
virtual void OnCaptureDelayChanged(const WebRtc_Word32 id,
|
||||||
const WebRtc_Word32 delay);
|
const WebRtc_Word32 delay);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user