c8895aa2f3
Unify underlying frame buffer in I420VideoFrame and WebRtcVideoFrame
...
Currently, I420VideoFrame uses three webrtc::Plane to store pixel data, and WebRtcVideoFrame uses WebRtcVideoFrame::FrameBuffer/webrtc::VideoFrame. The two subclasses WebRtcTextureVideoFrame and TextureVideoFrame use a NativeHandle to store pixel data, and there is also a class WebRtcVideoRenderFrame that wraps an I420VideoFrame.
This CL replaces these classes with a new interface VideoFrameBuffer that provides the common functionality. This makes it possible to remove deep frame copies between cricket::VideoFrame and I420VideoFrame.
Some additional minor changes are:
* Disallow creation of 0x0 texture frames.
* Remove the half-implemented ref count functions in I420VideoFrame.
* Remove the Alias functionality in WebRtcVideoFrame
The final goal is to eliminate all frame copies, but to limit the scope of this CL, some planned changes are postponed to follow-up CL:s (see planned changes in https://webrtc-codereview.appspot.com/38879004 , or https://docs.google.com/document/d/1bxoJZNmlo-Z9GnQwIaWpEG6hDlL_W-bzka8Zb_K2NbA/preview ). Specifically, this CL:
* Keeps empty subclasses WebRtcTextureVideoFrame and TextureVideoFrame, and just delegates the construction to the superclass.
* Keeps the deep copies from cricket::VideoFrame to I420VideoFrame.
BUG=1128
R=mflodman@webrtc.org , pbos@webrtc.org , perkj@webrtc.org , tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/42469004
Cr-Commit-Position: refs/heads/master@{#8580}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8580 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-03 21:22:26 +00:00
97ed2a4b70
I420VideoFrame: Remove function ResetSize
...
This is a partial reland of https://webrtc-codereview.appspot.com/39939004/ .
The original CL was reverted because ViECapturer use ResetSize/IsZeroSize on |captured_frame_| as a check to make sure each captured frame is only delivered once. Removing ResetSize introduced a race condition where a captured frame could be delivered multiple times.
I have fixed this problem in this CL by replacing ResetSize with scoped_ptr::release.
BUG=4352
R=perkj@webrtc.org , tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/39359004
Cr-Commit-Position: refs/heads/master@{#8561}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8561 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-02 17:33:41 +00:00
fd33293d58
I420VideoFrame: Remove functions set_width and set_height
...
This is a partial reland of https://webrtc-codereview.appspot.com/39939004/ .
The functions set_width and set_height in I420VideoFrame are not needed and just add complexity.
R=perkj@webrtc.org , tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/41009004
Cr-Commit-Position: refs/heads/master@{#8556}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8556 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-02 13:57:44 +00:00
7400e0b876
Revert "I420VideoFrame: Remove functions set_width, set_height, and ResetSize"
...
This reverts commit r8434.
Reason for revert: Introduced a race condition. If ViECaptureProcess() -> SwapCapturedAndDeliverFrameIfAvailable() is called twice without a call to OnIncomingCapturedFrame() in between (with both captured_frame_ and deliver_frame_ populated), an old frame will be delivered again, since captured_frame_->IsZeroSize() will never be true.
BUG=4352
TBR=perkj@webrtc.org , stefan@webrtc.org , tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/40129004
Cr-Commit-Position: refs/heads/master@{#8530}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8530 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-27 15:19:18 +00:00
be29b3b4c6
I420VideoFrame: Remove functions set_width, set_height, and ResetSize
...
The functions set_width, set_height, and ResetSize in I420VideoFrame are not needed and just add complexity.
R=perkj@webrtc.org , stefan@webrtc.org , tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/39939004
Cr-Commit-Position: refs/heads/master@{#8434}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8434 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-19 15:35:50 +00:00
1226e926e6
CVO capturer feature: allow unrotated frame flows through the capture pipeline.
...
split from https://webrtc-codereview.appspot.com/37029004/
This is based on clean up code change at https://webrtc-codereview.appspot.com/37129004
BUG=4145
R=perkj@webrtc.org , pthatcher@webrtc.org , stefan@webrtc.org , tommi@webrtc.org
Committed: https://code.google.com/p/webrtc/source/detail?r=8337
Committed: https://code.google.com/p/webrtc/source/detail?r=8338
Review URL: https://webrtc-codereview.appspot.com/39799004
Cr-Commit-Position: refs/heads/master@{#8339}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8339 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 18:38:53 +00:00
dc7b02277c
CVO capturer feature: allow unrotated frame flows through the capture pipeline.
...
split from https://webrtc-codereview.appspot.com/37029004/
This is based on clean up code change at https://webrtc-codereview.appspot.com/37129004
BUG=4145
R=perkj@webrtc.org , pthatcher@webrtc.org , stefan@webrtc.org , tommi@webrtc.org
Committed: https://code.google.com/p/webrtc/source/detail?r=8337
Review URL: https://webrtc-codereview.appspot.com/39799004
Cr-Commit-Position: refs/heads/master@{#8338}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8338 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 18:06:10 +00:00
20e8f22766
CVO capturer feature: allow unrotated frame flows through the capture pipeline.
...
split from https://webrtc-codereview.appspot.com/37029004/
This is based on clean up code change at https://webrtc-codereview.appspot.com/37129004
BUG=4145
R=perkj@webrtc.org , pthatcher@webrtc.org , stefan@webrtc.org , tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/39799004
Cr-Commit-Position: refs/heads/master@{#8337}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8337 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 17:51:46 +00:00
273a414b0e
Report encoded frame size in VideoSendStream.
...
Implements reporting transmitted frame size in WebRtcVideoEngine2.
R=mflodman@webrtc.org , stefan@webrtc.org
BUG=4033
Review URL: https://webrtc-codereview.appspot.com/33399004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7772 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-01 15:23:21 +00:00
4591fbd09f
Use size_t more consistently for packet/payload lengths.
...
See design doc at https://docs.google.com/a/chromium.org/document/d/1I6nmE9D_BmCY-IoV6MDPY2V6WYpEI-dg2apWXTfZyUI/edit?usp=sharing for more information.
This CL was reviewed and approved in pieces in the following CLs:
https://webrtc-codereview.appspot.com/24209004/
https://webrtc-codereview.appspot.com/24229004/
https://webrtc-codereview.appspot.com/24259004/
https://webrtc-codereview.appspot.com/25109004/
https://webrtc-codereview.appspot.com/26099004/
https://webrtc-codereview.appspot.com/27069004/
https://webrtc-codereview.appspot.com/27969004/
https://webrtc-codereview.appspot.com/27989004/
https://webrtc-codereview.appspot.com/29009004/
https://webrtc-codereview.appspot.com/30929004/
https://webrtc-codereview.appspot.com/30939004/
https://webrtc-codereview.appspot.com/31999004/
Committing as TBR to the original reviewers.
BUG=chromium:81439
TEST=none
TBR=pthatcher,henrik.lundin,tina.legrand,stefan,tkchin,glaznev,kjellander,perkj,mflodman,henrika,asapersson,niklas.enbom
Review URL: https://webrtc-codereview.appspot.com/23129004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7726 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-20 22:28:14 +00:00
ab990ae43a
Revert 7151 "Revert 7114 "Expose VideoEncoders with webrtc/video_encoder.h.""
...
Re-lands r7114 after landing r7204 to adress the compile error causing
the rollback in r7151.
BUG=3070
TBR=henrikg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/28489004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7207 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-17 09:02:25 +00:00
307d3dbdee
Revert 7114 "Expose VideoEncoders with webrtc/video_encoder.h."
...
Speculative revert, seems to be reason for flaky Win FYI bot compile break.
> Expose VideoEncoders with webrtc/video_encoder.h.
>
> Exposes VideoEncoders as part of the public API and provides a factory
> method for creating them.
>
> BUG=3070
> R=mflodman@webrtc.org , stefan@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/21929004
TBR=pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/19329004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7151 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-11 09:48:30 +00:00
b420191743
Expose VideoEncoders with webrtc/video_encoder.h.
...
Exposes VideoEncoders as part of the public API and provides a factory
method for creating them.
BUG=3070
R=mflodman@webrtc.org , stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/21929004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7114 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-09 10:40:56 +00:00