Commit Graph

226 Commits

Author SHA1 Message Date
Andreas Pehrson
9d5b27393d Bug 1453127 - Clear output streams on shutdown. r=jya 2018-05-30 10:44:56 +02:00
Andreas Pehrson
6c6e70fcbc Bug 1453127 - Ensure TrackID uniqueness for captured MediaDecoder. r=jya 2018-05-29 10:21:51 +02: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
Paul Adenot
b7f37d63fd Bug 1457137 - Move instead of copying strings returned from various GetDebugInfo functions for HTMLMediaElement::MozDumpDebugInfo. r=gerald
MozReview-Commit-ID: LbZ0cWe7yb0

--HG--
extra : rebase_source : 31946e6dcfd2f750e16437f5876f29c851698b9f
extra : source : 4fd9b0ce611c4ad4ecbec1aace1777944214212a
2018-04-26 15:57:39 +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
Chris Pearce
2be26b6b7c Bug 1443942 - Move code to toggle high res timers into VideoSink. r=jya
We have code in the MDSM to toggle on high resolution timers on Windows when we
start/stop playing because the VideoSink relies on being awoken by timers to
update the set of current frames in the compositor's queue, and on Windows 7 we
end up dropping frames due to the timer lag without this.

We assert in the MDSM's destructor that we've turned off high res timers (as
they cause needless battery drain, so we only want them on when we need them),
and the new test_mediarecorder_principals is hitting that assert on Windows. I
think we're missing turning them off when we create a new VideoSink for
outputting to the MSG. That affects the value returned by
MediaDecoderStateMachine->mVideoSink->IsPlaying(), which is what we use to
decide whether we should enable high resolution timers. We track whether we've
enabled high res timers in MDSM::mHiResTimersRequested, and that gets out of
sync with IsPlaying() when we re-create the MediaSink.

Rather than trying to handle all the permutations of places where we need to
turn off high resolution timers in the MDSM, we're better to move the code to
toggle high res timers into the VideoSink, as that's actually where we need to
be sure that we have high resolution timers enabled anyway. It's the VideoSink
after all that is relying on timers for frame update, not the MDSM.

Also remove the media.hi-res-timers.enabled pref, as we haven't needed it.

MozReview-Commit-ID: 9dNxcYxPDZH

--HG--
extra : rebase_source : 6e403d59bb5f1dd0241fe8298a823ba08b1670fb
2018-04-06 13:33:28 +12:00
Alex Chronopoulos
851a3ee589 Bug 1431810 - Disable Opus phase inversion on stereo to mono downmix. r=rillian
MozReview-Commit-ID: 5eaSPQzUu9o

--HG--
extra : rebase_source : 126d9faa2824d29fc73cf040b033ca585dfdbcee
2018-03-15 18:28:14 +02:00
Gurzau Raul
1368521911 Backed out 3 changesets (bug 1431810) for failing test_bug1431810_opus_downmix_to_mono.html on Windows
Backed out changeset a01c1941a829 (bug 1431810)
Backed out changeset 43eb1c01c67f (bug 1431810)
Backed out changeset 3fe9d85d684a (bug 1431810)
2018-03-26 12:09:42 +03:00
Alex Chronopoulos
85119eac26 Bug 1431810 - Disable Opus phase inversion on stereo to mono downmix. r=rillian
MozReview-Commit-ID: 5eaSPQzUu9o

--HG--
extra : rebase_source : 126d9faa2824d29fc73cf040b033ca585dfdbcee
2018-03-15 18:28:14 +02:00
Jean-Yves Avenard
f15eea87d5 Bug 1444479 - P5. Let AudioSink deal with unknown layout. r=padenot
MozReview-Commit-ID: F31zNl5o9n1
2018-03-24 10:58:01 +01:00
Jean-Yves Avenard
4680798728 Bug 1432779 - P7. Use typedef rather than actual type. r=padenot
this improve readability.

MozReview-Commit-ID: IYfrLMZ5djX
2018-03-24 10:57:59 +01:00
Jean-Yves Avenard
87fa7068d5 Bug 1432779 - P4. Remove the concept of preferred layout. r=padenot,r=kamidphish
Channel layout is derived by the content being played. The concept of preferred layout is meaningless. Either we have a layout defined, or we don't. There's no in-between.

So we remove it.

MozReview-Commit-ID: CSCAInNmzMS
2018-03-24 10:57:59 +01:00
Jean-Yves Avenard
6c310b818e Bug 1431221 - P11. Configure audio to use desired channel layout. r=padenot
MozReview-Commit-ID: 1wyeCIWohHE
2018-03-24 10:57:56 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Jean-Yves Avenard
a21ef82be7 Bug 1404997 - P14. Rename members to clarify the finish meaning. r=padenot
We have different concept of "finish" between the base class and its hierarchy.
Attempt to clear the sitatuation by renaming the members and related methods.

MozReview-Commit-ID: vFsXhMK5GY

--HG--
extra : rebase_source : 65eda9257e447584161da51af7c240e31027c501
2017-12-06 19:00:22 +01:00
Sylvestre Ledru
9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Nicholas Nethercote
b15805ab71 Bug 1414759 - Replace some unnecessary media prefs with code constants. r=cpearce
Specifically:
- media.decoder.limit
- media.num-decode-threads
- media.resampling.rate
- media.wmf.decoder.thread-count
- media.cache.resource-index

--HG--
extra : rebase_source : a46aa7078b98b4731ec96b66398c51aa6cb42d27
2017-11-13 17:16:06 +11:00
Chris Pearce
8bddf869cf Bug 1416663 - Move Gecko/HTMLMediaElement specific stuff out of VideoFrameContainer. r=jwwang
MozReview-Commit-ID: 4giNMi8qsTZ

--HG--
extra : rebase_source : 0f9e33c3704aa3925635d2290a5e18f9eebd2b74
2017-11-13 16:09:23 +13:00
Chris Pearce
f231fe980b Bug 1414991 - Unified build fixes in media. r=gerald
MozReview-Commit-ID: KjLeQMSxOfO

--HG--
extra : rebase_source : 37b7222bfbadc0836acdeee19ebd82676872b4ea
2017-11-07 12:57:34 +13:00
JW Wang
80e976e596 Bug 1412212. P3 - also dump debug info of AudioSink. r=JamesCheng
MozReview-Commit-ID: AnvlXrhdoI5

--HG--
extra : rebase_source : b4d979dba64ea02e85cac0d9613915441dbadd90
2017-10-27 15:36:24 +08:00
JW Wang
33a2764739 Bug 1412212. P2 - compact the output of GetDebugInfo(). r=JamesCheng
MozReview-Commit-ID: 6cAedI4Ax5r

--HG--
extra : rebase_source : d4162dace6c443fa993863c138855b19c33d7b59
2017-10-27 15:03:36 +08:00
JW Wang
3fef1cee8e Bug 1411476. P4 - rewrite GetDebugInfo() functions to make string concatenation easier. r=gerald
MozReview-Commit-ID: V9cxIZGl8M

--HG--
extra : rebase_source : 10afe3e0e4c7d3d6153ea820d869e192345d755c
2017-10-25 13:13:30 +08:00
JW Wang
ee83cd683f Bug 1400674 - fix the algorithm of filling audio gaps with silence. r=jya
MozReview-Commit-ID: Hjsboq6PdlN

--HG--
extra : rebase_source : b92dbbe184563b71bb9cfc541a310ae60d41d68d
2017-10-13 17:24:24 +08:00
Sebastian Hengst
caa3760fb4 Backed out changeset 0442a3ecb494 (bug 1400674) for failing mda tests dom/media/mediasource/test/test_BufferingWait_mp4.html and test_WaitingOnMissingData_mp4.html. r=backout
--HG--
extra : amend_source : 260df77d213debe033fef9a110fe665f180e50cc
2017-10-16 10:18:06 +02:00
JW Wang
3705c2d6bb Bug 1400674 - P1: fix the algorithm of filling audio gaps with silence. r=jya
MozReview-Commit-ID: Hjsboq6PdlN

--HG--
extra : rebase_source : 639e1f4fcb96b6080133fced25ed304152e515af
2017-10-13 17:24:24 +08:00
Andrea Marchesini
b0b73ddd29 Bug 1388125 - CloneableWithRangeMediaResource for streams implementing nsICloneableInputStreamWithRange, r=jya 2017-09-18 13:34:43 +02:00
Alastor Wu
f2df60108c Bug 1398139 - part1 : revert the changing of bug 1386478. r=jwwang
This changing causes the resampling rate tolerance so that the ME.current time
might not be the same as ME.duration depending on the different resampling rate.

MozReview-Commit-ID: H2dpyw5Bghv

--HG--
extra : rebase_source : 850efb46c7980ec4234e239e38bc7dbb233cd573
2017-09-15 17:07:08 +08:00
Bill McCloskey
fe8e58f308 Bug 1397941 - Fix DecodedStream labeling bug (r=jwwang)
MozReview-Commit-ID: KL5XzLJuWgz
2017-09-11 19:10:59 -07:00
Matthew Gregan
f4d992a821 Bug 1388229 - Remove B2G-only audio stream type handling. r=kamidphish 2017-08-10 13:00:07 +12:00
JW Wang
108a5c3b92 Bug 1386478 - don't cap the return value of GetEndTime(). r=jya
A chained ogg file contains multiple streams and timestamps will not
monolithically increase. The current code will cap AudioEndTime()
to the end time of the 1st stream and currentTime won't be updated
correctly when playback position reaches the 2nd stream or later ones.

http://searchfox.org/mozilla-central/rev/bbc1c59e460a27b20929b56489e2e55438de81fa/dom/media/MediaDecoderStateMachine.cpp#3636-3637

MozReview-Commit-ID: DbIspYmEjVv

--HG--
extra : rebase_source : 20004ae6c6d4e15dc8aeebf646efc62342514d24
2017-08-02 10:45:48 +08:00
Kartikaya Gupta
ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
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
2017-07-26 16:03:57 -04:00
bechen
d972107cee Bug 1374189 - Call NotifyPresentedFrame when resolve the mEndPromiseHolder promise. r=jwwang
MozReview-Commit-ID: Le4VER7kK2Y

--HG--
extra : rebase_source : 3b46eb752a59e4eaa2dc99b09287938c008668c8
2017-07-14 10:04:22 +08:00
JW Wang
147505b83d Bug 1375922 - don't send frames to the compositor if the 1st one is a future frame. r=cpearce
A/V sync will be broken for the compositor will render the 1st frame
immediately without considering its timestamp.

MozReview-Commit-ID: 6j7GLccrFcX

--HG--
extra : rebase_source : 924a2404d8d944262d1f8744794a072c051ac556
extra : source : 1e254ff8491084b66dfebbb2e1be03790c95ed11
2017-07-03 11:51:39 +08:00
Paul Adenot
404c800005 Bug 1341555 - Consolidate use of the MSG's AbstractMainThread, and stop having AbstractMainThread on MediaStreams. r=pehrsons
MozReview-Commit-ID: 5hGDQcfpH6a

--HG--
extra : rebase_source : 41bb678f37cfcdbc9912a25f45a5ca488084aabe
2017-06-29 11:30:57 -07: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
JW Wang
80c9f230f3 Bug 1359715 - let functions in MediaData.h take TimeUnit instead of int64_t. r=kaku
We want to replace the use of int64_t for microseconds by TimeUnit
whenever possible since int64_t is ambiguous which could be microseconds
or milliseconds.

MozReview-Commit-ID: LRz9d4yKBYJ

--HG--
extra : rebase_source : 1f73f1f338142b3183491d04726821a881ccabbe
extra : intermediate-source : 88e167b7b06303d10d92cd5317502f405d1c553e
extra : source : 98deb30ec93d395f9951f5fc488170ae35e29675
2017-04-24 17:33:05 +08: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
621abf8866 Bug 1351586 - AudioSink constructor should take a const reference instead of value of TimeUnit. r=kaku
MozReview-Commit-ID: F95iIsVealk

--HG--
extra : rebase_source : 35eec737a2f4a8f94020536a337e90ccb7e82542
extra : source : fbd5a87403a3a80ff50685988289589bbf6c913c
2017-04-12 16:43:05 +08:00
JW Wang
971547c1c9 Bug 1350826 - Replace use of int64_t for microseconds by TimeUnit in MediaSink and its sub-classes. r=kaku
MozReview-Commit-ID: 2gCOmYLc0OO

--HG--
extra : rebase_source : 8c4fc23343c75d877407180106ed694bfea6bf4f
extra : source : 43b30977fd425705db7231ba1b9c2a3649369f12
2017-03-27 14:55:05 +08:00
JW Wang
548607df76 Bug 1350819 - Replace use of int64_t for microseconds by TimeUnit in VideoSink. r=kaku
MozReview-Commit-ID: DAx0p7x2RLx

--HG--
extra : rebase_source : 0183ab4991e9faebe2a9962ca8c438292f98c8b8
extra : source : f97d47c5a01054f0b0f0ab87caac6eaa4c958905
2017-03-27 14:35:42 +08:00
JW Wang
24fdfb8a84 Bug 1350815 - Replace use of int64_t for microseconds by TimeUnit in AudioSinkWrapper. r=kikuo
MozReview-Commit-ID: HBh4B6HXbCq

--HG--
extra : rebase_source : 6c9afb5e9ff8ea66539a28dc81548a77d41b3bc3
extra : source : e6ffb031e737b743d3ee115f13c094469f742bc1
2017-03-27 14:34:21 +08:00
JW Wang
2860ecd0e5 Bug 1350814 - Replace use of int64_t for microseconds by TimeUnit in AudioSink. r=kikuo
MozReview-Commit-ID: 3diOpJu7g8i

--HG--
extra : rebase_source : 16d7050cd29ea774fce7e76a16ae9100c766b9f8
extra : source : cf6946ba307d04b00e02e353b4724655929eaa69
2017-03-27 11:37:17 +08:00
JW Wang
576387b0bc Bug 1350813. use 0 as the sentinel value of MediaSink::GetEndTime(). r=kaku
Since the media timeline is zero-based, 0 is a good value to indicate
no data is played at all.

MozReview-Commit-ID: BiKzSGtbyjn

--HG--
extra : rebase_source : 7abbed32038d2e1d6b49e25319152060802e5dac
extra : intermediate-source : a786a2069cbd9e46901d6d474b00965f1e75893d
extra : source : e4acffc8b3c8e8003e17e62793d50c627cef340e
2017-03-25 13:29:05 +08:00
JW Wang
a7f369e934 Bug 1350811 - Replace use of int64_t for microseconds by TimeUnit in DecodedStream. r=kaku
MozReview-Commit-ID: JjBfTmqkru8

--HG--
extra : rebase_source : f03d35b4697304255f24e66dbdf93a1c8815fd59
2017-03-27 11:09:49 +08:00