Commit Graph

1535 Commits

Author SHA1 Message Date
Michael Froman
0821463d17 Bug 1583986 - add pref to control ffvpx mp3 decoding so we can turn it off if needed. r=bwc,jya
Differential Revision: https://phabricator.services.mozilla.com/D47499

--HG--
extra : moz-landing-system : lando
2019-09-30 14:29:08 +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
Nathan Froyd
970d3a1d9b Bug 1582812 - fix some dom/media/ header cargo-culting; r=mccr8
Both of these files obviously use things from the newly-included
headers, but they were not including them prior to this point.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 20:19:32 +00:00
Bryce Seager van Dyk
7176d97169 Bug 1576990 - Stop the WMF decoder estimating durations on 0 duration samples. r=dminor
Set a trivial duration (1us) on 0 duration samples before feeding them to the
WMF MFT decoder to prevent it from estimating the duration for such samples.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 18:39:43 +00:00
Bryce Seager van Dyk
8547f05b52 Bug 1576990 - Set durations on frames for the WMF decoder. r=dminor
This is a back out of changeset c52127007a01, i.e. reverts bug 1560440. That bug
was itself reverting a prior bug where we started setting the duration.

There are two scenarios involved, each with their own issues:
- We don't set the duration when feeding the decoder (what we're doing prior to
  this change). In this case the decoder will estimate durations for all
  samples. This works in many cases, but leads to issues with files that have
  non-uniform durations - as seen in bug 1576990 (this bug).
- We do set the duration when feeding the decoder (what will happen after this
  change). In this case the decoder will not estimate durations, except it still
  seems to do so when fed 0 duration samples. Since our demuxing pipeline can
  create 0 duration samples, this leads to issues with such files (as seen in
  bug 1560440).

This patch fixes the former of the above, and the next patch in the chain will
address the latter.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 18:39:33 +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
1f7aded837 Bug 1580597 - p2: set timestamp and duration of the encoded frame. r=jya
Also remove the definition of unused struct for tracking of input timestamp.

Depends on D45774

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

--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
John Lin
602e27f76e Bug 1570337 - p3: extract method for reuse. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D45109

--HG--
extra : moz-landing-system : lando
2019-09-12 18:19:00 +00:00
John Lin
4c35be9c69 Bug 1570337 - p2: extend and expose H.264 utility functions. r=jya
Some existing functions that manipulates H.264 bitstream already cover
most of the efforts for converting Android encoder output. With some minor
changes, they can be called by the encoder to avoid code duplications.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 18:18:51 +00:00
John Lin
3000d5dcd1 Bug 1570337 - p1: singletonize sPEMLog. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D43685

--HG--
extra : moz-landing-system : lando
2019-09-12 18:18:37 +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
John Lin
c5359b0a30 Bug 1570337 - p3: extract method for reuse. r=jya
Depends on D43686

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

--HG--
extra : moz-landing-system : lando
2019-09-11 15:10:47 +00:00
John Lin
40f3a64d52 Bug 1570337 - p2: extend and expose H.264 utility functions. r=jya
Some existing functions that manipulates H.264 bitstream already cover
most of the efforts for converting Android encoder output. With some minor
changes, they can be called by the encoder to avoid code duplications.

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

--HG--
extra : moz-landing-system : lando
2019-09-11 15:12:56 +00:00
John Lin
5783d6db2d Bug 1570337 - p1: singletonize sPEMLog. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D43685

--HG--
extra : moz-landing-system : lando
2019-09-06 22:30:46 +00:00
alwu
677f012080 Bug 1579136 - do not read content from null NAL. r=jya
Dealing with a case where `DecodeNALUnit()` returns nullptr which we should not try to create bit reader and decode anything.

In addition, wrap these logic to `DecodedISlice()` in order to keep consistent with a case where we decode SEI.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 20:11:22 +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
John Lin
c0c0d0e714 Bug 1570337 - p2: extend and expose H.264 utility functions. r=jya
Some existing functions that manipulates H.264 bitstream already cover
most of the efforts for converting Android encoder output. With some minor
changes, they can be called by the encoder to avoid code duplications.

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

--HG--
extra : moz-landing-system : lando
2019-08-31 00:21:07 +00:00
John Lin
04a8aad2d9 Bug 1570337 - p1: singletonize sPEMLog. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D43685

--HG--
extra : moz-landing-system : lando
2019-08-31 00:20:04 +00:00
Alastor Wu
4ec8d0a594 Bug 1539182 - check slice type to decide frame type. r=jya
Sometime we would encouter a file putting all its samples on the type1 NAL, so we have to check its slice type in order to know if it's a keyframe or not.

The slice type is defined in the ITU-T Rec H.264 table 7.3, and it could be found in the slice_header in table 7.3.3.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 01:08:09 +00:00
Sylvestre Ledru
759eed09b4 Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in dom/media r=jya
Depends on D43776

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

--HG--
extra : moz-landing-system : lando
2019-08-30 05:44:13 +00:00
Alastor Wu
9bd4a96457 Bug 1568101 - part5 : implement encoding. r=jolin,jya
In order to encode video frame, we have to convert `webrtc::VideoFrame` to gecko's video data, and then send this YUV-based video data to the encoder.

The encoder won't return an encoded frame everytime when we call its `encode()`, so we have to wait until there are valid samples added to `mEncodedFrames`.

Then, convert the `MediaRawData` to `webrtc::EncodedImage` and provide an NAL entries list to indicate where the NALs are in the encoded bytes stream and how large they are. We would send those data back
to the consumer of the encoder via calling a callback function `OnEncodedImage()`.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 07:41:33 +00:00
John Lin
0951fc6fdd Bug 1571127 - p1: retain input image until CVPixelBuffer is released. r=jya
Input could be released during encoding if not retained.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 12:27:12 +00:00
Markus Stange
0d99ec9a50 Bug 1573668 - Use CFTypeRefPtr for managing the IOSurfaceRef in MacIOSurface. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41843

--HG--
extra : moz-landing-system : lando
2019-08-14 14:53:45 +00:00
Markus Stange
c31b8d8a28 Bug 1573668 - Use the real IOSurfaceRef type in MacIOSurface. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41841

--HG--
extra : moz-landing-system : lando
2019-08-14 14:50:25 +00:00
Markus Stange
979634bacb Bug 1565717 - Remove all dynamic loading of IOSurface functions. r=mattwoodrow
These functions were made public in 10.6. The oldest version we support is 10.9.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 11:06:22 +00:00
Markus Stange
584d4c6a82 Bug 1565717 - Remove dynamic lookup of the kIOSurface constants. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41812

--HG--
extra : moz-landing-system : lando
2019-08-14 11:05:47 +00:00
Markus Stange
75ec9254b7 Bug 1565717 - Don't use dynamic symbol lookup for CVPixelBufferGetIOSurface. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41811

--HG--
extra : moz-landing-system : lando
2019-08-14 11:05:24 +00:00
John Lin
22c051e31f Bug 1565838 - don't check timestamp of EOS samples. r=jya
Bug 1540748/D28167 checks the output sample timestamp against the
time parsed by demuxer to determine the validness. However, unlike
Android builtin MP3 decoder which sets EOS flag in the final valid
output, the Samsung MP3 decoder always emit additional EOS sample
with invalid timestamp. To address this, the timestamp check should
be ignore for EOS samples.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 15:47:52 +00:00
John Lin
656842376a Bug 1571586 - p3: return proper error when initializating. r=jya
Depends on D41106

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

--HG--
extra : moz-landing-system : lando
2019-08-13 04:51:33 +00:00
John Lin
752f10f4e3 Bug 1571586 - p2: set realtime properties when initializing. r=jya
With minor code cleanup.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 22:51:54 +00:00
John Lin
8dd4e83f54 Bug 1571586 - p1: cast bitrate to correct type and set it when initializing. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D41105

--HG--
extra : moz-landing-system : lando
2019-08-08 22:55:12 +00:00
Michael Froman
ec71e08cf2 Bug 1567389 - change OpusDataDecoder to check for CreateDecoderParams::Option::DefaultPlaybackDeviceMono instead of calling IsDefaultPlaybackDeviceMono(). r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D41113

--HG--
extra : moz-landing-system : lando
2019-08-08 19:17:27 +00:00
Alastor Wu
2ae05955ab Bug 1571051 - part4 : use Cb buffer in the second plane. r=jolin
The second plane should store data of the Cb buffer's value, not the Cr's.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:54:02 +00:00
Alastor Wu
e1447216a6 Bug 1571051 - part3 : mark MediaRawData as a keyframe. r=jolin
If the encoded frame is a keyframe, we should also mark the MediaRawData which would contain the data from this encoded frame as a keyframe.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:53:34 +00:00
Alastor Wu
f839b3c72d Bug 1571051 - part2 : keep CodecSpecific const when doing the std::forward. r=jolin
As we are not going to modify the CodecSpecific, it should keep const when we forward it.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:53:12 +00:00
Alastor Wu
6c24473bca Bug 1571051 - part1 : use thread safe refcounting for PlatformEncoderModule. r=jolin
We don't have a contraint for using PlatformEncoderModule in the specific thread only, so we should use thread-safe refcounting for it, like PlatformDecoderModule.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:52:49 +00:00
Dan Minor
082a390c61 Bug 1356046 - Remove expired media telemetry; r=jya,alwu,bryce
This removes all telemetry which expired in Firefox 69 or earlier, with the
exceptions of the following, which we plan to renew:
* AUDIO_TRACK_SILENCE_PROPORTION
* MEDIA_AUTOPLAY_WOULD_BE_ALLOWED_COUNT
* MEDIA_AUTOPLAY_WOULD_NOT_BE_ALLOWED_COUNT
* MEDIACACHESTREAM_LENGTH_KB
* MEDIA_MKV_CANPLAY_REQUESTED
* MEDIA_PAGE_COUNT
* MEDIA_PAGE_HAD_MEDIA_COUNT
* VIDEO_DROPPED_FRAMES_PROPORTION
* VIDEO_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE
* VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE
* VIDEO_INTER_KEYFRAME_AVERAGE_MS
* VIDEO_INTER_KEYFRAME_MAX_MS
* VIDEO_SUSPEND_RECOVERY_TIME_MS
* VIDEO_VP9_BENCHMARK_FPS
* WEB_AUDIO_BECOMES_AUDIBLE_TIME
* WEBVTT_TRACK_KINDS

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

--HG--
extra : moz-landing-system : lando
2019-08-02 18:17:45 +00:00
arthur.iakab
7aef316861 Backed out changeset b8661a3b5dc2 (bug 1356046) for causing buid bustages on HTMLMediaElement.cpp CLOSED TREE 2019-08-02 19:00:45 +03:00
Dan Minor
a13ff75b20 Bug 1356046 - Remove expired media telemetry; r=jya,alwu,bryce
This removes all telemetry which expired in Firefox 69 or earlier, with the
exceptions of the following, which we plan to renew:
* AUDIO_TRACK_SILENCE_PROPORTION
* MEDIA_AUTOPLAY_WOULD_BE_ALLOWED_COUNT
* MEDIA_AUTOPLAY_WOULD_NOT_BE_ALLOWED_COUNT
* MEDIACACHESTREAM_LENGTH_KB
* MEDIA_MKV_CANPLAY_REQUESTED
* MEDIA_PAGE_COUNT
* MEDIA_PAGE_HAD_MEDIA_COUNT
* VIDEO_DROPPED_FRAMES_PROPORTION
* VIDEO_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME
* VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE
* VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE
* VIDEO_INTER_KEYFRAME_AVERAGE_MS
* VIDEO_INTER_KEYFRAME_MAX_MS
* VIDEO_SUSPEND_RECOVERY_TIME_MS
* VIDEO_VP9_BENCHMARK_FPS
* WEB_AUDIO_BECOMES_AUDIBLE_TIME
* WEBVTT_TRACK_KINDS

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

--HG--
extra : moz-landing-system : lando
2019-08-02 15:37:59 +00:00
Jean-Yves Avenard
577b826128 Bug 1543359 - P13. Let the video decoder determines the default colorspace if unknown. r=mattwoodrow
When unknown, we rely on the picture height and assume that anything less than 720p is 601 and 709 otherwise. It's not perfect but it's the best we can do.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:39 +00:00
Jean-Yves Avenard
b14a14b66a Bug 1543359 - P8. Fill YUV color range information with decoders. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D27239

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:28 +00:00
Jean-Yves Avenard
c4def0fb6f Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow
Still non-functional.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:30 +00:00
Jean-Yves Avenard
bbb33d6106 Bug 1543359 - P4. Add YUV Full Range info to AppleVTDecoder. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D27212

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:33 +00:00