Commit Graph

939 Commits

Author SHA1 Message Date
Matthew Gregan
263b3b467b Bug 760364 - Fix comments referring to long-removed audio monitor. r=roc 2012-06-01 18:44:38 +12:00
Matthew Gregan
14fc840b7b Bug 757707 - Avoid holding nsBufferedAudioStream locks over calls into cubeb. r=roc 2012-06-01 16:45:01 +12:00
Robert O'Callahan
c2b6383f48 Bug 759908. Create MediaStreamListener::NotifyConsumptionChanged. r=jesup
--HG--
extra : rebase_source : f9479b836ec92170782eb01ea8b97004b057ceb7
2012-06-01 18:26:17 +12:00
Chris Double
5c75892c8b Bug 759948 - libstagefright based media playback doesn't receive ended event when complete on B2G - r=edwin
--HG--
extra : rebase_source : a6450eb3a2fbb2ac67e329fa9ef9f0bd9e801e89
2012-06-01 12:54:52 +12:00
Andreas Gal
1518859a5b Bug 714408 Part 2 - Media plugin support for libstagefright - r=doublec
--HG--
extra : rebase_source : 308d1aab3cfffbb7ddeb0602a3991565603e6212
2012-06-01 12:54:23 +12:00
Timothy B. Terriberry
8cf0158bfc Bug 751219 - Support header gain in Opus files, r=kinetik 2012-05-31 11:13:17 -07:00
Timothy B. Terriberry
97a1c5f7c1 Bug 759612 - Update granule position accounting for Opus, r=kinetik 2012-05-31 11:13:17 -07:00
Timothy B. Terriberry
fac791cc69 Bug 759399 - Handle preroll correctly during an Opus seek, r=doublec 2012-05-31 11:13:17 -07:00
Timothy B. Terriberry
e4706b6f85 Bug 759490 - Use Opus streams when seeking in Ogg, if present, r=doublec 2012-05-31 11:13:11 -07:00
Ralph Giles
08ed5054b4 Bug 758833 - Track and trim opus preskip samples - r=doublec
We trim the initial few samples out of the opus decoder,
to give the output time to converge, and to correct for
the encoding delay. Encoders store the delay in the preskip
field of the Ogg encapsulation header.

The previous code to do this was a hack based on the granulepos
values and could fail on some inputs. Instead, keep a count
of how many samples we want to trip, and remove packet data
until that value matches the preskip value from the header.

The value is set to the preskip value from the header when
the decoder is initialized. We also need to do this after
seek. To do this we add a specialized nsOggReader::ResetDecode
method which takes a boolean argument, set to true when
we are seeking to the start of the stream. In that case,
the method resets the skip count.

There is still an issue after general seeks. The spec recommends
trimming a full 80 ms (3840 frames) to allow the decoder to fully
settle from the previous state. It's tricky to do this inside
nsOpusState because it doesn't know where it is in the stream.

Also add some debug output to track the decode behaviour.
2012-05-31 16:03:14 +12:00
Abhishek Bhatnagar
dfa16e20ca Bug 500784 - Video/Audio files over 2^31 bytes now return proper durations; r=cpearce
--HG--
extra : rebase_source : 219872db85890a3358456dde226a29595e738f1b
2012-05-31 14:33:15 +12:00
Chris Double
0e0ad7b069 Bug 758481 - When seeking in an unbuffered range after having ended a media, networkState is NETWORK_IDLE r=chris.double
--HG--
extra : rebase_source : e62887187ed20ad6e832bd0211c50392759bb321
2012-05-31 14:30:23 +12:00
Gervase Markham
d4eb7d5782 Bug 759095 - upgrade license to MPL 2, and other licensing cleanups.
--HG--
extra : rebase_source : da55a4937383eda2baf7c9a362501da8ee664146
2012-05-29 16:52:43 +01:00
Robert O'Callahan
d57bfcf475 Bug 758583. Must acquire SourceMediaStream lock before MediaStreamGraph lock. r=jesup 2012-05-29 21:10:45 +12:00
Robert O'Callahan
04aca0d190 Bug 752796. Ensure that stream-finished notifications aren't accidentally dropped. r=jesup 2012-05-28 23:58:34 +12:00
Robert O'Callahan
ed8cb6b4ea Fix bustage for bug 755533 2012-05-28 11:08:59 +12:00
Chris Pearce
e47b0e115d Bug 755533 - Ensure we fire canplaythrough if the media's channel is suspended before metadata is loaded. r=roc 2012-05-28 10:40:06 +12:00
Robert O'Callahan
a0ecbc68c1 Bug 750258. Ensure that MediaStreamListener::NotifyBlockingChanged is always called for a new listener, and similar for NotifyFinished called on an already-finished stream. Rely on this to set readyState correctly for media elements consuming a stream. r=jesup,cpearce 2012-05-24 22:37:14 +12:00
Matthew Gregan
466717d80f Bug 726903 - Remove force_stereo_mode pref hack. r=roc
--HG--
extra : rebase_source : 513b926ace8904035111ddc21aa237fd1c28090c
2012-05-24 14:40:09 +12:00
Robert O'Callahan
40634d31a8 Bug 753852. Don't try to notify the graph to perform its next iteration if this stream has been removed from the graph. r=jesup 2012-05-23 18:01:15 +12:00
Ralph Giles
ccedcedb77 Bug 757600 - Update the Opus version field parser. r=cpearce
On 2012 May 10, the Ogg encapsulation spec for Opus at
https://wiki.xiph.org/OggOpus bumped the version number
from zero to one. The one-byte field is also now notionally
split into major and minor subfields, with incompatible
changes signalled by the major field.

We update nsOpusState::DecodeHeader to parse the version
field separately from the stream identification and reject
any stream where the high four bits of the version field
is non-zero.

The opus-tools repo was updated 2012 May 22 to set with
version = 1. This commit enables playback of those files.
2012-05-22 20:21:46 -04:00
Robert O'Callahan
ddf43b9099 Bug 750769. Prevent mCurrentFrameTime from advancing during DecodeSeek. r=cpearce 2012-05-22 21:56:02 +12:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Benjamin Smedberg
4f91700da9 Bug 734847 part 2 - treewide changes resulting from the default-infallibility of hashtables; either remove useless result checks, or use the fallible version of APIs, depending on context, r=jlebar
--HG--
extra : rebase_source : 844b008c5167e6ca39a7ba9eeec8b30672938704
2012-05-18 13:30:49 -04:00
Paul Adenot
67bfe4f064 Bug 756372 - Change |seeking| to prevent seeking in WebM livestream. r=kinetik 2012-05-18 13:35:43 -04:00
Ms2ger
f484c0a6e7 Bug 754643 - Disable FAIL_ON_WARNINGS in content/media because new warnings were introduced. 2012-05-18 10:57:20 +02:00
Ms2ger
3d92167c95 Bug 754643 - Enable FAIL_ON_WARNINGS in content/media; r=cpearce f=roc 2012-05-18 10:29:38 +02:00
Landry Breuil
5013c7f815 Bug 732875 - use stdint.h types instead of PRtypes, fixes build on OpenBSD - r=Ms2ger 2012-05-17 10:07:26 -04:00
Dão Gottwald
eef4562580 Backed out changeset ee527adf9d44 2012-05-17 16:47:36 +02:00
Landry Breuil
781da02081 Bug 732875 - use stdint.h types instead of PRtypes, fixes build on OpenBSD - r=Ms2ger 2012-05-17 10:07:26 -04:00
Benoit Jacob
17b0e7f92d Bug 732875 - 8/8 - move CheckedInt to MFBT, enable unit tests in mfbt/tests - r=jwalden
--HG--
rename : xpcom/ds/CheckedInt.h => mfbt/CheckedInt.h
2012-05-14 15:50:20 -04:00
Paul Adenot
10113aabe9 Bug 599217 - WebM buffered: should use duration for end time of last buffered range. r=kinetik 2010-09-24 13:57:30 +12:00
Paul Adenot
377eba55e7 Bug 449363 - Support media attribute of <source> elements. r=cpearce,bz 2012-05-15 08:56:51 -04:00
Robert O'Callahan
ea9226410e Bug 750769. Add more logging. r=cpearce 2012-05-15 17:57:29 +12:00
Robert O'Callahan
f1893f0756 Bug 750769. Clarify that mNextState can only be PLAY_STATE_PAUSED or PLAY_STATE_PLAYING. r=cpearce 2012-05-15 17:57:23 +12:00
Robert O'Callahan
cbe63bfaf7 Bug 750769. Clarify thread-safety guarantees around mPlayState and mNextState. r=cpearce 2012-05-15 17:57:17 +12:00
Ed Morley
8b2dbc3dca Backout 345ae68f15f4, b3b40121ac8d, 0d18b7a246d7, 9dbb6064ab58, dee9d7fa8eb6, 63eec6bfa948, 323c6be7cfe8 & f4aac7523a48 (bug 732875) for compilation failures 2012-05-14 21:05:24 +01:00
Benoit Jacob
8fbc0a34da Bug 732875 - 8/8 - move CheckedInt to MFBT, enable unit tests in mfbt/tests - r=jwalden
--HG--
rename : xpcom/ds/CheckedInt.h => mfbt/CheckedInt.h
2012-05-14 15:50:20 -04:00
Daniel Holbert
10d3de74a3 Bug 664918 followup: Add missing */ terminator on emacs modeline in header comment for new files nsDOMMediaStream.cpp and MediaStreamGraph.cpp. (no review, comment-only) DONTBUILD 2012-05-11 10:35:36 -07:00
Christopher De Cairos
a51913e89c Bug 726904: Make nsVideoFrame::GetVideoIntrinsicSize return the video size before the poster size. r=cpearce 2012-05-11 20:32:15 +12:00
Robert O'Callahan
070d0a8c52 Bug 750258. Small cleanup to make it more obvious why mCurrentTime is initialized to 1. r=jesup 2012-05-10 15:30:34 +12:00
Robert O'Callahan
9d68bc375d Bug 750769. Dump currentTime/paused/ended/readyState on every event. r=cpearce 2012-05-10 15:30:34 +12:00
Robert O'Callahan
cc41b328ac Bug 752784. Don't mess with tracks we haven't initialized yet. r=cpearce 2012-05-10 15:30:34 +12:00
Randell Jesup
c601502ac4 Bug 752784: protect against media not having a track of the required type r=roc 2012-05-09 01:53:49 -04:00
Randell Jesup
e15eb3b014 Bug 752087: Use correct method to check is a jsval is an object r=roc 2012-05-07 18:54:29 -04:00
Daniel Holbert
13a38085d0 Bug 664918 followup: Add missing */ terminator on emacs modeline in header comment for new file StreamBuffer.cpp. (no review, comment-only) DONTBUILD 2012-05-07 11:22:44 -07:00
Chris Pearce
d8ae112372 Bug 752141 - Release media decoder monitor when finishing audio stream. r=kinetik 2012-05-07 17:12:52 +12:00
Robert O'Callahan
137a9cf106 Bug 750258. Fix bustage. 2012-05-07 15:57:52 +12:00
Robert O'Callahan
094c73799f Bug 750258. Set intial audio capture state correctly on mDecoderStateMachine. r=cpearce
For media resources whose streams are captured before the load has started, we shouldn't even start
an audio thread. This saves a lot of resources and ensures we don't see races between the audio thread
and the code that copies packets from the audio queue to the MediaStreams.
2012-05-07 15:45:06 +12:00
Robert O'Callahan
b1c494a351 Bug 750258. Advance mBlockingDecisionsMadeUntilTime to include time lost when the media graph control thread was stopped and all streams had underruns. r=jesup
The first part just handles the case where nsAudioStream failed to allocate a stream. It won't be playing
anything, so instead of trying to get the audio position, just fall back to the media graph current time.
Otherwise GetPositionInFrames returns -1 and things go badly from there.
The second part simplifies the calculation of the next mCurrentTime to just make it based on real time.
We had some code to not let it advance past the end of a stream's buffer, but the next part will make that
unnecessary.
The third part is the real fix. When the new current time has advanced past mBlockingDecisionsMadeUntilTime,
that means the control loop didn't run in time to replenish the audio output buffers and keep up with its
other duties. Effectively all streams have been blocked between mBlockingDecisionsMadeUntilTime and
the new current time. Account for that by adding the difference as extra blocked time for every stream.
We only need to ensure that the stream is marked blocked from mBlockingDecisionsMadeUntilTime indefinitely
far into the future, and then update mBlockingDecisionsMadeUntilTime to the new current time, because the
code takes into account that only blocking decisions up to mBlockingDecisionsMadeUntilTime are valid.
2012-05-07 15:44:41 +12:00