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

208 Коммитов

Автор SHA1 Сообщение Дата
Chun-Min Chang 9efca17a07 Bug 1321502 - part 2: Use preferred layout for initializing cubeb when audio queue is empty; r=jya
MozReview-Commit-ID: BDEb8IxuJRn

--HG--
extra : rebase_source : a3bc1ea315c6a00d479a1b7da3eb14d89f458b2d
2017-02-04 08:22:15 +08:00
Chun-Min Chang 561671475d Bug 1321502 - part 1: Enable multi-channel support in Gecko on Windows; r=jya
MozReview-Commit-ID: KURUk3EffOu

--HG--
extra : rebase_source : a0ce3fb8691f45a33995a3ce1ba895c254a35c8c
2017-01-26 17:35:31 +08:00
Jean-Yves Avenard b7844bd5c3 Bug 1319987: P9. More coding style fixes. r=gerald
MozReview-Commit-ID: DhFRqkWQZny

--HG--
extra : rebase_source : 03ed44efc83fe9cab7fc975229ac4e5746aff96b
2017-01-27 13:20:37 +01:00
Carsten "Tomcat" Book f040eda61d Merge mozilla-central to autoland 2017-01-23 11:42:26 +01:00
JW Wang da6c0492b0 Bug 1331862. Part 1 - extract code to functions for reuse. r=kaku
MozReview-Commit-ID: 9QNTaBxGUFq

--HG--
extra : rebase_source : 98e95c60cbd66a5df4571644e4a6415f5bdbc371
extra : intermediate-source : 9dcd71ff0f89beda838f09865dfaa7f96983e430
extra : source : b0cf54f37556f520e45a001dcfa681e4a612a927
2017-01-18 17:55:59 +08:00
Bevis Tseng 72d516ef01 Bug 1314833 - Part 2.2: Use AbstractThread::CreateDirectTaskDrainer() to Drain Direct Tasks Dispatched to MediaStreamGraph. f=rjesup,r=padenot,jwwang
MozReview-Commit-ID: 1KgE3uKu4CG

--HG--
extra : rebase_source : 2ad950afe84675fb9bc4c449e53e7c0d52270175
2016-12-07 22:00:12 -10: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
JW Wang 4f5754ca55 Bug 1328130. Part 2 - remove MozPromiseRequestHolder::Begin(). r=gerald
MozReview-Commit-ID: JL27n0Era6E

--HG--
extra : rebase_source : e6de76db3fb35b110370497f4060ea1c3f527f23
extra : intermediate-source : 5bc39a45ef042b895a5abda59cc0796e8cfb4be3
extra : source : a7f7faded7b112e8a971ca96b091a9a22214a2bb
2017-01-11 16:33:29 +08:00
John Lin d496213476 Bug 1322679 - call MarkSentToCompositor() when VideoSink::Redraw() processing queued frame. r=jwwang
MozReview-Commit-ID: IBM6HcCpVA8

--HG--
extra : rebase_source : 7cdbe96a7236e2e0be61b6dc953963fde3fe6b84
2016-12-09 19:57:12 +08:00
John Lin f2d11c05c8 Bug 1299068 - part 3: notify when VideoData are sent to compositor. r=jwwang
MozReview-Commit-ID: Jn4AqpMaXMg

--HG--
extra : rebase_source : 9080d1fd4cbc532019134ea7087bbef03ae2600a
2016-11-23 15:08:17 +08:00
Kaku Kuo 42a1f53991 Bug 1309516 part 0 - make sure that the VideoSink::Redraw() always draws something; r=jwwang
MozReview-Commit-ID: BQ0FDyNPuri

--HG--
extra : rebase_source : 42649411a6b00cc09f581b63a00e98b14a093986
2016-11-15 12:04:26 +08:00
JW Wang b7474df3ed Bug 1316543 - Fix the calculation of VideoSink::mVideoFrameEndTime. r=cpearce
MozReview-Commit-ID: 4p34iXLtQz5

--HG--
extra : rebase_source : e084436cd88e7bea9000422a7e57d8f343c26f41
2016-11-10 17:12:01 +08:00
Chris Pearce ad6837ab57 Bug 1307546 - Give VideoSink a minimum update interval. r=jwwang
Without this, we can end up with very short, or even negative, update
intervals, meaning we unnecessarily use CPU when we can't actually
advance the playback position.

MozReview-Commit-ID: 6H32uVCyCll

--HG--
extra : rebase_source : 952799b846bcbb562d4ff99e97a8dcb5d8b2f558
2016-11-07 16:21:58 +13:00
JW Wang fea88a9ded Bug 1315586 - DecodedStream::NotifyOutput() should compare |a->mTime| to GetPosition() instead of |aTime|. r=pehrsons
MozReview-Commit-ID: AyqsW9w5Je0

--HG--
extra : rebase_source : b401aad9c175e6ded87edd535c3124eec139ecab
2016-11-07 11:10:53 +08:00
Sebastian Hengst 5bac92d3b9 Backed out changeset d5a00a0b689c (bug 1307546) for increased mda test_BufferingWait_mp4.html failure on Windows 7. r=backout a=backout
MozReview-Commit-ID: J0DyTk9rJJe
2016-11-05 16:52:33 +01:00
Chris Pearce d2ec5f2f3e Bug 1307546 - Ensure we don't set timers with negative intervals in to update A/V sync. r=jya
Our logic to do A/V sync sets a timer to drop expired frames based on the
start time of the next frame in the queue. If the frames in the queue are
badly muxed and don't have monotonically increasing start times, we can
end up setting a timer with a negative interval. This causes us to reevaluate
the frames in the VideoSink's queue immediately, set the same timer again,
and so we end up hot-looping.

This is a simple low-risk fix that detects when we're about to set a negative
interval timer, and instead sets the timer 1/30th of a second in the future.

This fix is deliberately low risk, such that it's suitable for uplift. I have
an idea how to do this better, but the lower risk this is most suitable for
uplift.

MozReview-Commit-ID: CDOqJJodx4l

--HG--
extra : rebase_source : b2833382d95143ee1845f2ea32dcc77a1903dc00
2016-11-04 16:42:24 +13:00
JW Wang f682200758 Bug 1198168 - add debugging logs. r=kaku
MozReview-Commit-ID: D35N9bNNOeK

--HG--
extra : rebase_source : 4da554e41c48e52f9f90e3c9d222d4a85130da87
2016-11-01 14:41:09 +08:00
JW Wang d30c88bef8 Bug 1309111 - Some macros are not expanded correctly by MSVC. r=gerald
MozReview-Commit-ID: BGJXOgslSt8

--HG--
extra : rebase_source : a62efe2e0653f009a7010e5c95dcbb09bed2213b
extra : source : f8a392e8034e1ca216aaf7084f860b0a03e021eb
2016-10-11 13:28:56 +08:00
JW Wang 15fc2d73c6 Bug 1306813 - Don't puslish events to mOnOutput after DecodedStream::Stop() is called. r=pehrsons
Because the TaskQueue of MDSM will shut down soon and TaskQueue::Dispatch() will fail (via mOnOutput.Notify()).
We reset mStream in Forget() on the TaskQueue thread of MDSM so NotifyOutput() can check it
and ensure mOnOutput.Notify() always happen before DecodedStream::Stop().

MozReview-Commit-ID: 4sCXk1KAfCC

--HG--
extra : rebase_source : 1ec50a86fa1519c4fc8caa1087f2794411aa23b0
2016-10-04 14:54:23 +08:00
Jean-Yves Avenard aa4ed2f442 Bug 1305826: P3. Only process the number of frames, do not rely on allocated size. r=gerald
This is only for safeguarding, in case an audio buffer was over allocated. There should be none. But better be safe than sorry

MozReview-Commit-ID: JszA8CqycTr

--HG--
extra : rebase_source : ddeb1ff1f19abba36e4cbb1bab5132f15f5a2a74
2016-10-01 19:34:42 +10:00
JW Wang 1a0d74d8ae Bug 1305353. Part 3 - discard audio samples in DecodedStream::NotifyOutput(). r=pehrsons
MozReview-Commit-ID: 7o6cdP126ip

--HG--
extra : rebase_source : 1c048589c50697b103d41d1f350d3056b392ffdf
extra : source : cb75ad9850543f4739ab37f8cd309301d067fc46
2016-09-26 15:25:11 +08:00
JW Wang 951520874b Bug 1305353. Part 2 - remove DecodedStreamData::GetPosition() and its friends. r=pehrsons
MozReview-Commit-ID: FJvBDO0x6b0

--HG--
extra : rebase_source : 1038e583031cea484cbb1f4e83d8e7fa26b96eb5
extra : source : c9883664b68c0782450994ebe0e1d5798baa06a5
2016-09-26 15:12:20 +08:00
JW Wang b903738272 Bug 1305353. Part 1 - publish output time to DecodedStream using MediaEventProducer. r=pehrsons
MozReview-Commit-ID: 5f37RfBhDA

--HG--
extra : rebase_source : 890a5b52fffac35302db1a8f17b4ff68b31e5ba4
extra : source : 07a11ac6970391aafc96f39370ab83370316f65a
2016-09-26 15:08:12 +08:00
Jamie Nicol 22f1d4f009 Bug 1245959 - Check video frame has non-zero dimensions before sending image to compositor. r=nical
MozReview-Commit-ID: 6PlWqE6is7Z

--HG--
extra : rebase_source : df4ff6689eea6ff8e95dd0f6d7e3e37b994875a1
2016-09-19 14:41:36 +01:00
Sotaro Ikeda 8cffca6531 Bug 1299415 - Clear ImageContainer cached resources When VideoSink pause playing r=jwwang 2016-09-04 23:38:43 -07:00
JW Wang 713c29c0d1 Bug 1299021. Part 2 - ensure resolving the end promise when mVideoSinkEndRequest is resolved. r=kikuo
MozReview-Commit-ID: 2XTpqVGBrBN

--HG--
extra : rebase_source : 37246ada49fd5b8a4de57ece3c3941f182db5e2c
2016-08-29 21:28:36 +08:00
JW Wang 2ecd9cc1dd Bug 1299021. Part 1 - extract the code about resolving the end promise. r=kikuo
MozReview-Commit-ID: ECr058zKdUk

--HG--
extra : rebase_source : ae2b59cbf758ab9b703c9aed471ddb7bf3145f4f
2016-08-29 20:56:00 +08:00
JW Wang 716c3e5830 Bug 1299019 - ensure mVideoFrameEndTime is mono-increasing. r=kikuo
MozReview-Commit-ID: 3rwItcTAqUQ

--HG--
extra : rebase_source : dfcefdd15f85387a13312c271c4df7b424f4d239
2016-08-29 20:46:26 +08:00
Jean-Yves Avenard b3537bb63d Bug 1298594: P4. Pop the frame when current time is past the end of the current frame. r=jwwang
Most frames start when the previous one stop.

MozReview-Commit-ID: H92Bmiki49Q

--HG--
extra : rebase_source : 071416d9151d5188550d73f0eb5a4c70a5fbd48b
2016-08-29 15:46:56 +10:00
JW Wang 663ca6b4fa Bug 1297553 - Dump more debugging messages for MDSM and MediaSink. r=kaku
MozReview-Commit-ID: ILcF1hT2hVN

--HG--
extra : rebase_source : 1f6564eb5161608ee6031b1c362a6b689762dcfe
2016-08-24 11:45:58 +12:00
Chris Pearce b20d1d8c23 Bug 1295630 - Provide a way for A/V sync to be ruined, so talos can test compositor throughput by painting expired frames. r=mattwoodrow
In bug 1258870 I changed the media code so that we dropped all late video
frames. Without this, our A/V sync was broken when the decode was struggling
to keep up, and we weren't reporting dropped frames when the decode couldn't
keep up, and so players couldn't adapt to a bitrate which the decode could keep
up on.

However, dropping all late frames broke talos tests which relied on the old
behaviour of us rendering video frames that were late. So this patch adds a
pref to cause the frame dropping code to not drop the last frame in the
queue, so there will always be something for the compositor to composit. This
means talos will once again be able to test how fast it can composit frames
that aren't supposed to be drawn.

The pref is media.ruin-av-sync.enabled.

It defaults to false.

MozReview-Commit-ID: J3VvpzoDRmI

--HG--
extra : rebase_source : ee24f37f201ef266e0894ca2c5afda498629ec0a
2016-08-19 21:34:42 +12:00
Chris Pearce 3940f4a605 Bug 1258870 - Don't push late video frames to the compositor, drop them. r=jwwang
We can get out of A/V sync if the decode is struggling to keep up. This is
because of the loop in VideoSink::UpdateRenderedVideoFrames(). If this function
runs while there's only one frame in the video queue, we won't drop that one
frame if it's late. If we're struggling to keep up, it's increasingly likely
that we'll end up running this function with only one frame in the video queue.
That results in us entering VideoSink::RenderVideoFrames() with only 1 late
frame, which the compositor dutifully draws. Resulting in a late frame being
drawn, and thus broken A/V sync.

This change makes VideoSink::UpdateRenderedVideoFrames() drop all late
frames, even the last one in the video queue. We now keep A/V sync when the
decode is struggling to keep up. However, if I do this, we end up dropping
(and reporting that we drop) a lot more frames, and thus rendering a lot fewer.
But since we when we drop the frames we report them as dropped, a well written
MSE player can detect that we've failing miserably to keep up, and and lower
their bitrate.




MozReview-Commit-ID: ybkq48mKk2

--HG--
extra : rebase_source : f03c186059a365a45de698b2a30e632daae47fb8
2016-08-15 13:35:52 +12:00
ctai 2c69985ffe Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : transplant_source : %3D%AA%00%CE%A3SV5%8F%84%96%AC%E2%D9%10%EC%85%07N%DF
2016-07-25 10:01:26 +08:00
Sebastian Hengst f4671c3b11 Backed out changeset 4111e388bd90 (bug 1201363) 2016-08-03 19:33:25 +02:00
ctai a3cc6128d3 Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : amend_source : 7b9c51dcb4046c6c807d1cf1e48bef301e45fa8e
2016-07-25 10:01:26 +08:00
Carsten "Tomcat" Book 27cb7f4d79 Backed out changeset 06c0a7eb7bc6 (bug 1201363) 2016-08-02 12:53:53 +02:00
ctai edeaa48113 Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : transplant_source : %C4n%D7a%10%CFK%D5%F2%DC%10%08%C2%24%EC%11%13J%DB%5D
2016-07-25 10:01:26 +08:00
Gerald Squelart 7bea2e1262 Bug 1289668 - Refactor FrameStatistics writers to use Data struct - r=kamidphish
Decoders now use FrameStatisticsData to gather data for their frame-related
notifications. This will ease introducing new members later on.

MozReview-Commit-ID: DWdOSPX3JM

--HG--
extra : rebase_source : a3e05f34353a397d1c82b3f4d935c0864f90556e
2016-07-18 10:41:40 +10:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Farmer Tseng 55fd27efdb Bug 1283489 - mParams.mPlaybackRate should be updated after call GetVideoPosition(). r=jwwang 2016-07-10 23:35:00 +02:00
ctai fd36b32d94 Bug 1266646 - Move group of MediaStreamListener to a new header file. r=pehrsons
This can reduce the include header dependency. MediaStreamVideoSink will inherit from DirectMediaStreamTrackListener. But we can't use forward declaration on MediaStreamListener because the usage of nsTArray<RefPtr<MediaStreamVideoSink>>.

MozReview-Commit-ID: 328s4Kw9NvW

--HG--
extra : transplant_source : %D2%18%E3%3B%0C%D8%F04%F3%EB%EB%A0%A7%8B%B1%A9%AB%97rY
2016-06-30 15:07:48 +08:00
Andreas Pehrson e028368c0f Bug 1280445 - Remove wrapper from MediaStream. r=jesup, r=padenot
MozReview-Commit-ID: CTCFloIUXKa

--HG--
extra : rebase_source : b1c2073c638bb65c19a0f40e8d17e9a5bae15c98
extra : source : c6d854b3209e7de7d97153c0bfc492c1d5f1e6b5
2016-06-29 12:27:13 +02:00
JW Wang e34042f5dc Bug 1277175 - Remove AudioStream::IsPaused(). r=kinetik.
MozReview-Commit-ID: K2CHJ0E90MW

--HG--
extra : rebase_source : 4f0bd8f2e46ad8850a15c7a1102c9bae5217e6bc
2016-05-31 15:59:20 +08:00
JW Wang fbdef02717 Bug 1272565 - draw a blank image when no frames in the video track.
MozReview-Commit-ID: 1Kijn00XAnQ
2016-05-17 10:33:32 +08:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Jean-Yves Avenard e926d54268 Bug 1206637: P1. Add MediaPrefs convenience class. r=cpearce
Almost identical to gfxPrefs, with the exception that preferences can't be set (as it doesn't work with e10s anyway). The generated code size is tiny enough that we don't have to bother about having duplicates.

MozReview-Commit-ID: 5SZyscvIzzS

--HG--
extra : rebase_source : 1a2577bbe24d2d6644c3f1f5d0c47850b67fdea0
2016-05-09 14:59:02 +10:00
Alastor Wu 2d52873a0d Bug 1269672 - part2 : move audible data checking from MDSM to DecodedAudioDataSink.
MozReview-Commit-ID: 8uYJ9UA2Jf2
2016-05-12 14:18:53 +08:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Kaku Kuo d42d57aa97 Bug 1267983 - include MediaQueue.h; r=jwwang
MozReview-Commit-ID: ikxjE7VZsd

--HG--
extra : rebase_source : 0f8bcca3b15fade72b04982b9b4f79e130413938
2016-04-27 19:01:13 +08:00
Jean-Yves Avenard bb9dfe8544 Bug 1264199: P9. Include pending frames in HasUnplayedFrames calculation. r=jwwang
MozReview-Commit-ID: 5m8zCe4cB2s

--HG--
extra : rebase_source : 5c33353294acfc0ec51385bf7d00fea9aa985b39
2016-04-26 00:13:01 +10:00
Jean-Yves Avenard 45a02f35c6 Bug 1264199: P6. Drain resampler when changing format or reaching the end. r=kinetik
MozReview-Commit-ID: KqcB0FYxNtC

--HG--
extra : rebase_source : 63eff5cb4d66483ecc2871440dda6bc9f73d9822
2016-04-14 15:44:02 +10:00
Jean-Yves Avenard 33f592b6a5 Bug 1264199: P5. Perform all downmixing operations in DecodedAudioDataSink. r=kinetik
Performing all audio processing operations in the same place, allows to simplify the code.

Additionally, if accessibility.monoaudio.enable is not set, we always upmix mono to stereo so that if the first audio stream seen was mono, we aren't stuck playing all future streams in mono.

MozReview-Commit-ID: 5yANN6PLFhX

--HG--
extra : rebase_source : 8b2138368d97f4ec2857c021ed9605c633282ed2
2016-04-13 20:25:50 +10:00
Jean-Yves Avenard ec0a733d51 Bug 1264199: P3. Attempt to minimize audio quality loss and unnecessary processing. r=kinetik
We attempt to avoid unnecessary resampling of 44.1kHz and 48kHz content, for all others we use cubeb's preferred sampling rate as final sampling rate.

MozReview-Commit-ID: 413qnsDFHzY

--HG--
extra : rebase_source : ca3508aefb29e2e64e84774bddb9fe77654c8945
2016-04-13 17:55:48 +10:00
Jean-Yves Avenard 68dc5cfd31 Bug 1264199: P2. Ensure the AudioStream only ever receive the same content format. r=kinetik
The audio is automatically converted to always match the format of the first processed sample.
This is a temporary approach, as it would be preferred to use a final sampling rate not causing too much quality loss.

MozReview-Commit-ID: Lo3827aon43

--HG--
extra : rebase_source : 946eabde451a33018722cb6f1c0ca7b8c1d87009
2016-04-13 17:30:23 +10:00
Jean-Yves Avenard fa7bd08dd2 Bug 1264199: P1. Perform audio conversion in the MSDM taskqueue and ahead of use. r=kinetik
This will allow to easily detect audio configuration change prior immediate playback.

MozReview-Commit-ID: IwDUGOd17ND

--HG--
extra : rebase_source : ef2b492cfeed5eca8fdfcb5442dedc2b65fc1d8f
2016-04-13 17:17:54 +10:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
JW Wang 0c694cb31b Bug 1246051 - have MediaQueue<T>::Peek/PeekFront return a RefPtr<> to avoid dangling pointers per comment 0. r=gerald.
MozReview-Commit-ID: JhPVlqMWsTu
2016-04-25 14:36:07 +08:00
Carsten "Tomcat" Book a5380ba1b7 Backed out changeset 198add1ad218 (bug 1264199) for test failures in test_WaitingOnMissingData_mp4.html
--HG--
extra : rebase_source : 33dedc36a21a7d025aaba9c5e3febb841aafd626
2016-04-21 16:32:21 +02:00
Carsten "Tomcat" Book d86730e999 Backed out changeset d01ac4659cb4 (bug 1264199)
--HG--
extra : rebase_source : b25c66791db9aaaeb897da1f864d4fecb677e090
2016-04-21 16:32:00 +02:00
Carsten "Tomcat" Book c728b16f87 Backed out changeset 697006992f04 (bug 1264199)
--HG--
extra : rebase_source : 54261374ba3d452f9eb38a521d1a95f9b9bcc18e
2016-04-21 16:31:58 +02:00
Carsten "Tomcat" Book ba17b2d751 Backed out changeset 93ab5d1b04b0 (bug 1264199)
--HG--
extra : rebase_source : 0c5ec4b3526d6cfcc86d40221f298790f262227d
2016-04-21 16:31:55 +02:00
Carsten "Tomcat" Book baaa1f0ede Backed out changeset b83be2d0614b (bug 1264199)
--HG--
extra : rebase_source : f8962f950f2fa089ca7eb297aca3b8711c5586c5
2016-04-21 16:31:54 +02:00
Jean-Yves Avenard b6a41a813c Bug 1264199: P6. Drain resampler when changing format or reaching the end. r=kinetik
MozReview-Commit-ID: KqcB0FYxNtC

--HG--
extra : rebase_source : 6004cd28d70f5ac44644aa00f852d0afd95017a9
2016-04-14 15:44:02 +10:00
Jean-Yves Avenard 427e2852c6 Bug 1264199: P5. Perform all downmixing operations in DecodedAudioDataSink. r=kinetik
Performing all audio processing operations in the same place, allows to simplify the code.

Additionally, if accessibility.monoaudio.enable is not set, we always upmix mono to stereo so that if the first audio stream seen was mono, we aren't stuck playing all future streams in mono.

MozReview-Commit-ID: 5yANN6PLFhX

--HG--
extra : rebase_source : f40dfacc9fc323794325de0431c4958854012180
2016-04-13 20:25:50 +10:00
Jean-Yves Avenard f3ef547925 Bug 1264199: P3. Attempt to minimize audio quality loss and unnecessary processing. r=kinetik
We attempt to avoid unnecessary resampling of 44.1kHz and 48kHz content, for all others we use cubeb's preferred sampling rate as final sampling rate.

MozReview-Commit-ID: 413qnsDFHzY

--HG--
extra : rebase_source : a469cb7269be48bfbca82fbbd90c3e2caf21b9a7
2016-04-13 17:55:48 +10:00
Jean-Yves Avenard ad7e31a76a Bug 1264199: P2. Ensure the AudioStream only ever receive the same content format. r=kinetik
The audio is automatically converted to always match the format of the first processed sample.
This is a temporary approach, as it would be preferred to use a final sampling rate not causing too much quality loss.

MozReview-Commit-ID: Lo3827aon43

--HG--
extra : rebase_source : 51322d12415995bd5ba7d8a25500860f333c9c3e
2016-04-13 17:30:23 +10:00
Jean-Yves Avenard d8c778f022 Bug 1264199: P1. Perform audio conversion in the reader's taskqueue and ahead of use. r=kinetik
This will allow to easily detect audio configuration change prior immediate playback.

MozReview-Commit-ID: IwDUGOd17ND

--HG--
extra : rebase_source : 3af32634eb431661436bf1d3aaeb80124b229716
2016-04-13 17:17:54 +10:00
Wes Kocher b8f98ffe9f Backed out 8 changesets (bug 1264199) for permafailing media mochitests on OSX 10.6 a=backout
Backed out changeset 0f20f2080824 (bug 1264199)
Backed out changeset 90351d2719be (bug 1264199)
Backed out changeset f484b42cbdda (bug 1264199)
Backed out changeset b79b62146120 (bug 1264199)
Backed out changeset f587df589b69 (bug 1264199)
Backed out changeset 02f781a573b4 (bug 1264199)
Backed out changeset d3677ae4c8ec (bug 1264199)
Backed out changeset d08288654ec9 (bug 1264199)

MozReview-Commit-ID: HVtiBSOxf7t
2016-04-20 11:01:36 -07:00
Jean-Yves Avenard ab5924e4e6 Bug 1264199: P6. Drain resampler when changing format or reaching the end. r=kinetik
MozReview-Commit-ID: KqcB0FYxNtC
2016-04-20 15:03:40 +10:00
Jean-Yves Avenard 29ce436a1b Bug 1264199: P5. Perform all downmixing operations in DecodedAudioDataSink. r=kinetik
Performing all audio processing operations in the same place, allows to simplify the code.

Additionally, if accessibility.monoaudio.enable is not set, we always upmix mono to stereo so that if the first audio stream seen was mono, we aren't stuck playing all future streams in mono.

MozReview-Commit-ID: 5yANN6PLFhX
2016-04-20 15:03:34 +10:00
Jean-Yves Avenard a0ed015dba Bug 1264199: P3. Attempt to minimize audio quality loss and unnecessary processing. r=kinetik
We attempt to avoid unnecessary resampling of 44.1kHz and 48kHz content, for all others we use cubeb's preferred sampling rate as final sampling rate.

MozReview-Commit-ID: 413qnsDFHzY
2016-04-20 15:03:20 +10:00
Jean-Yves Avenard 024b052f14 Bug 1264199: P2. Ensure the AudioStream only ever receive the same content format. r=kinetik
The audio is automatically converted to always match the format of the first processed sample.
This is a temporary approach, as it would be preferred to use a final sampling rate not causing too much quality loss.

MozReview-Commit-ID: Lo3827aon43
2016-04-20 15:03:14 +10:00
Jean-Yves Avenard b130178b94 Bug 1264199: P1. Perform audio conversion in the reader's taskqueue and ahead of use. r=kinetik
This will allow to easily detect audio configuration change prior immediate playback.

MozReview-Commit-ID: IwDUGOd17ND
2016-04-20 15:02:55 +10:00
Carsten "Tomcat" Book 0a327c9b21 Backed out changeset b15c10c42148 (bug 1264199) for android crashes 2016-04-18 14:22:19 +02:00
Carsten "Tomcat" Book 564bf14aa1 Backed out changeset 6b82e89a490e (bug 1264199) 2016-04-18 14:22:06 +02:00
Carsten "Tomcat" Book e53741644d Backed out changeset 04751f3545ad (bug 1264199) 2016-04-18 14:22:05 +02:00
Carsten "Tomcat" Book fbf1d00b15 Backed out changeset f323c504b5a5 (bug 1264199) 2016-04-18 14:22:02 +02:00
Carsten "Tomcat" Book 5cd62eeaee Backed out changeset 4e02fc1cbd35 (bug 1264199) 2016-04-18 14:22:00 +02:00
Carsten "Tomcat" Book 23aeca76f6 Backed out changeset 1d139b7422c8 (bug 1264199) 2016-04-18 14:21:59 +02:00
Jean-Yves Avenard a2cc8a6739 Bug 1264199: P7. Stop early if audio queue got flushed. r=me
MozReview-Commit-ID: EMj2LMgRIzU
2016-04-18 20:24:19 +10:00
Jean-Yves Avenard 730f304d31 Bug 1264199: P6. Drain resampler when changing format or reaching the end. r=kinetik
MozReview-Commit-ID: KqcB0FYxNtC

--HG--
extra : rebase_source : 777c5b85e8999a54a8b0b5c9da999d41e746daa2
2016-04-14 15:44:02 +10:00
Jean-Yves Avenard 7e4703cb30 Bug 1264199: P5. Perform all downmixing operations in DecodedAudioDataSink. r=kinetik
Performing all audio processing operations in the same place, allows to simplify the code.

Additionally, if accessibility.monoaudio.enable is not set, we always upmix mono to stereo so that if the first audio stream seen was mono, we aren't stuck playing all future streams in mono.

MozReview-Commit-ID: 5yANN6PLFhX

--HG--
extra : rebase_source : c789ba66fa168bc11064b2a329311d90b046c7fc
2016-04-13 20:25:50 +10:00
Jean-Yves Avenard 16c0bd7cd9 Bug 1264199: P3. Attempt to minimize audio quality loss and unnecessary processing. r=kinetik
We attempt to avoid unnecessary resampling of 44.1kHz and 48kHz content, for all others we use cubeb's preferred sampling rate as final sampling rate.

MozReview-Commit-ID: 413qnsDFHzY

--HG--
extra : rebase_source : 2c783be7f6d2ccaab88cee70372905ea92b690f4
2016-04-13 17:55:48 +10:00
Jean-Yves Avenard d679b38075 Bug 1264199: P2. Ensure the AudioStream only ever receive the same content format. r=kinetik
The audio is automatically converted to always match the format of the first processed sample.
This is a temporary approach, as it would be preferred to use a final sampling rate not causing too much quality loss.

MozReview-Commit-ID: Lo3827aon43

--HG--
extra : rebase_source : d8de2c85de5a78c2d1a17201a9d0c418ce3312e4
2016-04-13 17:30:23 +10:00
Jean-Yves Avenard 6517105f96 Bug 1264199: P1. Perform audio conversion in the reader's taskqueue and ahead of use. r=kinetik
This will allow to easily detect audio configuration change prior immediate playback.

MozReview-Commit-ID: IwDUGOd17ND

--HG--
extra : rebase_source : 37e9e19a58d2e90b107eaf63a2ac19233c521033
2016-04-13 17:17:54 +10:00
Jean-Yves Avenard 9d61bb0d32 Bug 1262753: P7. Add debugging pref to enable/disable downmixer and resample. r=kinetik
Using the gfxprefs for the time being, in order to access the preferences outside of the main thread.

It will allow to easily test future cubeb changes to support change of sampling rate / multichannels.

MozReview-Commit-ID: 2Qvq4zAtzCL

--HG--
extra : rebase_source : 46e272ca46ceb35b8e97b62cd1d2be949ba054f2
2016-04-12 19:24:09 +10:00
Jean-Yves Avenard 4132e3555b Bug 1262753: P6. Perform downmixing in DecodeAudioDataSink. r=kinetik
Rather than performing the audio processing a few frames at a time, we perform the operation when popping the audio data block.
The only downmixing task left to AudioStream is to handle the force mono preference.

Resampling is currently disabled.

MozReview-Commit-ID: GNQA1h0xcp7

--HG--
extra : rebase_source : c58aa4514a0dc4de06be6dc1da6a598742caa262
2016-04-11 21:16:17 +10:00
Andreas Pehrson e1b8d01dd1 Bug 1208371 - Hook up DecodedStream with PrincipalHandle. r=mt,jwwang
MozReview-Commit-ID: 1LmiFyfjhsr

--HG--
extra : rebase_source : e1ceca65cd1f5ff64ab6fff8fafc1ddd08f44b87
2016-02-02 13:14:13 +08:00
Andreas Pehrson be74876e25 Bug 1208371 - Add PrincipalHandle to MediaChunks. r=mt,jesup
PrincipalHandle is a thread safe pointer to a holder of (the main-thread-only
nsIPrincipal) that can be passed around the MSG.

A MediaStreamTrack whose source has just updated its principal, sets the new
principal aside (as its "pending principal"), and combines the new principal
into its current principal.

Then the source starts passing the new principal to the MediaStreamGraph as
a PrincipalHandle.

Changes to a track's PrincipalHandle on the MSG will be surfaced through the
MediaStreamTrackListener API. These changes are dispatched to main thread
and compared to a MediaStreamTrack's pending principal. In case of a match
the track knows the correct principal is flowing and can move the pending
principal to be the current principal and update any main thread principal
observers.

MozReview-Commit-ID: D0JXGWhQFFU

--HG--
extra : rebase_source : 296e269bb46fc5a85a9c3f90dfc0dc40e53572bc
2016-04-06 14:56:44 +02:00
JW Wang 2572fe3414 Bug 1256520 - use SyncRunnable to create DecodedStreamData synchronously to ensure the creation and destruction of DecodedStreamData happen in order. r=kikuo.
This greatly simplify the code because:
1. we don't have to dispatch the newly created DecodedStreamData to the work thread and store it to |mData|.
2. no need to deal with dispatch failure incurred by 1 due to task queue shutdown.
   (see: https://hg.mozilla.org/mozilla-central/file/f0c0480732d36153e8839c7f17394d45f679f87d/dom/media/mediasink/DecodedStream.cpp#l392)

MozReview-Commit-ID: FwySgwKp8dV
2016-03-15 08:54:52 +08:00
JW Wang 8be2af10c1 Bug 1258567 - per comment 3, ensure volume is only applied once to the AudioSegment. r=kinetik.
MozReview-Commit-ID: Bks59JySrep
2016-03-23 10:16:15 +08:00
Matthew Gregan d2da3ad7e8 Bug 1246108 - Don't restart completed audio streams. r=jwwang 2016-03-22 20:55:51 +13:00
JW Wang 1a90a30802 Bug 1248229. Part 2 - GC might happen in between OutputStreamManager::Disconnect() and OutputStreamManager::Connect(). We need to check if the stream is already destroyed before trying to connect it. r=roc.
MozReview-Commit-ID: EL3ip1yjNaz
2016-02-22 11:04:41 +08:00
JW Wang 8305f2e98d Bug 1248314. part 2 - move track initialization code into the constructor of DecodedStreamData. r=roc.
MozReview-Commit-ID: 2aQ7cXxRDTE
2016-02-15 11:41:31 +08:00
JW Wang fb95de6307 Bug 1248314. Part 1 - Since OutputStreamManager::Connect/Disconnect is tightly coupled with the constructor/destructor of DecodedStreamData, it would improve cohesion to let DecodedStreamData manage an OutputStreamManager and know when to call OutputStreamManager::Connect/Disconnect. r=roc.
MozReview-Commit-ID: Gg6WxMzAXSp
2016-02-15 11:39:13 +08:00
Jean-Yves Avenard c04fc8bec6 Bug 1237160: Do not count frames not composited as dropped. r=cpearce
This is a partial reversal of bug 1230338. We can't distinguish frames that are never composited because the media element is hidden from the frames genuinely dropped due to machine slowness. So until we can distinguish them, let's not report them as dropped.

MozReview-Commit-ID: ERV8Luaxp3F
2016-02-10 11:05:09 +11:00
Alastor Wu 28154f1f42 Bug 1242774 - only resolve promise when exist. r=jwwang. 2016-02-05 01:39:00 +01:00
JW Wang 4a525dc7dd Bug 1245542 - I suspect AudioData::mAudioData/mFrames are poisoned when sample format doesn't match the metadata. Let's ignore these samples to see if crash volume can be reduced. r=kinetik. 2016-02-05 10:19:12 +08:00