WebRTC no longer has any restriction on what thread frames should be
delivered on. One possible problem with this CL is that NV21->I420
conversion and scaling is done on the thread that delivers frames, which
might cause fps regressions.
R=nisse@webrtc.org, perkj@webrtc.org, tkchin@webrtc.org
Review URL: https://codereview.webrtc.org/2137503003 .
Cr-Commit-Position: refs/heads/master@{#14021}
The rotation is currently always applied by AVFoundation by
reconfiguring the capture connection video orientation. This CL sets the
rotation field in the frame instead. This avoids the current flash in
the video when the device is rotated, and also avoids reconfiguring the
local encoder and remote decoder when the device is rotated.
BUG=b/30651939
Review-Url: https://codereview.webrtc.org/2271583003
Cr-Commit-Position: refs/heads/master@{#13916}
We've seen some cases of nonrecoverable runtime error when entering the foreground. This is a theoretical fix to see if we can restart after willEnterForeground in didBecomeActive instead.
NOTRY=True
BUG=
Review-Url: https://codereview.webrtc.org/2258583004
Cr-Commit-Position: refs/heads/master@{#13903}
Theoretical fix to address some EAGLContext issues from other UIImageViews that could be active.
NOTRY=True
BUG=
Review-Url: https://codereview.webrtc.org/2259513002
Cr-Commit-Position: refs/heads/master@{#13806}
RTCPeerConnectionFactory.createPeerConnection did not check the return
value of the native createPeerConnection() - so when the native PC
fails to be created, it could end up attempting to use a null pointer.
The change makes it return nil when the creation fails. The application
can then detect and respond to the failure.
Review-Url: https://codereview.webrtc.org/2240633004
Cr-Commit-Position: refs/heads/master@{#13732}
This CL handles frame rotation by updating the OpenGL vertex data in
RTCOpenGLVideoRenderer, instead of calling the expensive
libyuv::I420Rotate that will rotate the actual memory. Also, we can
handle rotated native frames instead of falling back to
NativeToI420Buffer.
Review-Url: https://codereview.webrtc.org/2176623002
Cr-Commit-Position: refs/heads/master@{#13715}
This CL adds support in RTCEAGLVideoView for rendering CVPixelBuffers as
OpenGL ES textures directly, compared to the current code that first
converts the CVPixelBuffers to I420, and then reuploads them as
textures. This is only supported on iOS with the use of a
CVOpenGLESTextureCache.
The I420 rendering and native rendering are separated in two different
implementations of a simple shader interface:
@protocol Shader
- (BOOL)drawFrame:(RTCVideoFrame*)frame;
@end
GL resources are allocated when the shader is instantiated and released
when the shader is destroyed. RTCEAGLVideoView will lazily instantiate
the necessary shader when it receives the first frame of that kind. This
is primarily done to avoid allocating GL resources for both I420 and
native rendering.
Some other changes are:
- Print GL shader compilation errors.
- Remove updateTextureSizesForFrame() function. The textures will
resize automatically anyway when the texture data is uploaded with
glTexImage2D().
patch from issue 2154243002 at patchset 140001 (http://crrev.com/2154243002#ps140001)
Continuing magjed@'s work since he is OOO this week.
BUG=
Review-Url: https://codereview.webrtc.org/2202823004
Cr-Commit-Position: refs/heads/master@{#13668}
Scaling causes us to work the CPU too much, which very quickly degrades quality. This causes us to at least behave better on good networks.
NOTRY=True
BUG=
Review-Url: https://codereview.webrtc.org/2205763002
Cr-Commit-Position: refs/heads/master@{#13630}
Passing transport_frame_id() to VideoSink will allow to identify incoming video
frames, which will make it possible to correlate video frames on the
sender and on the receiver.
BUG=chromium:621691
R=mflodman@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/2088953002 .
Cr-Commit-Position: refs/heads/master@{#13596}
Reason for revert:
Reverting all CLs related to moving the eventlog, as they break Chromium tests.
Original issue's description:
> Fix for RtcEventLog ObjC interface
>
> This moves the RtcEventLog start/stop functions to PeerConnection on the objC interface.
>
> BUG=
> R=tkchin@webrtc.org
>
> Committed: c43bf56ef1TBR=tkchin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review-Url: https://codereview.webrtc.org/2110373002
Cr-Commit-Position: refs/heads/master@{#13338}
Every message will now be traced with the location from which it was
posted, including function name, file and line number.
This CL also writes a normal LOG message when the dispatch took more
than a certain amount of time (currently 50ms).
This logging should help us identify messages that are taking
longer than expected to be dispatched.
R=pthatcher@webrtc.org, tommi@webrtc.org
Review URL: https://codereview.webrtc.org/2019423006 .
Cr-Commit-Position: refs/heads/master@{#13104}
This CL turns nativeConfiguration into createNativeConfiguration returning a
pointer or nil on failure. This method's certificate generation is updated to
use the new API and reports failure (nil) if unsuccessful instead of relying on
the default certificate. We also remove the implicit assumption (now incorrect)
that RSA is the default. This is the same type of changes as was done in
https://codereview.webrtc.org/1965313002 but this file
(RTCPeerConnectionInterface.mm) was forgotten.
With no more usages of kIdentityName it and dtlsidentitystore.cc is removed.
Also removes unnecessary #include in peerconnectioninterface.h that was still
remnant due to an indirect include of kIdentityName.
RTCConfiguration+Private.h now lists method nativeEncryptionKeyTypeForKeyType
which was added in the above mentioned prior CL.
BUG=webrtc:5707, webrtc:5708
Review-Url: https://codereview.webrtc.org/2035473004
Cr-Commit-Position: refs/heads/master@{#13089}
The AppRTCDemo app on Mac OSX does not show or send local video streams,
as ACFoundation capture session is not compiled in or implemented in
the appropriate places. This is the first part of a two-part patch
that implements local capture on the Mac for AppRTCDemo
P.S. This is my first patch to WebRTC. I didn't see any relevant tests, but I could write some if you can point me at a location. Also, I don't have access to the automated tests (I don't think)
BUG=webrtc:3417
Review-Url: https://codereview.webrtc.org/2046863004
Cr-Commit-Position: refs/heads/master@{#13080}
Reason for revert:
There are more CreatePeerConnection calls than I anticipated/had found in Chromium, like remoting/protocol/webrtc_transport.cc. Reverting due to broken Chromium FYI bots.
Original issue's description:
> Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
>
> The store was used in WebRtcSessionDescriptionFactory to generate certificates,
> now a generator is used instead (new API). PeerConnection[Factory][Interface],
> and WebRtcSession are updated to pass generators all the way down to the
> WebRtcSessionDescriptionFactory instead of stores.
>
> The webrtc implementation of a generator, RTCCertificateGenerator, is used as
> the default generator (peerconnectionfactory.cc:189) instead of the webrtc
> implementation of a store, DtlsIdentityStoreImpl.
> The generator is fully parameterized and does not generate RSA-1024 unless you
> ask for it (which makes sense not to do beforehand since ECDSA is now default).
> The store was not fully parameterized (known filed bug).
>
> The "top" layer, PeerConnectionFactoryInterface::CreatePeerConnection, is
> updated to take a generator instead of a store. But as to not break Chromium,
> the old function signature taking a store is kept. It is implemented to invoke
> the generator version by wrapping the store in an
> RTCCertificateGeneratorStoreWrapper. As soon as Chromium is updated to use the
> new function signature we can remove the old CreatePeerConnection.
> Due to having multiple CreatePeerConnection signatures, some calling places
> are updated to resolve the ambiguity introduced.
>
> BUG=webrtc:5707, webrtc:5708
> R=phoglund@webrtc.org, tommi@webrtc.org
> TBR=tkchin@webrc.org
>
> Committed: 400781a209TBR=tkchin@webrtc.org,tommi@webrtc.org,phoglund@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5707, webrtc:5708
Review-Url: https://codereview.webrtc.org/2020633002
Cr-Commit-Position: refs/heads/master@{#12948}
The store was used in WebRtcSessionDescriptionFactory to generate certificates,
now a generator is used instead (new API). PeerConnection[Factory][Interface],
and WebRtcSession are updated to pass generators all the way down to the
WebRtcSessionDescriptionFactory instead of stores.
The webrtc implementation of a generator, RTCCertificateGenerator, is used as
the default generator (peerconnectionfactory.cc:189) instead of the webrtc
implementation of a store, DtlsIdentityStoreImpl.
The generator is fully parameterized and does not generate RSA-1024 unless you
ask for it (which makes sense not to do beforehand since ECDSA is now default).
The store was not fully parameterized (known filed bug).
The "top" layer, PeerConnectionFactoryInterface::CreatePeerConnection, is
updated to take a generator instead of a store. But as to not break Chromium,
the old function signature taking a store is kept. It is implemented to invoke
the generator version by wrapping the store in an
RTCCertificateGeneratorStoreWrapper. As soon as Chromium is updated to use the
new function signature we can remove the old CreatePeerConnection.
Due to having multiple CreatePeerConnection signatures, some calling places
are updated to resolve the ambiguity introduced.
BUG=webrtc:5707, webrtc:5708
R=phoglund@webrtc.org, tommi@webrtc.orgTBR=tkchin@webrc.org
Review URL: https://codereview.webrtc.org/2013523002 .
Cr-Commit-Position: refs/heads/master@{#12947}
When local candidates are removed, signal to RTCPeerConnection
and eventually send to the remote client.
When a candidate-removal message is received, notify the native PeerConnection.
BUG=
R=tkchin@webrtc.org
Review URL: https://codereview.webrtc.org/1972483002 .
Cr-Commit-Position: refs/heads/master@{#12852}
GetWidth and GetHeight (renamed to width and height),
GetNativeHandle (replaced by video_frame_buffer()->native_handle).
TBR=tkchin@webrtc.org (trivial changes to objc RTCVideoFrame and VideoRendererAdapter)
BUG=webrtc:5682
Review-Url: https://codereview.webrtc.org/1990063005
Cr-Commit-Position: refs/heads/master@{#12822}