Граф коммитов

275 Коммитов

Автор SHA1 Сообщение Дата
Agi Sferro a5972b2933 Bug 1696145 - Add Array::From(nsTArray) r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111923
2021-04-20 18:35:36 +00:00
Csoregi Natalia cd658de8c3 Backed out 2 changesets (bug 1696145) for causing build bustage on notifications. CLOSED TREE
Backed out changeset 2e18b65dd133 (bug 1696145)
Backed out changeset 6d302afe732f (bug 1696145)
2021-04-20 20:13:56 +03:00
Agi Sferro f50a49c5cf Bug 1696145 - Add Array::From(nsTArray) r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111923
2021-04-20 16:38:45 +00:00
owlishDeveloper 618690bc1f WIP: Bug 1703707 - Replace cross-process OMXClient call with IPC to enable isolated process in Android r=geckoview-reviewers,aklotz,agi,jolin
Differential Revision: https://phabricator.services.mozilla.com/D111200
2021-04-16 23:34:35 +00:00
Alexis Beingessner ade0725530 Bug 1686616 - make GfxInfo use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105522
2021-02-18 13:26:29 +00:00
Simon Giesecke 8953086494 Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97075
2020-11-23 15:49:14 +00:00
Jean-Yves Avenard 6d2df84e41 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-13 07:46:44 +00:00
Bogdan Tara 266d9ad46c Backed out 13 changesets (bug 1672072) for short.mp4.firstframe.html failures CLOSED TREE
Backed out changeset f093b7969e8b (bug 1672072)
Backed out changeset 28db8276ec2b (bug 1672072)
Backed out changeset ff8fe1b856b3 (bug 1672072)
Backed out changeset 091b9449c786 (bug 1672072)
Backed out changeset 89d9a12c0737 (bug 1672072)
Backed out changeset 9cb71fd4b43b (bug 1672072)
Backed out changeset 09adad7416e1 (bug 1672072)
Backed out changeset 9905650335ef (bug 1672072)
Backed out changeset 6f1d99e9c3a1 (bug 1672072)
Backed out changeset b59655b7a595 (bug 1672072)
Backed out changeset 1ef9d6d10508 (bug 1672072)
Backed out changeset fbf0b5117655 (bug 1672072)
Backed out changeset 65cd3b9de5c6 (bug 1672072)
2020-11-13 06:13:22 +02:00
Jean-Yves Avenard 7a6315ba80 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-12 22:53:31 +00:00
John Lin 8df836d803 Bug 1640416 - p4: use assignment operator rather than Maybe::emplace(). r=alwu
Calling emplace() on instance with existing value will cause assertion.
Since Error() can be called multiple times, assignment operator is the correct way.

Differential Revision: https://phabricator.services.mozilla.com/D94463
2020-11-04 21:57:38 +00:00
John Lin 242224eb4b Bug 1640416 - p2: sanity-check video encoder config size arguements. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D94510
2020-11-04 21:57:41 +00:00
Dan Glastonbury 665d2ab6f5 Bug 1595994 - P3: Only create PDMs that are supported in the current process. r=kamidphish
Depends on D52797

Differential Revision: https://phabricator.services.mozilla.com/D54876
2020-10-20 23:24:27 +00:00
Bryce Seager van Dyk 6e2d1d8482 Bug 1618529 - Store clear crypto subsample info in uint32 rather than uint16. r=jolin
This avoids us risking an overflow when we convert encrypted media with
subsamples to AnnexB (since that conversion can grow the clear sizes of the
sample). See the test in the preceding patch for an example of how and why this
happens.

Differential Revision: https://phabricator.services.mozilla.com/D92300
2020-10-05 18:17:06 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Jean-Yves Avenard 5be22726b0 Bug 1650696 - P4. Remove the expectation for a MediaDataDecoder to work on a specified TaskQueue. r=jolin
It will now be up to the caller to determine where the decoder is going to run. This allows to simplify the audio decoders so that they can run synchronously and be wrapped in a Wasm sandbox (which doesn't support multi-threading)

The structure guarantees that all MediaDataDecoder methods are called on the same thread it's been initialised.

To achieve this, wherever a MediaDataDecoder was created, we wrap it in a MediaDataDecoderProxy that ensures that all methods are running on the given thread.

We keep the behaviour of all methods in all MediaDataDecoder to assert that they are running on the expected thread for diagnostic purposes. It could go in the future.

Video decoders that could block excessingly the thread on which they are called are made to run on their own task queue.
The Apple decoder is mostly entirely asynchronous, with the exception of the drain method which could block.
We exclude the android and omx decoders are the framework they use is 100% asynchronous and already operate on another thread.

Differential Revision: https://phabricator.services.mozilla.com/D86929
2020-08-17 23:52:21 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Aaron Klotz 0894f56add Bug 1637452: Part 11 - Fix JNI includes in dom/media; r=jya
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75374
2020-05-15 17:05:12 +00:00
Nick Alexander 144ad7135d Bug 1448428 - Part 2: Transition "HardwareCodecCapabilityUtils" away from "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
Depends on D58574

Differential Revision: https://phabricator.services.mozilla.com/D58575
2020-05-13 18:11:06 +00:00
Razvan Maries 2fe860484b Backed out 5 changesets (bug 1448428) for build bustages at SocketProcessParent.cpp. CLOSED TREE
Backed out changeset 192294c1413a (bug 1448428)
Backed out changeset da732f0c37d5 (bug 1448428)
Backed out changeset c48617a975e9 (bug 1448428)
Backed out changeset 92ca5adb7eb3 (bug 1448428)
Backed out changeset 3a3c734343f3 (bug 1448428)
2020-05-13 02:20:24 +03:00
Nick Alexander 212dc32562 Bug 1448428 - Part 2: Transition "HardwareCodecCapabilityUtils" away from "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
Depends on D58574

Differential Revision: https://phabricator.services.mozilla.com/D58575
2020-05-12 23:04:59 +00:00
John Lin 40f6a18be6 Bug 1615930 - don't immediately flush Java decoder after draining. r=jya
In current implementation of Drain(), we use the Flush() method of remote
decoder to restart it so that the decoder can accept new input again. This
will force the decoder to drop all internal buffers, including those that
are not rendered yet. Since Flush() is called after Drain(), there is no need
to do that internally.

Differential Revision: https://phabricator.services.mozilla.com/D63912

--HG--
extra : moz-landing-system : lando
2020-03-01 12:38:29 +00:00
Aaron Klotz c324165018 Bug 1610678: Follow-up 2 - build fix for AndroidDecoderModule.cpp; r=bustage CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com//D60729

--HG--
extra : histedit_source : 0149af6ee8f5667c63b3082cd10b0dc40535b6e7
2020-01-22 21:20:09 +02:00
Aaron Klotz c4f1b7b2d0 Bug 1608577: Part 1 - Remove |using namespace mozilla::java| from dom/media; r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D59796

--HG--
extra : moz-landing-system : lando
2020-01-13 22:04:02 +00:00
Martin McNickle f6f5fae1d0 Bug 1349658 - Add support for IEEE Float encoded wav files. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D59520

--HG--
extra : moz-landing-system : lando
2020-01-14 15:41:10 +00:00
John Lin 7c920d7905 Bug 1602996 - assert if Android decoder is used after shutdown. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D59194

--HG--
extra : moz-landing-system : lando
2020-01-09 06:22:19 +00:00
John Lin 8f7d3c7b5b Bug 1599799 - p1: check Java encoder existence before processing output. r=jya
Java callback runs on Android binder thread and can be preempted by
encoder task queue so that ProcessOutput() is queued after
ProcessShutdown(). Discard the output when that happens.

Differential Revision: https://phabricator.services.mozilla.com/D55759

--HG--
extra : moz-landing-system : lando
2019-12-06 05:54:54 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

Differential Revision: https://phabricator.services.mozilla.com/D56440

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
John Lin a7677ba80a Bug 1509316 - p3: transfer image ownership when constructing VideoData. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D45773

--HG--
extra : moz-landing-system : lando
2019-10-09 23:08:31 +00:00
John Lin aeb8b64dbe Bug 1509316 - p1: move composite listening out of VideoData/VideoSink. r=jya,mattwoodrow
On Android, decoded buffers need to be send back to MediaCodec in order to be
rendered and/or recycled. The current mechanism introduced in bug 1299068 only
works for playback(VideoData/VideoSink) but not WebRTC(VideoFrame/VideoOutput).
Move the callback to SurfaceTextureImage because VideoData and VideoFrame both
own that when using MediaCodec, and move the notification to VideoFrameContainer
for both VideoSink and VideoOutput pass frames there for compositing.

Differential Revision: https://phabricator.services.mozilla.com/D45771

--HG--
extra : moz-landing-system : lando
2019-10-09 23:08:12 +00:00
Michael Froman 848b82fa19 Bug 1583997 - prefer ffvpx mp3 decoding on android. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D47674

--HG--
extra : moz-landing-system : lando
2019-10-08 22:44:07 +00:00
Nick Alexander c46ec74815 Bug 1580356 - Remove Fennec (Firefox for Android). r=snorp,mshal
This does many things:

1) stops producing (and consuming) `FennecJNI*` JNI wrappers
2) removes the :app and :thirdparty Gradle projects
3) removes relevant pieces of the Gradle target configuration
4) updates lints
5) purges old configurations

After this commit, the `mobile/android` project/application builds
only GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D46536

--HG--
extra : moz-landing-system : lando
2019-10-04 20:55:11 +00:00
Dorel Luca c18b81f79f Backed out 3 changesets (bug 1509316) for MDA failures on dom/media/tests/mochitest/test_peerConnection_captureStream_canvas_2d.html
Backed out changeset d64c35b9c211 (bug 1509316)
Backed out changeset 817f14af91f0 (bug 1509316)
Backed out changeset b4bee18bb499 (bug 1509316)
2019-09-27 23:31:51 +03:00
John Lin 331d29e410 Bug 1509316 - p3: transfer image ownership when constructing VideoData. r=jya
Depends on D45772

Differential Revision: https://phabricator.services.mozilla.com/D45773

--HG--
extra : moz-landing-system : lando
2019-09-14 00:23:37 +00:00
John Lin 01cc36b53b Bug 1509316 - p1: move composite listening out of VideoData/VideoSink. r=jya,mattwoodrow
On Android, decoded buffers need to be send back to MediaCodec in order to be
rendered and/or recycled. The current mechanism introduced in bug 1299068 only
works for playback(VideoData/VideoSink) but not WebRTC(VideoFrame/VideoOutput).
Move the callback to SurfaceTextureImage because VideoData and VideoFrame both
own that when using MediaCodec, and move the notification to VideoFrameContainer
for both VideoSink and VideoOutput pass frames there for compositing.

Differential Revision: https://phabricator.services.mozilla.com/D45771

--HG--
extra : moz-landing-system : lando
2019-09-27 03:01:49 +00:00
John Lin 17e9f72cc3 Bug 1580600 - rename setRates() to setBitrate() and pass the value in bps. r=jya
Depends on D45775

Differential Revision: https://phabricator.services.mozilla.com/D45776

--HG--
extra : moz-landing-system : lando
2019-09-13 23:38:32 +00:00
John Lin 92ce0226c3 Bug 1570337 - p7: fix build error/warning for UNIFIED_SOURCES. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D44588

--HG--
extra : moz-landing-system : lando
2019-09-12 18:19:31 +00:00
John Lin 1083967985 Bug 1570337 - p4: implement Android encoder. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D43687

--HG--
extra : moz-landing-system : lando
2019-09-12 18:19:08 +00:00
Narcis Beleuzu 18c3932ccd Backed out 7 changesets (bug 1570337) for bustages on AndroidDataEncoder.h . CLOSED TREE
Backed out changeset 3fac005abec8 (bug 1570337)
Backed out changeset 46ac027113e1 (bug 1570337)
Backed out changeset ef026d642642 (bug 1570337)
Backed out changeset 1fee7e3711e8 (bug 1570337)
Backed out changeset f98eb813a0e5 (bug 1570337)
Backed out changeset 5f22b364fffa (bug 1570337)
Backed out changeset 28c59c800b76 (bug 1570337)
2019-09-12 04:56:40 +03:00
John Lin 2f38ebe390 Bug 1570337 - p7: fix build error/warning for UNIFIED_SOURCES. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D44588

--HG--
extra : moz-landing-system : lando
2019-09-11 15:12:02 +00:00
John Lin a685ec4ca4 Bug 1570337 - p4: implement Android encoder. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D43687

--HG--
extra : moz-landing-system : lando
2019-09-11 15:12:56 +00:00
Noemi Erli d738ac5bf2 Backed out 5 changesets (bug 1570337) for breaking Android builds in AndroidEncoderModule.cpp CLOSED TREE
Backed out changeset 36f045ffd19f (bug 1570337)
Backed out changeset 1c7be21d77b9 (bug 1570337)
Backed out changeset ca5a747f59d9 (bug 1570337)
Backed out changeset 1d0871b5c1d6 (bug 1570337)
Backed out changeset 9ee134756e92 (bug 1570337)
2019-09-04 00:48:54 +03:00
John Lin 2a315b6575 Bug 1570337 - p3: implement Android encoder. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D43687

--HG--
extra : moz-landing-system : lando
2019-08-31 00:24:47 +00:00