Commit Graph

77 Commits

Author SHA1 Message Date
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Jean-Yves Avenard
cf0ff88211 Bug 1512456 - P1. Don't use GenericPromise with MediaSink. r=alwu
The VideoSink shares the AudioSink's own EndedPromise to notify its user that it has ended. As such, the MozPromise used must be non-exclusive.
Using the GenericPromise for such purpose only hid that requirement.

We also remove the MediaSink from the media namespace, and clarify the naming of some arguments and class members to accurately describe what they do.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 10:44:51 +00:00
Nathan Froyd
b0bda317b7 Bug 1507922 - make ownership of MetadataTags more clear in the ogg code; r=gerald,jya
Use UniquePtr for return types, so it's obvious who has ownership.
2018-11-20 10:10:31 -05:00
Sylvestre Ledru
804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

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

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Jean-Yves Avenard
f44bc2efdb Bug 1409664 - P6. Remove flac in ogg preference. r=bryce
Summary:
Let's always enable it.

Depends on D1618

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1619
2018-07-03 11:45:17 -07:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Nicholas Nethercote
51f2b494ea Bug 1448222 - Remove MediaPrefs. r=jya
This patch converts all the prefs in MediaPrefs to the new StaticPrefs system.

Note that the "media.wmf.skip-blacklist" pref was present in both MediaPrefs
and gfxPrefs. The copy in MediaPrefs was never used; this explains why this
patch does not add an entry for it to StaticPrefList.h.

Note also that the patch removes themedia.rust.mp4parser pref, because it's
unused.

MozReview-Commit-ID: IfHP37NbIjY

--HG--
extra : rebase_source : df84ea813b7c366d7be663c696891325610149c8
2018-03-20 09:48:56 +11:00
JW Wang
5efcbcb3a8 Bug 1427932. P2 - fix the calculation of |endTime|. r=jya
MozReview-Commit-ID: 2a8FxMdgM8e

--HG--
extra : rebase_source : a287b19c5c2d6d3c5a2fb454c14b390f60e63667
extra : source : 49211ab256d7742cf83b16e6a2fa6ed3d53f1b46
2018-01-04 11:10:19 +08:00
JW Wang
b23b5d2214 Bug 1427932. P1 - replace NS_ASSERTION with MOZ_ASSERT to catch more bugs. r=jya
MozReview-Commit-ID: H5SNFz956nG

--HG--
extra : rebase_source : 8ee27dabc1cda0b4001464a1d78705aa2a306cd5
extra : source : ab0dab8a566c0090dd900a9fbcdd97cc7b622cbc
2018-01-04 11:09:54 +08:00
Gurzau Raul
5ec8060d2b Backed out 2 changesets (bug 1427932) for failures on tests/browser/chrome/test_media_playback.html r=backout on a CLOSED TREE
Backed out changeset fbae5269d99a (bug 1427932)
Backed out changeset 8b7cc135f1a5 (bug 1427932)
2018-01-10 11:08:57 +02:00
JW Wang
d7381b7711 Bug 1427932. P2 - fix the calculation of |endTime|. r=jya
MozReview-Commit-ID: 2a8FxMdgM8e

--HG--
extra : rebase_source : a287b19c5c2d6d3c5a2fb454c14b390f60e63667
extra : source : 49211ab256d7742cf83b16e6a2fa6ed3d53f1b46
2018-01-04 11:10:19 +08:00
JW Wang
02d2fed70e Bug 1427932. P1 - replace NS_ASSERTION with MOZ_ASSERT to catch more bugs. r=jya
MozReview-Commit-ID: H5SNFz956nG

--HG--
extra : rebase_source : 8ee27dabc1cda0b4001464a1d78705aa2a306cd5
extra : source : ab0dab8a566c0090dd900a9fbcdd97cc7b622cbc
2018-01-04 11:09:54 +08:00
JW Wang
7faefe8a6c Bug 1428682 - set MediaData::mOffset properly in OggDemuxer. r=jya
mOffset is important for MediaCache to evaluate the playback rate in bytes for
a live stream. Failing to set this field (initially 0) will cause MediaCache to
assume very low playback rate (in bytes) and not to download enough bytes for
decoder to consume without underflow.

This issue is manifested by bug 1427527 where a live ogg stream is played.

MozReview-Commit-ID: JiaXtpWCl09

--HG--
extra : rebase_source : af5928fd616058d4cbe1679e4ed2149641795b89
extra : intermediate-source : e31743f828f783845ad13fbbb23fb0b6af8ccb45
extra : source : 4ea2a67444f783724d9151be4f08878b50895a54
2018-01-08 10:21:59 +08:00
Alastor Wu
0963f88b98 Bug 1417300 - store mDecodedAudioDuration before adjusting sample time. r=jya
mDecodedAudioDuration should only save unadjusted timestamp, or it would
cause next adjustment to be incorrect.

MozReview-Commit-ID: 7grtYs075p0

--HG--
extra : rebase_source : ad146e7c34b6154629c1ff98992d5c0209d3ef80
2017-12-11 00:03:51 +08:00
Gerald Squelart
c5aeab4f69 Bug 1407810 - Use DDMOZ_LOG in media stack - r=jwwang
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.

MozReview-Commit-ID: IeJJmzYqWMQ

--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
2017-10-13 16:31:59 +11:00
Gerald Squelart
1b357db99b Bug 1407810 - Use DDLogger in media stack - r=jwwang
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
  DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
  classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
  machine -> reader -> demuxer -> resource, etc.

And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)

More will be added later on, from just converting MOZ_LOGs, and as needed.

MozReview-Commit-ID: KgNhHSz35t0

--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
2017-10-10 17:55:27 +11:00
Alastor Wu
50105cec03 Bug 1417300 - adjust sample time before calculating the total decoded duration. r=jya
We do not want to perform the adjustment of the timestamp after reading the ogg
chain but before. Otherwise the parent's mDecodedAudioDuration would be adjusted
causing the sample's time to be twice the value it should be.

MozReview-Commit-ID: 50VrOCzrwFg

--HG--
extra : rebase_source : 48b1efecb138ca7fa0e4c0584e21be1b6850cce3
2017-12-01 10:54:13 +08:00
Gerald Squelart
b0442493e5 Bug 1405531 - Remove unused MediaDataDemuxer::HasTrackType - r=jwwang
The only actual code use in MediaSourceDemuxer can trivially be folded into
its caller GetNumberTracks in the same class.

MozReview-Commit-ID: E6zh98zmJwJ

--HG--
extra : rebase_source : 9358dc37523d6cd7c1a4d5ec62a790db6a092063
2017-10-04 11:40:29 +11:00
Alastor Wu
a08c8019d2 Bug 1398139 - part2 : adjust sample's start time for chained ogg. r=jya
For chained ogg files, the new part would contain new timestamp from zero, so
we need to add the duration of previously decoded data to make sure the current
time is correct.

MozReview-Commit-ID: Bb1lCiKz4uQ

--HG--
extra : rebase_source : 5cfd81eb092a042e6394aa5209516ad75e741a37
2017-09-15 18:05:10 +08:00
Chris Pearce
2317493000 Bug 1388288 - Make Flac and Ogg decoders build in non-Unified mode. r=jya
FLAC_MAX_CHANNELS is used in FlacDemuxer and in FrameParser, so move it,
and all the other FLAC_{MIN,MAX}* #defines to FrameParser.h. The other
defines don't technically need to be there, but it's nicer to have them
all defined together.

MozReview-Commit-ID: LVZzXvBSvMq

--HG--
extra : rebase_source : 1c8e5c111232856ef5589f214c00d510ece9af00
2017-08-08 15:46:37 +08:00
Bevis Tseng
a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
JW Wang
30093548fb Bug 1378295. P6 - remove AbstractMediaDecoder and fix includes. r=jya
MozReview-Commit-ID: xN1Ywo9VDY

--HG--
extra : rebase_source : 9aee1697b5299e43eb35450a20015c08a11bdea6
extra : intermediate-source : 3095884f04356d0d2c3c34843098a0a8b23211b8
extra : source : ef0f7e5300060b7888b961596a32a8fbf483ebd2
2017-07-13 17:39:42 +08:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book
8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey
6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey
4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Mats Palmgren
0b07470173 Bug 1372012 - Remove redundant hashtable Contains calls before Get. r=froydnj
MozReview-Commit-ID: 1RC4HY6Hya9
2017-06-14 16:11:21 +02:00
JW Wang
f2ea37e57b Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i

--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
2017-04-17 16:35:04 +08:00
JW Wang
302d82c85a Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
MozReview-Commit-ID: 4bVeqIuWO2O

--HG--
extra : rebase_source : d504ac15a6dc59ad42f3ab80faf23f629d74315f
extra : intermediate-source : 6e52995b6c8146451d98dffc62f6907755dc856e
extra : source : 82d2649cdafb5a6389f6858c23578811933580c9
2017-04-14 17:13:36 +08:00
JW Wang
3c0e7bddc7 Bug 1356502. P1 - let MediaDatra::GetEndTime() return a TimeUnit instead of ambiguous int64_t. r=gerald
MozReview-Commit-ID: DBQELBs32Ad

--HG--
extra : rebase_source : a7c9f7affbdfa12aaf94a6d0505cf4f54f4408cc
extra : intermediate-source : e1fcccdb12bb86c23520b5c2e0d76aef355597a5
extra : source : ddb8a8382c74e18dd52cdfbc7e8eee54cf46f05d
2017-04-14 14:14:08 +08:00
JW Wang
f45fa7374e Bug 1355740 - Change the type of TrackInfo::mDuration to TimeUnit. r=jya
MozReview-Commit-ID: P7aqw4d5Vk

--HG--
extra : rebase_source : f22743fec9c8b70cbb092e3b26e252e7a4cb0b31
extra : source : 2413cd58f073b734a2cb85cec3658942bfd46e08
2017-04-12 16:41:36 +08:00
Kaku Kuo
c4c19bf3c4 Bug 1351522 - Label runnables in dom/media/ogg/OggDemuxer.cpp; r=jwwang
MozReview-Commit-ID: 8dIioCvfiJk

--HG--
extra : rebase_source : 6f35f1fffad6674623afb778de286f0a58b1e41c
2017-03-29 10:26:09 +08:00
Michael Layzell
4ed3440974 Bug 1336510 - Part 6: Avoid AddRefing/Releasing CamerasChild on the wrong thread, r=jwwang
MozReview-Commit-ID: 8b5KK7sL6wb
2017-02-24 14:34:26 -05:00
Michael Layzell
cab1a9949b Bug 1336510 - Part 4: Capture a strong reference to this in dom/media, r=jwwang
MozReview-Commit-ID: 4lVGrGzhVXh
2017-02-24 14:34:23 -05:00
Wes Kocher
7e8f316730 Backed out 8 changesets (bug 1336510) for windows debug mn-e10s failures a=backout
Backed out changeset 419ada2f9e81 (bug 1336510)
Backed out changeset 19239f566a93 (bug 1336510)
Backed out changeset c8aeead6fe83 (bug 1336510)
Backed out changeset 422e63b872b5 (bug 1336510)
Backed out changeset 21869174dfd3 (bug 1336510)
Backed out changeset 57476b9f342d (bug 1336510)
Backed out changeset e842cdaaa7e5 (bug 1336510)
Backed out changeset bd943b368ff7 (bug 1336510)

MozReview-Commit-ID: 2z3Wa9QFkX4
2017-02-23 16:07:41 -08:00
Michael Layzell
4067f0d367 Bug 1336510 - Part 6: Avoid AddRefing/Releasing CamerasChild on the wrong thread, r=jwwang
MozReview-Commit-ID: 8b5KK7sL6wb
2017-02-23 12:24:12 -05:00
Michael Layzell
1d0870e2e1 Bug 1336510 - Part 4: Capture a strong reference to this in dom/media, r=jwwang
MozReview-Commit-ID: 4lVGrGzhVXh
2017-02-23 12:24:12 -05:00
Wes Kocher
8c4ce17711 Merge inbound to m-c a=merge
MozReview-Commit-ID: DCUf7VEDrTt
2017-02-17 13:38:51 -08:00
Vedant Sareen
7d4bd52fae Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter
Changed |print("enum ID : uint32_t {", file=output)| to |print("enum HistogramID : uint32_t {", file=output)| at line 53 of the file |toolkit/components/telemetry/gen-histogram-enum.py|, and then replaced all the textual occurrences of |Telemetry::ID| to |Telemetry::HistogramID| and |ID| to |HistogramID| in 43 other files.
2017-02-16 00:45:15 +05:30
Wes Kocher
9738f2b4f7 Backed out 5 changesets (bug 1336510) for mass bustage a=backout CLOSED TREE
Backed out changeset 35d16d04d67d (bug 1336510)
Backed out changeset 41db22e0c13d (bug 1336510)
Backed out changeset 2075037694ed (bug 1336510)
Backed out changeset 71be73be6c4e (bug 1336510)
Backed out changeset 02ccacdbbb93 (bug 1336510)

MozReview-Commit-ID: Lx2kKu7JVvI
2017-02-15 13:40:12 -08:00
Michael Layzell
2b5e4ffefa Bug 1336510 - Part 4: Capture a strong reference to this in dom/media, r=jwwang
MozReview-Commit-ID: 4lVGrGzhVXh
2017-02-15 15:32:44 -05:00
Jean-Yves Avenard
36471a6bc1 Bug 1336431: P4. Rename SharedTrackInfo. r=gerald
into TrackInfoSharedPtr to better indicate what this class is about.
Adding cast operator to allow transparent conversion from TrackInfoSharedPtr to const TrackInfo*

MozReview-Commit-ID: 6RwXl5CG0fG

--HG--
extra : rebase_source : b5a7a0f06793c609e2eab60aacc4f76d96d6ec32
2017-02-13 19:18:05 +01:00
Tom Tromey
5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
JW Wang
a48f080485 Bug 1338023. Part 5 - let OggCodecState::DecodeHeader() take a OggPacketPtr instead of a raw pointer to clarify memory ownership. r=gerald
MozReview-Commit-ID: 925fgdsSIdo

--HG--
extra : rebase_source : e679445ed99c54327d1fa471135b2bc3aabb8ff4
extra : intermediate-source : e11c7ffff86afa33b3a7db11dc8091240df9d615
extra : source : b82531d5edf3593625c2e86c1a2ebe3e7e8282ff
2017-02-09 13:52:41 +08:00
JW Wang
bb946739d4 Bug 1338023. Part 4 - let OggPacketQueue process OggPacketPtr instead of raw pointers to clarify memory ownership. r=gerald
MozReview-Commit-ID: Atw3Uf5rLRW

--HG--
extra : rebase_source : 1985361b5bd90d95492751dba08e822aeb7ad0d1
extra : intermediate-source : 2f82cc9d6ca6d86b5d5ab6cddda935e08dd9d457
extra : source : 6315ec4bbb709bc885a153ae15c2c382412161f7
2017-02-09 13:20:01 +08:00
Jean-Yves Avenard
55981c9141 Bug 1325707: P1. Check returned value. r=gerald
This is really just for cleanliness perspective, as it can never happen, we always check that demuxing a packet succeeded first.

MozReview-Commit-ID: FQ1yz16m9Ix

--HG--
extra : rebase_source : 722ab3a828cadb07022a95b3ae456ef09781e61d
2017-02-07 08:55:28 +01:00
Bevis Tseng
f2bdbd8fd1 Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
MozReview-Commit-ID: 9yJi3iDtVZG

--HG--
extra : rebase_source : 39c720ccc576ed9247b5e8abb70d99d7873b3ad6
2016-11-29 13:03:36 +08:00
Jean-Yves Avenard
a993bff5b3 Bug 1322070: P8. Remove unused methods and types. r=gerald
MozReview-Commit-ID: 8azYJd98T5o

--HG--
extra : rebase_source : c0b9837292469949d7675fc1dd85a43e1cf4ec1d
2016-12-08 08:38:04 -10:00
Jean-Yves Avenard
6c996c69b5 Bug 1322070: P7. Construct VideoInfo object from Theora CodecState. r=gerald
MozReview-Commit-ID: E4gR2Ff7qo

--HG--
extra : rebase_source : c91d8912608e70016affd5de6cbdda6bb9216b8b
2016-12-11 16:54:19 -10:00