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

83 Коммитов

Автор SHA1 Сообщение Дата
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
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
JW Wang b9727f12f3 Bug 1241003 - ignore AudioData with 0 frames to avoid silence. r=kinetik. 2016-01-21 21:14:42 +08:00
JW Wang 541dacf22b Bug 1240420. Part 1 - move checks of mismatched sample rate or channel numbers to AudioStream. r=kinetik. 2016-01-21 21:11:14 +08:00
JW Wang 31e6c6ee58 Bug 1240417. Part 1 - add a writer class to encapsulate pointer arithmetic. r=kinetik. 2016-01-18 11:24:06 +08:00
JW Wang ae5faca646 Bug 948267. Part 2 - implement AudioStream::DataSource for DecodedAudioDataSink and remove its audio thread. r=kinetik. 2016-01-12 21:48:25 +08:00
JW Wang 93bb6f7b7d Bug 1234424. Part 2 - remove unused code. r=roc. 2016-01-05 21:15:43 +08:00
JW Wang c892dcaefa Bug 1234424. Part 1 - share the underlying value of MDSM::mSameOriginMedia with DecodedStream. r=roc. 2016-01-05 21:15:37 +08:00
JW Wang 57b173ae94 Bug 1233650. Part 4 - remove unused functions from DecodedStream. r=roc. 2015-12-24 10:14:16 +08:00
JW Wang f7894b21a7 Bug 1233650. Part 3 - move creation of OutputStreamManager from DecodedStream to MDSM. r=roc. 2015-12-24 10:14:16 +08:00
JW Wang 7afdbac0f6 Bug 1233650. Part 2 - make OutputStreamManager ref-counted so it can be shared between MDSM and DecodedStream. r=roc. 2015-12-24 10:14:16 +08:00
JW Wang 8198911d8b Bug 1233650. Part 1 - extract OutputStreamManager to its own file. r=roc.
--HG--
rename : dom/media/mediasink/DecodedStream.cpp => dom/media/mediasink/OutputStreamManager.cpp
rename : dom/media/mediasink/DecodedStream.h => dom/media/mediasink/OutputStreamManager.h
2015-12-24 10:14:15 +08:00
JW Wang bcd91fefed Bug 1231091. Part 6 - fix test_streams_element_capture.html timeout. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang a03dc1e4e1 Bug 1231091. Part 5 - Remove DecodedStream::IsFinished() and unused code. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang 43c45372af Bug 1231091. Part 4 - ensure the end promise is resolved in the special case where video duration is 0. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang 2bdedb0118 Bug 1231091. Part 3 - resolve the end promise when all frames are rendered. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang 5cf3e3bfa5 Bug 1231091. Part 2 - return correct promises when audio/video track is asked. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang 45b81db1ac Bug 1233648 - Fix some insufficient includes. r=kinetik. 2015-12-18 15:12:45 +08:00
JW Wang 480823b5c6 Bug 1232520 - dont' invoke AbstractThread::MainThread()->Dispatch() to avoid reentrant of AutoTaskDispatcher during tail dispatching phase. r=jya. 2015-12-18 11:50:32 +08:00
JW Wang f79563a6b5 Bug 1231075. Respect the timestamp of video frames and don't pop frames as fast as we can in real-time mode. r=roc. 2015-12-17 10:53:49 +08:00
JW Wang 9477651c83 Bug 1230882. Part 2 - remove DecodedStream::BeginShutdown() and other unused code. r=roc. 2015-12-14 11:32:19 +08:00
JW Wang f8c0036f90 Bug 1230882. Part 1 - destroy DecodedStreamData properly when dispatch fails. r=roc. 2015-12-14 11:32:18 +08:00
Matt Woodrow 6ef854d267 Bug 1230338 - Record video frames dropped by the compositor, or while flushing during skip-to-keyframe. r=jya 2015-12-04 13:33:21 +13:00
JW Wang 22151cf459 Bug 1218311 - Port the fix of bug 1193614 to VideoSink. r=cpearce. 2015-11-25 15:15:05 +08:00