This uses the VideoAdapter to handle the max-fs constraint rather than
attempting to calculate and enforce it manually within the VideoConduit.
The resolution is taken as the small of the max-fs constraint and the
latest request from the video sink.
The old unit tests for max-fs and max-fr are removed as the size
calculation has now been delegated to the VideoAdapter and the tests do
not verify whether or not video has actually been scaled.
MozReview-Commit-ID: 18khmiNageR
--HG--
extra : rebase_source : 9d4c80ab5d426721c5c409d81130f2a586c862ad
Counting the code points in a UTF-8 string is simple enough that that it is
not worthwhile to use the locale-dependent parts of the C standard library
for the task.
MozReview-Commit-ID: 6Tzd5NHub3B
--HG--
extra : rebase_source : d452896317d354ee85c817533cba3116adf5277e
The codec mimetype is now shown in the media devtools. May as well make it readable.
MozReview-Commit-ID: 6rccDiTR24m
--HG--
extra : rebase_source : 7b8d1da8f05d0c46d5fd57b5e604ec3aed36a5f2
The codec mimetype is now shown in the media devtools. May as well make it readable.
MozReview-Commit-ID: 6rccDiTR24m
--HG--
extra : rebase_source : 7b8d1da8f05d0c46d5fd57b5e604ec3aed36a5f2
When we build for versions of OS X below 10.8 it is still necessary to
convert from points to pixels when invalidating rectangles as we use the
CGRegisterScreenRefreshCallback and CGRegisterMoveCallback interfaces.
--HG--
extra : rebase_source : cc3a405c1faaf010922b9acbe0edc21da15bb9ac
This duplicates all the win32 includes except pthread.h into a new directory
for MinGW. MinGW needs all the same dummy includes _except_ it needs its
own pthread.h for winpthreads.
MozReview-Commit-ID: AlIvHhFoSIS
--HG--
extra : rebase_source : aba50e79b0be3bc7306bd32b4010076a8ca1184b
This was used for speech recognition in b2g builds. It is no longer
enabled by default and the associated interaface code no longer
compiles.
The dom interface code remains, pref'd off. This simply removes
the third-party backend implementation we have in-tree.
MozReview-Commit-ID: Fzwp6Cs9ePE
This adds the remaining desktop_capture unit tests with a few exceptions:
app_capturer_unittest does not compile and is not built by webrtc.org,
and desktop_capturer_differ_wrapper_unittest, rgba_color_unittest,
screen_drawer_unittest and test_utils_unittest rely upon code that we do
not build.
--HG--
extra : rebase_source : 6bdac36a46723ade37d6c2ba4a9384ff7205a6e1
Even though we were building the G.722 codec, we weren't setting the
defines so that it would actually be used.
MozReview-Commit-ID: Dw8l2sYwZFA
--HG--
extra : rebase_source : 10cbd61cb483536be32d7b40f1e64222c3259089
This edits the third party SCTP library, but upstream has already applied this change to master
MozReview-Commit-ID: ERpMc8EvYZ7
--HG--
extra : rebase_source : cea0d3758275b73a395ad2738edd8eb57c833e1a
We've been recording the commit id from the last vendor in
README_MOZILLA inside the various media directories. Since
we now support a --repo switch to pull from forks, record
this info as well, to make it easier to find contiguous
upstream source.
MozReview-Commit-ID: 1RanpkWfAeC
--HG--
extra : rebase_source : b6bd16b56626a871802822385be6f3a24db6cd50
Recent changes made this a public header, so it needs to be
available to callers like AOMDecoder.
MozReview-Commit-ID: KKXcv8bdVYj
--HG--
extra : rebase_source : 87d509a40f3b305e414067af5ed433eef8489fbc
Vendor upstream commit id f5bdeac22930ff4c6b219be49c843db35970b918
to pick up changes since the last import.
--HG--
extra : rebase_source : 6c03c7fcbffbdcf07b2b2819aee6dade2f0e2a0f
As far as I can tell, nothing uses the DISABLE_AVX define
when generating the rtcd headers.
MozReview-Commit-ID: Cc5tufOKP63
--HG--
extra : rebase_source : 6e74569759844e2682e3d16c59bfdefc095f8531
aom_dsp_rtcd_defs.pl checks only whether this key is present
in the config, not whether it is set to true or not. Our script
sets CONFIG_FOO=no for disabled options, while the upstream
build system omits them, resulting in extra symbol declarations
the build will never define.
Work around this by stripping the offending disabled config key
if it is disabled.
MozReview-Commit-ID: IyVDO2G3s3L
--HG--
extra : rebase_source : a1bb8b285f798464b8d8026c0dd4cd85595ae93d
Upstream is using a different syntax, which isn't as nice,
but using the same format makes comparison easier.
Also expect yasm for mingw.
MozReview-Commit-ID: 8PvmyB45AOu
--HG--
extra : rebase_source : a330006adc2093c17ab54fd5f6c1bd88ffe41084
This resolves some issues with building on mingw.
Thanks to Tom Ritter for help developing this patch.
MozReview-Commit-ID: BmJ5TbQAq17
--HG--
extra : rebase_source : 98791b8aab139601f3df4c457a42590a31eeeaea
This removes calls to FATAL() and replaces them with LOG() statements. The
unimplemented functions already returned error codes.
MozReview-Commit-ID: KgXVCIKWoLp
--HG--
extra : rebase_source : 993d3700e734fd6042fc5708261dc58d9987e64b
Some streams do not include any IDR frames. However, they do include SEI recovery point markers. We use those to mark keyframes.
MozReview-Commit-ID: IHfUx7fEgEJ
--HG--
extra : rebase_source : 807b83c2685d8eadd3066cb0cad916e24315e07f
In the case of e10s, the ctx flags for default route only (and less
importantly in this case, proxy only) were not set on the ice ctx
when SetStunAddrs was called in PeerConnectionMedia.
MozReview-Commit-ID: CldUpJfaaH3
--HG--
extra : rebase_source : 6223722275d4741519890d4d2b8436b05ca43155
The main difference between Linux and other platforms is that mozglue is
a static library and doesn't include the allocator, while it is a
dynamic library and includes the allocator on other platforms.
As such, linking against mozglue alone doesn't guarantee everything that
should be linked is linked, which GeckoProgram() does. But since
webrtc-gtest doesn't want to link libxul, we use linkage=None.
--HG--
extra : rebase_source : 552b123cb4ef6a861a49bc5eea0f03b9b5427e8b
Currently we apply the scaleResolutionDownBy factor to the resolution
requested by the quality scaler. This can lead to a cycle where the quality
scaler requests a slightly larger resolution and we scale it down even
smaller than the current resolution.
This changes things so that we only apply scaleResolutionDownBy to the
incoming resolution and then take the minimum of the scaled resolution and
the resolution requested by the quality scaler.
--HG--
extra : rebase_source : 1d16ed60b575c48d43e2e1928c518bc197339cbc
This permits using these functions with non-param types such as AutoTArray.
MozReview-Commit-ID: 3J1bLjgwB9M
--HG--
extra : rebase_source : 897e64b6f1c8d1c8c939a18d2b0813b33bcd8083
The webrtc.org code assumes we will always get a valid decoder for a known payload
type, but this is not true for our builds. This adds a check that we have a valid
decoder before calling IncomingPacket.
MozReview-Commit-ID: GUJR7Qn28vh
--HG--
extra : rebase_source : 6bd5872b59d964c3246708f0e6f549bb74dcc0b3
During my backport of RtpStreamId from webrtc.org, I missed a few
places where RepairedRtpStreamId was used or was not completely
implemented. Also, the webrtc.org code used repairedStreamId,
which is not really correct per the spec (draft-ietf-avtext-rid)
so I fixed all occurances to use the correct repairedRtpStreamId
to avoid confusion later.
The RTP header extensions default IDs for RtpStreamId and
RepairedRtpStreamId were also adjusted to not collide with
PlayoutDelay's default ID.
MozReview-Commit-ID: HSlS8nsKQ29
--HG--
extra : rebase_source : f1bf7fc9ceec22de1c56ef3b7be22fccea01ecdb
This allows sending and receiving arbitrarily (we limit to 1 GiB atm) sized
messages while not relying on the deprecated PPID fragmentation/reassembly
mode. The code already supports the ndata extension but it's not activated,
yet. Without the SCTP ndata extension, a large data channel message will
monopolise the SCTP association. While this is a problem, it is a temporary
solution until the extension is being activated. Keep in mind that every
application that uses data channels currently does fragmentation/reassembly on
application-level and it's unlikely that this will change until the popular
implementations (libwebrtc) implement EOR as well. Moreover, until the WebRTC
API specifies an API that hands over partial messages, doing application-level
fragmentation/reassembly is still useful for very large messages (sadly).
We fall back to PPID-based fragmentation/reassembly mode IFF a=max-message-size
is not set in the SDP and the negotiated amount of SCTP inbound streams is
exactly 256. Other implementations should avoid using this combination (to be
precise, other implementations should send a=max-message-size).
It also changes behaviour of RTCDataChannel.send which now raises TypeError in
case the message is too large for the other peer to receive. This is a
necessity to ensure that implementations that do not look at the EOR flag when
receiving are always able to receive our messages. Even if these
implementations do not set a=max-message-size, we use a safe default value (64
KiB, dictated by the spec) that every implementation should be able to receive,
with or without EOR support.
* Due to the use of explicit EOR, this required some major refactoring of all
send-related and deferred sending functions (which is now a lot less
complex). There's now only one place where `usrsctp_sendv` is being used.
* All data channel messages and DCEP messages will be sent without copying them
first. Only in case this fails (e.g. usrsctp's buffer is full), the message
will be copied and added to a buffer queue.
* Queued data channel messages will now be re-sent fairly (round-robin).
* Maximum message size and the PPID-based fragmentation are configurable using
about:config (media.peerconnection.sctp.force_ppid_fragmentation and
media.peerconnection.sctp.force_maximum_message_size).
* Enable interleaving of incoming messages for different streams (preparation
for SCTP ndata, has no effect until it is enabled).
* Enable interleaving of outgoing messages (disabled if SCTP ndata has not been
negotiated).
* Add pending messages flag to reduce performance impact from frequent calls to
SendDeferredMessages.
* Handle partial delivery events (for cases where a partially delivered message
is being aborted).
* Close a data channel/the connection in case the message is too large to be
handled (this is only applied in cases where the remote peer ignores our
announced local maximum message size).
* Various size_t to uint32_t conversions (message length) and back should be
safe now.
* Remove aUsingDtls/mUsingDtls from DataChannelConnection.
* Set maximum message size in SDP and in the data channel stack.
* Replace implicit NS_ENSURE_*'s with explicit NS_WARN_IF's.
* Add SetMaxMessageSize method for late-applying those signalling parameters
when a data channel has been created before the remote SDP was available.
* Limit remote maximum message size and add a GetMaxMessageSize method for a
future implementation of RTCSctpTransport.maxMessageSize.
MozReview-Commit-ID: FlmZrpC5zVI
--HG--
extra : rebase_source : 54e1b838c788a3abbded4fb32fe7c2788f8a9bc0
Since I am already poking around in ffvpxcommon.mozbuild's CFLAGS, also suppress these clang -Wvisibility and -Wstring-conversion warnings:
media/ffvpx/libavutil/dummy_funcs.c:83:34 [-Wvisibility] declaration of 'struct AVBufferRef' will not be visible outside of this function
media/ffvpx/libavutil/dummy_funcs.c:83:67 [-Wvisibility] declaration of 'struct AVFrame' will not be visible outside of this function
media/ffvpx/libavutil/utils.c:119:26 [-Wstring-conversion] implicit conversion turns string literal into bool: 'char [19]' to '_Bool'
And remove -Wno-logical-op-parentheses because clang does not currently report any -Wlogical-op-parentheses warnings for ffvpx.
MozReview-Commit-ID: 1kEwEHeD1PC
--HG--
extra : rebase_source : 133fa139f5389467919b88b96b8cbbf632bf002d
clang doesn't support gcc warning options -Wdiscarded-qualifiers or -Wmaybe-uninitialized in media/ffvpxcommon.mozbuild (added in bug 1369791), so only suppress those warnings for real gcc.
warning: unknown warning option '-Wno-discarded-qualifiers'; did you mean '-Wno-ignored-qualifiers'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
MozReview-Commit-ID: JUEqa6AN59x
--HG--
extra : rebase_source : 45e3c43d57e58119170700f7a339d1f2dfacff2c
extra : source : ee4a75aeb3585719700e1700746ce55984eba6fa
GYP of WebRTC should reference MOZ_SYSTEM_LIBEVENT values if available.
MozReview-Commit-ID: CshsPrRidM8
--HG--
extra : rebase_source : 9e619c2f49e7c2b3f680814b95b823996773fa6c
libevent uses event.h header that is fuzzy name. Since our in-tree libevent is libevent2, we should use libevent2 headers instead of deprecated event.h
MozReview-Commit-ID: 6DjW9JEkNWL
--HG--
extra : rebase_source : b774e177b137bf7427122253a3e4c698689e08a4
This is basically a cosmetic change; references are the normal way to do string
outparams.
--HG--
extra : rebase_source : ffc5945f269bdcd3d4116755b56713e87a44b6cd
There does not seem to be any bad effects from calling stop twice, so just log that
it has happened rather than throwing an exception.
--HG--
extra : rebase_source : 0d92bad7b33010f50f41de8498b8406c3521c9e7
The race condition is between ~ScreenCapturerMac and the ScreenRefresh and
ScreenUpdateMove callbacks. The destructor calls
UnregisterRefreshAndMoveHandlers but a callback may still occur after the
destruction of the object.
Rather than passing a pointer to ScreenCapturerMac into the callback, this
adds a separate object which keeps a pointer to ScreenCapturerMac guarded
by a CriticalSection. The destructor sets the ScreenCapturerMac to nullptr.
In the next callback, the handler unregisters the callbacks and deletes
the object.
The downside to this approach is that if the ScreenCapturerMac
object is allocated and deallocated before a callback occurs, the memory
for the separate object will be leaked.
We dynamically allocate the memory we need and abort if OOM.
MozReview-Commit-ID: FMGWbOXoN8P
--HG--
extra : rebase_source : d6a28017b7c261d2c8acf2321cd30266bd8d5a35
The race condition is between ~ScreenCapturerMac and the ScreenRefresh and
ScreenUpdateMove callbacks. The destructor calls
UnregisterRefreshAndMoveHandlers but a callback may still occur after the
destruction of the object.
Rather than passing a pointer to ScreenCapturerMac into the callback, this
adds a separate object which keeps a pointer to ScreenCapturerMac guarded
by a CriticalSection. The destructor sets the ScreenCapturerMac to nullptr.
In the next callback, the handler unregisters the callbacks and deletes
the object.
The downside to this approach is that if the ScreenCapturerMac
object is allocated and deallocated before a callback occurs, the memory
for the separate object will be leaked.
When adding the length check for parsing RtpStreamId, I incorrectly used
the '<=' operator instead of the '>' operator.
MozReview-Commit-ID: 46XZBqWxkBc
--HG--
extra : rebase_source : 6290aeed489770070308aafacad01ce5b63a60a1
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.
MozReview-Commit-ID: 6s78RvPFMzv
--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
Update to chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.
Includes cdm::ContentDecryptionModule_9 and cdm::Host_9 definitions,
HDCP definitions, and 10 and 12 bit image format definitions.
MozReview-Commit-ID: bYH3OBSzuT
--HG--
extra : rebase_source : cfc291b3452c2154ecd1ca16a2ece0a5a42f0b5e
The new RtpHeaderExtension handling works better with variable length
header extensions, and the new RtpStreamId implementation takes
advantage of it. This is useful to us because we'll be able to add
MID support using the same mechanism.
MozReview-Commit-ID: 5VYQYvhD5gr
--HG--
extra : rebase_source : 900126e0b136343a2767715b12d906b1dbbabe36
This enables apm logging by setting the apm_debug_dump variable in gyp.mozbuild.
Prior to this change, some files were including apm_data_dumper.h with logging
enabled and some were not.
This also removes the AEC* C interface and calls into webrtc::Trace directly.
Whatever historical reasons for having a C interface into these calls no
longer seems to apply. In addition reserving a buffer for the base file name
and then ensuring it was null terminated caused an ASAN "stack-buffer-overflow"
while testing. This was because it was not handling an empty base file
name properly. This would not normally happen if AEC logging was enabled through
about:webrtc, but it still seems safer to use std::string.
MozReview-Commit-ID: Ikz5xO74syA
--HG--
extra : rebase_source : 8e0c59117135fadb75f4a7e6be5588af1404533d
Update to chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.
Includes cdm::ContentDecryptionModule_9 and cdm::Host_9 definitions,
HDCP definitions, and 10 and 12 bit image format definitions.
MozReview-Commit-ID: bYH3OBSzuT
--HG--
extra : rebase_source : d062d233c9a2b59aa5ae5c6e0584ed13b7c83e6e
This provides the abilty to use the PlatformDecoderModule interface, including hardware accelerated ones.
Code is disabled by default via the media.navigator.mediadatadecoder_enabled preference.
MozReview-Commit-ID: 7bWJXEK8CoO
--HG--
extra : rebase_source : df3801c02d3ea6e4c120a4836c4893e18e37d694
Do not only rely on the dimensions retrieved via FrameSizeChange. Both the webrtc::VideoFrameBuffer object and layers::Image know about their dimensions.
We still need to keep the FrameSizeChange mechanism so that the attached media element know about its size before a frame is ready to be displayed.
We will revisit this problem later.
Additionally, don't assume that the frame's stride is the same as the frame's width. It may be true with the software decoders currently used, but it's not the norm.
MozReview-Commit-ID: BTY8lImoUbc
--HG--
extra : rebase_source : 83b07fe030bc19de89d5b5cc52a561fcf096be4d
The methods using it aren't re-entrant. A mutex will do.
MozReview-Commit-ID: TIAL7Itp5A
--HG--
extra : rebase_source : 28e106b0bd7026a36b746d30b57896a5ed74bfa7