Add locking around waiting for initialization to finish, since calling
dispatch_block_wait from multiple threads leads to undefined behavior.
Initialize RTCUIApplicationStatusObserver earlier to give the
initialization block more time to run on the main thread before
starting to query the application state.
http://www.dailymotion.com/video/x2mckmh
BUG=b/65558688
Review-Url: https://codereview.webrtc.org/3009383002
Cr-Commit-Position: refs/heads/master@{#19822}
In the transition period when we have both VideoRenderer.Callbacks and
VideoSinks, and VideoRenderer.I420Frames and VideoFrames, the adapters
between them does not handle RGB frames correctly. This CL improves the
situation somewhat, and at least gives clearer error messages.
BUG=webrtc:7749
Review-Url: https://codereview.webrtc.org/3017433002
Cr-Commit-Position: refs/heads/master@{#19817}
These retain cycles are theoretical since the singleton is supposed to
live for the lifetime of the application.
These measures were removed earlier when the object was turned into
a singleton in a previous CL, see
https://chromium-review.googlesource.com/c/external/webrtc/+/527442/3..4/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m
The weak self handling and unused dealloc method is mostly noise and
can make a casual reader think that the object will have a limited
life cycle, i.e. the code may initially look like something it is not,
which could possibly be less readable. On the other hand, for people
looking out for potential retain cycles, the code may be distracting
since it looks like it may be leaking.
BUG=b/65558647
Review-Url: https://codereview.webrtc.org/3013023002
Cr-Commit-Position: refs/heads/master@{#19811}
Specifically calling out issue 3721 ("dispose can't be called from a
callback"), which developers frequently run into.
BUG=webrtc:3721
NOTRY=True
Review-Url: https://codereview.webrtc.org/3013573002
Cr-Commit-Position: refs/heads/master@{#19804}
The goal of this CL is to separate Obj-C/Obj-C++ code from targets which have
also C++ code (see https://bugs.chromium.org/p/webrtc/issues/detail?id=7743
for more information).
To achieve this we have created 2 targets (audio_device_ios_objc and
audio_device_generic) and audio_device will act as a proxy between these targets
(this way we can avoid a circular dependency between audio_device_generic and
audio_device_ios_objc).
BUG=webrtc:7743
Review-Url: https://codereview.webrtc.org/2991343002
Cr-Commit-Position: refs/heads/master@{#19795}
We currently use long for some variables, which causes warnings when
converting from int64_t. We should use fixed width integer types
instead.
BUG=b/65491700
Review-Url: https://codereview.webrtc.org/3009293002
Cr-Commit-Position: refs/heads/master@{#19791}
This makes api more consistent with ios and native library
BUG=None
Review-Url: https://codereview.webrtc.org/3012843002
Cr-Commit-Position: refs/heads/master@{#19770}
This CL adds a helper class VideoFrameDrawer that provides an
abstraction for rendering arbitrary video frames using OpenGL. The class
takes care of dispatching on the video buffer type and uploading
I420 data to textures.
BUG=None
Review-Url: https://codereview.webrtc.org/3008423002
Cr-Commit-Position: refs/heads/master@{#19768}
We use Optional in our public API, so its header should be in
webrtc/api/.
BUG=webrtc:8205
Review-Url: https://codereview.webrtc.org/3011943002
Cr-Commit-Position: refs/heads/master@{#19693}
This makes it possible for decoder factories to actually provide any
video codec, not just the ones WebRTC knows about. It also brings
the decoder factory interface more in line with that of the encoder
factory.
BUG=webrtc:8140
Review-Url: https://codereview.webrtc.org/3007433002
Cr-Commit-Position: refs/heads/master@{#19654}
The millisecond field is deprecated and will be removed once the
dependencies have been updated.
BUG=webrtc:7760
Review-Url: https://codereview.webrtc.org/3010623002
Cr-Commit-Position: refs/heads/master@{#19622}
We were leaking a fragmentation header object on each frame.
BUG=webrtc:8132
Review-Url: https://codereview.webrtc.org/3004013002
Cr-Commit-Position: refs/heads/master@{#19602}
Increase timeout since the wait function timed out in certain debugging
circumstances. Also change the check to a DCHECK since it is not really
a critical error if it would time out.
BUG=None
Review-Url: https://codereview.webrtc.org/3007773002
Cr-Commit-Position: refs/heads/master@{#19582}
The native interface is added in the private file
webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Native.h.
BUG=webrtc:8093
Review-Url: https://codereview.webrtc.org/3012443002
Cr-Commit-Position: refs/heads/master@{#19576}
This reverts commit 96de428fd1f301c3ad1355183b45e44db5ef3f7f.
Reason for revert: Gives compile errors because the new ObjC++ headers are included in some targets that use ObjC.
Original change's description:
> Adding injectable audio decoder and encoder factory support to the RTCPeerConnection obj-c layer.
>
> Bug: webrtc:8093
> Change-Id: I868ce5f75a72c6deb065dec60784289d045ae22a
> Reviewed-on: https://chromium-review.googlesource.com/608981
> Commit-Queue: Jeremy Newton-Smith <jeremyns@webrtc.org>
> Reviewed-by: Zeke Chin <tkchin@webrtc.org>
> Reviewed-by: Kári Tristan Helgason <kthelgason@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19477}
TBR=kjellander@webrtc.org,tkchin@webrtc.org,kthelgason@webrtc.org,jeremyns@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8093
Change-Id: I3ade9dd979c9f13990a2972b15b786b8e78e1cd4
Reviewed-on: https://chromium-review.googlesource.com/640810
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19573}
This CL replaces:
namespace webrtc_jni {
with:
namespace webrtc {
namespace jni {
The main benefit is that we don't have to use the webrtc:: qualifier
inside the jni namespace so we can reduce some clutter.
BUG=None
Review-Url: https://codereview.webrtc.org/3009613002
Cr-Commit-Position: refs/heads/master@{#19569}
This CL introduces common functions for adding and releasing
native references to reduce the number of JNI functions.
BUG=webrtc:8043
Review-Url: https://codereview.webrtc.org/3003213002
Cr-Commit-Position: refs/heads/master@{#19547}
Update the name of the macro to something more descriptive and use
variable length arguments to make it work better with autoformatting
tools.
BUG=None
Review-Url: https://codereview.webrtc.org/2998403002
Cr-Commit-Position: refs/heads/master@{#19538}
This function is currently only available in EglBase14, which is not in
the api. This CL adds the swapBuffer method to the public EglBase
interface. For EglBase10, the presentation time is just ignored.
BUG=webrtc:8155
Review-Url: https://codereview.webrtc.org/3003843002
Cr-Commit-Position: refs/heads/master@{#19518}
When adapting a frame, any initial cropping coordinate was replaced
by the coordinate calculated for adapting. Offset initial coordinate
instead.
BUG=webrtc:7880
Review-Url: https://codereview.webrtc.org/2975613002
Cr-Commit-Position: refs/heads/master@{#19509}
Fixes bug where callback is set to null on reinitialization. Also fixes
a race condition where callback can be null in onTextureFrameAvailable.
BUG=webrtc:8124
Review-Url: https://codereview.webrtc.org/3002093002
Cr-Commit-Position: refs/heads/master@{#19493}
We can't handle no value here anyway and end up setting a default
at each call site. The defaults aren't even the same in each place.
BUG=None
Review-Url: https://codereview.webrtc.org/2998293002
Cr-Commit-Position: refs/heads/master@{#19485}
The field trials enables producing new VideoFrames in camera classes.
This field trial should be enabled if VideoSinks are used.
BUG=webrtc:7749, webrtc:7760
Review-Url: https://codereview.webrtc.org/2984633002
Cr-Commit-Position: refs/heads/master@{#19467}
VideoSink is not assumed to take ownership of the frame, so it is not
necessary to release it unless it is retained for future use.
BUG=webrtc:7749
Review-Url: https://codereview.webrtc.org/3003563002
Cr-Commit-Position: refs/heads/master@{#19440}
Also fixes a small bug in EglRenderer where if it was passed a custom
frame, it would leak a reference.
BUG=b/64887218
Review-Url: https://codereview.webrtc.org/3003533002
Cr-Commit-Position: refs/heads/master@{#19432}
Access to I420 data should be done on an RTCI420Buffer that can be
accessed through the toI420 method, and not on an RTCVideoFrame
directly.
BUG=webrtc:7785
Review-Url: https://codereview.webrtc.org/2997453002
Cr-Commit-Position: refs/heads/master@{#19431}
Access to a native buffer should be through RTCVideoFrame.buffer
instead.
BUG=webrtc:7785
Review-Url: https://codereview.webrtc.org/2990253002
Cr-Commit-Position: refs/heads/master@{#19430}
parameters are interesting.
Since this is used by users when implementing injectable Obj-C video
codecs, the API where the unused payload is required is unnecessarily
confusing. Also make the codec parameters optional.
BUG=None
Review-Url: https://codereview.webrtc.org/3001183002
Cr-Commit-Position: refs/heads/master@{#19411}
Reason for revert:
Create reland CL to add fix to.
Original issue's description:
> Revert of Add a flags field to video timing extension. (patchset #15 id:280001 of https://codereview.webrtc.org/3000753002/ )
>
> Reason for revert:
> Speculative revet for breaking remoting_unittests in fyi bots.
> https://build.chromium.org/p/chromium.webrtc.fyi/waterfall?builder=Win7%20Tester
>
> Original issue's description:
> > Add a flags field to video timing extension.
> >
> > The rtp header extension for video timing shuold have an additional
> > field for signaling metadata, such as what triggered the extension for
> > this particular frame. This will allow separating frames select because
> > of outlier sizes from regular frames, for more accurate stats.
> >
> > This implementation is backwards compatible in that it can read video
> > timing extensions without the new flag field, but it always sends with
> > it included.
> >
> > BUG=webrtc:7594
> >
> > Review-Url: https://codereview.webrtc.org/3000753002
> > Cr-Commit-Position: refs/heads/master@{#19353}
> > Committed: cf5d485e14
>
> TBR=danilchap@webrtc.org,kthelgason@webrtc.org,stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7594
>
> Review-Url: https://codereview.webrtc.org/2995953002
> Cr-Commit-Position: refs/heads/master@{#19360}
> Committed: f0f7378b05TBR=danilchap@webrtc.org,kthelgason@webrtc.org,stefan@webrtc.org,emircan@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7594
Review-Url: https://codereview.webrtc.org/2996153002
Cr-Commit-Position: refs/heads/master@{#19405}