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

297 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 4dcc0f9b5b Bug 1243538: P1. Make MediaInfo::mImage an nsIntSize again and introduce a mImageRect member. r=mattwoodrow
MozReview-Commit-ID: 3iVCA1b7bHc
2016-04-20 17:43:35 +10:00
Jean-Yves Avenard 778f74db59 Bug 1262727: [webm] Ensure first frame returned after seek is a keyframe. r=kinetik
Same after a reset or the first frame ever returned by the demuxer.

MozReview-Commit-ID: 6b7XlIk5GE4

--HG--
extra : rebase_source : 7e7b92c2ed7ea6973ad3869477b3110925a64525
2016-04-07 17:40:16 +10:00
bechen fd7bde80bb Bug 1215115 - part2: Mux opus into webm, remove bitdepth. r=rillian
MozReview-Commit-ID: 7D74vONbkFP

--HG--
extra : transplant_source : 2%AA%C8%F34%1E%CF%3C%9B%88%AC%AD%9F-%DC%7C%FE%B1m%5D
2016-04-01 11:04:00 +08:00
Bryce Van Dyk a0436efae3 Bug 1232045 - WebMDemuxer handles resolution changes. r=jya
Update the WebMDemuxer to detect changes in resolution. When it does so it
changes the streamID so that we get a new decoder created to handle the
resolution change. The demuxer will also update media info in these cases, so
the new decoder has the correct information. The demuxer will only handle
resolution changes on key frames, files that attempt changes other times are not
considered valid at this stage. If a resolution change cannot be performed
because nest_egg cannot read track info, or because the new resolution is
invalid, a change will not take place.

MozReview-Commit-ID: 1JKz3mGbEvi

--HG--
extra : rebase_source : aebd609651dfbd48d2f6ea3e33986a7e12b1495e
2016-03-15 00:28:47 +13:00
Jean-Yves Avenard cbdcb3df1f Bug 1246536: [webm] Only use discard padding information on last packet. r=kinetik
MozReview-Commit-ID: 3MYm25HfX0N

--HG--
extra : rebase_source : c4d657d232d852e341114d4f966362005c9c4087
2016-03-15 18:03:30 +11:00
Bryce Van Dyk 939ab2b661 Bug 657791 - Update seekable range handling for cueless WebMs. r=kinetik
MediaDecoder previously had 3 states within GetSeekable(), media is either
seekable, seekable but not supported by transport, or not seekable. Due to
changes to make cueless webms playable, a 4th option is needed: a file that is
not fully seekable, but may support seeking from the transport, such as these
webms, should only be seekable in the buffered range.

MozReview-Commit-ID: ISeFkngtrGU
2016-02-04 17:31:21 +13:00
Bryce Van Dyk 25356d3a7c Bug 657791 - Update WebM demuxer to clamp cueless seeks instead of failing. r=kinetik
Previously if a seek time is specified outside of the buffered range for
certain WebMs (particularly those without cues) the WebMDemuxer would fail out
of SeekInternal() with an error code. However, this would lead to issues due to
inconsistent state (recovery was not made from a failed seek). This change
attemps to address this by instead seeking to the final available cluster.

MozReview-Commit-ID: GZLPZDWLcT1
2016-02-01 13:46:02 +13:00
Bryce Van Dyk 2fbed74f6a Bug 657791 - Update WebM demuxer to consider cue-less WebMs seekable. r=jya
It appears that the work to seek in WebMs that do not have cues has already been
done, however this functionality was gated by the IsSeekable() function still
returning that such WebMs were not seekable. This updates that function so that
WebMs without cues are now considered seekable. Tests are also updated to
reflect this.
2016-01-19 11:43:49 +13:00
sakshi 1af0b67296 Bug 1197311 - Remove PR_snprintf calls in dom/ r=froydnj 2016-02-17 14:23:39 -05:00
Gerald Squelart af8cc983cf Bug 1143096 - Init all WebMBufferedParser members - r=kinetik
Initialize all WebMBufferedParser members, mainly to remove compiler warnings.
'mClusterTimecode' and 'mClusterOffset' are probably genuine potential issues,
see bug 1143096 comment 2 for details.
2016-02-03 14:25:47 +11: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
Jean-Yves Avenard b8299c5f79 Revert "Bug 1240201: [vorbis] P1. Properly determine sample duration and time in webm demuxer. r=kinetik"
This reverts commit c0a4a296
2016-01-23 12:42:02 +11:00
Jean-Yves Avenard 30a05ebd7f Revert "Bug 1240201: [opus] P2. Properly determine sample duration and time in webm demuxer. r=kinetik"
This reverts commit d8eb98e2
2016-01-23 12:42:02 +11:00
Jean-Yves Avenard 6369bae28e Bug 1240201: [opus] P2. Properly determine sample duration and time in webm demuxer. r=kinetik 2016-01-23 02:50:06 +11:00
Jean-Yves Avenard 9b20eae811 Bug 1240201: [vorbis] P1. Properly determine sample duration and time in webm demuxer. r=kinetik 2016-01-23 02:50:06 +11:00
Wes Kocher 56d625df80 Backed out 2 changesets (bug 1240201) for Windows wpt bustage
Backed out changeset b06a049cafb7 (bug 1240201)
Backed out changeset 69b695ad6d43 (bug 1240201)

--HG--
extra : commitid : KSF0gTfQB2
2016-01-21 12:28:24 -08:00
Jean-Yves Avenard b7eecc5ada Bug 1240201: [opus] P2. Properly determine sample duration and time in webm demuxer. r=kinetik 2016-01-22 00:40:56 +11:00
Jean-Yves Avenard b20992e3b8 Bug 1240201: [vorbis] P1. Properly determine sample duration and time in webm demuxer. r=kinetik 2016-01-22 00:40:56 +11:00
Jean-Yves Avenard c27ab6683c Bug 1237629: [webm] Parse into BlockGroup element. r=kinetik 2016-01-20 09:50:27 +11:00
Jean-Yves Avenard 58d924fab9 Bug 1236703: P2. Add methods to retrieve debugging data on plain readers. r=jwwang 2016-01-20 09:50:26 +11:00
Jean-Yves Avenard fcaa513106 Bug 1240411: P4. Clean up readers headers. r=cpearce
Remove redundant virtual keyword and add missing override if any.
2016-01-19 19:47:31 +11:00
Chris Peterson 74f570e360 Bug 1240264 - Annotate intentional switch fallthroughs in dom/media/. r=cpearce
dom/media/MediaManager.cpp:1905:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/media/webm/WebMBufferedParser.cpp:133:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2016-01-14 01:42:18 -08:00
Matthew Gregan 693045c49f Bug 1231855 - Avoid inserting out of (timecode) order entries in WebMBufferedParser. r=jya 2016-01-05 14:50:50 +13:00
Jean-Yves Avenard de7c0385a1 Bug 1230054: Remove unused WebMReader. r=kinetik 2015-12-23 01:15:46 +11:00
Phil Ringnalda a54f2a1eda Back out ce4623289f7f (bug 1230054) for crashtest bustage in 789075-1.html/795892-1.html, Android mochitest-chrome bustage in test_texttrack_chrome.html, and probably Gij video_list_test.js
CLOSED TREE
2015-12-03 22:12:01 -08:00
Jean-Yves Avenard 7b1c9931c6 Bug 1230054: Add missing headers ON A CLOSED TREE. r=me 2015-12-04 15:56:46 +11:00
Jean-Yves Avenard b2545f9af0 Bug 1230054: Remove unused WebMReader. r=kinetik 2015-12-04 15:23:43 +11:00
Jean-Yves Avenard 72d555ab40 Bug 1191833: P1. Properly check webm mimetype against codec type. r=cpearce
Also move the logic inside WebMDecoder, this continue on with the logic used by MP4Decoder
2015-12-04 14:43:46 +11:00
Nathan Froyd ffeb7c7fe3 Bug 1229963 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in dom/media/; r=cpearce 2015-12-02 18:07:59 -05:00
Nathan Froyd c381a6b86c Bug 1218454 - part 2 - don't #include nsContentUtils.h from CallbackObject.h; r=bz
We used to need nsContentUtils.h here for nsCxPusher, but since that got
moved to ScriptSettings.h, we no longer need nsContentUtils.h for
anything.
2015-10-26 12:14:47 -04:00
JW Wang e4cbe0c128 Bug 1228939 - 1. add mSeekable to MediaInfo. 2. use MediaEventSource to notify the decoder when the media is not seekable. 3. remove unused code. r=jya. 2015-12-02 15:42:32 +08:00
Jean-Yves Avenard c8c275cee2 Bug 1227396: P7. Replace nsTArray<MediaByteRange> with dedicated MediaByteRangeSet object. r=cpearce 2015-11-30 11:29:34 +11:00
Chris Pearce cea22429d5 Bug 1226450 - Report audio/video codecs used in HTMLMediaElement and WebAudio via telemetry. r=jya 2015-11-25 12:52:48 +13:00
Guang-De Lin 42c53cfea9 Bug 1154213 - Handle timestamps of video/webm vorbis track encoding. r=mreavy, r=rjesup 2015-11-18 10:51:07 +08:00
sajitk 582e1a55fa Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher f3a9eb2a26 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE
--HG--
extra : commitid : BMVKq6cPeho
2015-11-11 09:36:56 -08:00
sajitk 3cbe348cdd Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG--
extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
2015-11-11 06:52:00 +01:00
JW Wang 2c0bf35e10 Bug 1220551. Part 2 - remove arguments from NotifyDataArrivedInternal(). r=jya. 2015-11-02 21:28:57 +08:00
JW Wang 71274437c8 Bug 1220551. Part 1 - fix the parameters passed to mBufferedState->NotifyDataArrived(). r=jya. 2015-11-02 21:28:53 +08:00
Nathan Froyd 1f0804852a Bug 1220491 - clarify ownership relationships for creators of AudioData; r=gerald
The way we pass in AudioDataValue arrays into AudioData is non-uniform:
sometimes we have nsAutoArrayPtrs, sometimes we don't, and it's not
immediately obvious from the function signature of the constructor that
we're actually taking ownership of this array.  Let's fix that by using
UniquePtr<AudioDataValue[]> smart pointers to hold the data prior to
creating AudioData values, and for passing in to AudioData's
constructor.  Using standard-er C++ things instead of our homegrown ones
is a good thing.
2015-11-01 17:34:26 -05:00
Jean-Yves Avenard fd8146966c Bug 1218157: Only ever read from cached data in NotifyDataArrived. r=cpearce
The logic of queuing NotifyDataArrived and read data there was fundamentally flawed as we would continually perform reads from the same MediaResource at two different ends.
This would cause repetitive seeks and data being removed from the media cache. Worse, a read in NotifyDataArrived would cause another NotifyDataArrived to be scheduled.

As range-request are extremely slow, it would result in stutters and constant interruptions.
2015-10-29 10:18:58 +11:00
JW Wang 924432c2ee Bug 1217714 - Remove some unused functions from MediaDecoderReader. r=jya. 2015-10-26 14:10:29 +08:00
JW Wang 8cbe3a5118 Bug 1216850. Part 1 - backout bug 1215003. r=me. 2015-10-21 10:59:56 +08:00
Nathan Froyd e1dc7934e4 Bug 1190472 - part 3 - optimize pushing an entire queue onto MediaRawDataQueue; r=kinetik
In the one place we push a MediaRawDataQueue onto a MediaRawDataQueue,
we don't use the pushee aftewards.  It's more efficient to indicate that
by using Move(), and we can then save on reference-counting things
needlessly.
2015-10-01 19:06:50 -04:00
Nathan Froyd 0bc5c6fc4d Bug 1190472 - part 2 - delete unused MediaRawDataQueue::Push method; r=kinetik
We don't call it, and it's not particularly efficient anyway.
2015-10-01 19:04:02 -04:00
Nathan Froyd eafdc95974 Bug 1190472 - part 1 - improve MediaRawDataQueue's reference-counting behavior; r=kinetik
Sometimes when we push onto the queue, we don't need to hold a reference
afterwards.  In that case, we can pass the reference in and avoid
unnecessary reference counting.
2015-10-01 19:02:18 -04:00
JW Wang 9e488683b4 Bug 1215003. Part 2 - rename AsyncReadMetadata and move it to the private section. r=gerald. 2015-10-19 10:52:15 +08:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Jean-Yves Avenard 6db8b43cba Bug 1213176: P1. Remove most MediaFormatReader dependencies on its MediaDecoder parent. r=jwwang
The LayersBackend can be defined at construction time, however if a parent MediaDecoder exists, the value will be overwritten by the MediaDecoderOwner value.

--HG--
extra : rebase_source : fefad83560d5bfa2aee9f665fe138397eb390019
2015-10-15 02:04:00 +02:00
JW Wang e868f91ff6 Bug 1214989. Part 2 - add MediaDecoderOwner to Clone() and overrides. r=gerald. 2015-10-15 11:37:47 +08:00
JW Wang e470e1616d Bug 1214989. Part 1 - add MediaDecoderOwner to the constructors of MediaDecoder and sub-classes. r=gerald. 2015-10-15 11:36:21 +08:00
JW Wang d3c9b0b0df Bug 1212723. Part 2 - remove unused argument aCloneDonor from MediaDecoderReader::Init(). r=jya. 2015-10-13 15:28:57 +08:00
JW Wang 8dc6926042 Bug 1212723. Part 1 - don't share mBufferedState per bug 1212723 comment 6. r=jya. 2015-10-13 15:28:50 +08:00
JW Wang 9268cc5ba6 Bug 1213726 - Remove AbstractMediaDecoder::HasInitializationData(). r=kinetik. 2015-10-12 12:08:46 +08:00
JW Wang a072559a2a Bug 1212701. Part 1 - remove AbstractMediaDecoder::OnDecodeTaskQueue(). r=jya. 2015-10-12 12:05:49 +08:00
JW Wang 32c513290f Bug 1212246. Part 1 - remove the aBorrowedTaskQueue parameter from the MediaDecoderReader constructor. r=jya. 2015-10-09 09:25:23 +08:00
Jean-Yves Avenard 628247fc4e Bug 1212176: Remove arguments passed to MediaDataDemuxer::NotifyDataArrived API. r=cpearce
Be more explicit on what it does and how it should be used.
2015-10-08 20:47:21 +11:00
Jean-Yves Avenard 61bf9de8cf Bug 1206977: [webm] P7. Remove IntelWebMVideoDecoder. r=kinetik
That code path is no longer used and handled directly in the MediaFormatReader.

Also, partially revert commit ac6d0b0befb2 as it broke WebMReader.
2015-10-08 00:34:45 +11:00
Nigel Babu 1a01355c4f Backed out 16 changesets (bug 1206977, bug 1211652, bug 1211335) for linux bc7 bustage ON A CLOSED TREE
Backed out changeset 51b1b076a386 (bug 1206977)
Backed out changeset dec7c35469d1 (bug 1206977)
Backed out changeset bf9ddc78b394 (bug 1206977)
Backed out changeset 08f5cff5aa12 (bug 1206977)
Backed out changeset e4e91de99867 (bug 1206977)
Backed out changeset 696ecf2e2947 (bug 1206977)
Backed out changeset ab2d524a9b35 (bug 1206977)
Backed out changeset d66be0e4547f (bug 1206977)
Backed out changeset 64c58afbd6c1 (bug 1206977)
Backed out changeset eb10d09015e1 (bug 1206977)
Backed out changeset 042959216393 (bug 1206977)
Backed out changeset 7e0de7f62202 (bug 1206977)
Backed out changeset 3d095569f6ba (bug 1206977)
Backed out changeset 041418a07ae5 (bug 1206977)
Backed out changeset 654970da23e4 (bug 1211335)
Backed out changeset 8ba8e24a84d3 (bug 1211652)
2015-10-07 13:43:39 +05:30
Jean-Yves Avenard 6c9f5d0954 Bug 1206977: [webm] P7. Remove IntelWebMVideoDecoder. r=kinetik
That code path is no longer used and handled directly in the MediaFormatReader.

Also, partially revert commit ac6d0b0befb2 as it broke WebMReader.
2015-10-07 16:40:27 +11:00
Nicholas Nethercote d0c4a9db1b Bug 1208300 (part 4) - Remove gfxRGBA and some related things. r=jwatt.
Hooray!

--HG--
extra : rebase_source : d691b55eef5a8655aa98b81b5398452a5ebe860d
2015-09-24 19:24:16 -07:00
Jean-Yves Avenard 9323ac2f6a Bug 1208799: [webm] Use first track found. r=kinetik 2015-09-29 11:37:14 +10:00
Jean-Yves Avenard 33e5945370 Bug 1204407: P2. Remove no longer required MediaDataDemuxer APIs. r=cpearce 2015-09-16 18:14:15 +10:00
Jean-Yves Avenard 71c5c9a7bf Bug 1204419: P4. Remove MediaDataDemuxer API no longer used. r=cpearce 2015-09-16 18:14:12 +10:00
Jean-Yves Avenard 82279827e6 Bug 1204419: P3. Remove now unused MediaDecoderReader functions. r=cpearce 2015-09-16 18:14:12 +10:00
Jean-Yves Avenard b3c3e04b18 Bug 1204419: P1. Fix webm headers. r=kinetik 2015-09-16 18:14:10 +10:00
Jean-Yves Avenard 5264765a6e Bug 1204776: P1. Have the PlatformDecoderModules use their own log. r=cpearce
Stop using MP4Demuxer.
2015-09-16 12:26:03 +10:00
Jean-Yves Avenard 89ddcfa7d2 Bug 1203367: Ensure WebMBufferedState is only used after reading metadata. r=kinetik
We also now limit the use of the WebMBufferedState for calculating the buffered range and seeking on buffered data.
2015-09-14 19:06:50 +10:00
Jean-Yves Avenard 581a68abf1 Bug 1199518: [webm] P2. Properly determine next keyframe time. r=kinetik 2015-09-12 20:53:25 +10:00
Jean-Yves Avenard 5cf23489c2 Bug 1199518: [webm] P1. Have WebMDemuxer use its own logger. r=kinetik 2015-09-12 20:53:24 +10:00
Nathan Froyd 9157524ebc Bug 1202474 - improve refcounting behavior of webm decoders; r=kinetik
We can remove refcounted things from deques without unnecessary refcounting.
2015-09-07 20:36:47 -04:00
Jean-Yves Avenard 268aac6476 Bug 1199878: [webm] P2. Hold one frames for which the duration can't be known or estimated. r=kinetik 2015-09-01 10:47:07 +12:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Jean-Yves Avenard 549614ffc0 Bug 1197125: [webm]. Don't load the entire webm in RAM. r=kinetik
Instead we parse it in chunks of 1MiB max.
2015-08-28 14:06:35 +10:00
Jean-Yves Avenard 49a576c670 Bug 1199032: [webm] P1. Explicitly differentiate WebM usage for mediasource. r=kinetik
Relying on the data being fully buffered or not turned out to not be such a great idea.
2015-08-28 14:06:33 +10:00
Jean-Yves Avenard 47be293ebc Bug 1197977: [webm]. Ensure resource length calculation never underflows. r=kinetik 2015-08-27 12:28:20 +10:00
Jean-Yves Avenard de9d322fe5 Bug 1195073: [webm] P6. Calculate cluster's end offset if its size is known in advance. r=kinetik.
This allows to detect the end of a webm media segment without having to wait for the start of a new one.
Also record where an init segment (EBML) starts as this will be required by the WebM ContainerParser.
2015-08-24 23:13:49 +10:00
Jean-Yves Avenard e4dff83b7a Bug 1195073: [MSE] P5. Detect out of order appends and recreate demuxer. r=gerald
The webm demuxer will only handle data where frames's a monotonically increasing.
2015-08-24 23:13:49 +10:00
Jean-Yves Avenard 3cd00ea187 Bug 1195073: [MSE/webm] P4. Limit nestegg reads to the last block's boundaries. r=kinetik
This prevent entering into an unrecoverable error state when parsing incomplete data as often seen with MSE.
2015-08-24 23:13:48 +10:00
Jean-Yves Avenard 83205f837d Bug 1195073: [webm] P3. Initialize members. r=kinetik 2015-08-24 23:13:48 +10:00
Jean-Yves Avenard b793485c9a Bug 1195073: [webm] P2. Add WebMBufferedState::GetLastBlockOffset method. r=kinetik
MSE may input partial media segment, which could cause the WebMDemuxer and libnestegg to error upon encountering an incomplete block which can't be recovered from.
this will allow to limit read to known complete blocks.
2015-08-24 23:13:47 +10:00
Timothy B. Terriberry e81c9798f0 Bug 1196353 - Use standard Xiph extradata format to pass headers from demuxers to decoders. r=jya 2015-08-21 10:17:00 -04:00
Jean-Yves Avenard 466c5f2646 Bug 1194884: [webm] P1. Use MediaResourceIndex. r=j^
Remove duplicated code.
2015-08-16 11:58:40 +10:00
Aryeh Gregor 15205c18ac Bug 1179451 - Part 4: Don't pass nsRefPtr&& to functions that want raw pointers. r=froydnj
--HG--
extra : rebase_source : d25c43a593a72615259e39ae053376f261aa55ad
2015-08-13 15:22:48 +03:00
Jean-Yves Avenard 9baf704f1b Bug 1190238: P3. Do not loop calling MediaResource::Read or ReadAt, let MediaResourceIndex do it for us. r=cpearce
This allows to remove a fair amount of duplicated logic.
Most of it is in obsoleted code though.
2015-08-13 15:27:10 +10:00
Jean-Yves Avenard b55f0cf63a Bug 1190238: P1. Remove MediaResource::Read/Seek. r=cpearce
This functionality is now replaced with a dedicated new MediaResourceIndex class.
This allows for concurrent Read/Seek use of the MediaResource without having side effects.
2015-08-13 15:27:09 +10:00
Bobby Holley bdf89c24e4 Bug 1190495 - Separate FlushableTaskQueue into its own file. r=cpearce
This thing is garbage, and I don't want to hoist it into XPCOM.
2015-08-11 08:55:18 -04:00
Jean-Yves Avenard c74d906393 Bug 1146086: Properly marking overridden member with override keyword. v2. a=bustage 2015-08-11 16:42:42 +10:00
Jean-Yves Avenard 9545c5cfd6 Bug 1146086: Properly marking overridden member with override keyword. a=bustage
Interesting that it was never picked up, until only one was done.
2015-08-11 16:26:20 +10:00
Alfredo Yang 8c59fda383 Bug 1146086: use promise to Init() in PlatformDecoderModule. r=jya,r=cpearce 2015-08-11 14:09:12 +10:00
Chris Pearce 8ded1472c3 Bug 1190252 - Remove use of mozilla\/Tokenizer from GMPChild so bug 1190252 can be uplift to 41. r=gerald 2015-08-11 10:27:41 +12:00
Jan Gerber 833434e663 Bug 1185792: [webm] P1. Make MediaInfo.mFrame nsIntRect for visible area. r=jya 2015-08-07 19:31:38 +10:00
Jean-Yves Avenard 8c8e3b2a70 Bug 1190258: P1. Use getter to access MediaRawData mData and mSize member. r=cpearce 2015-08-06 18:48:44 +10:00
Bobby Holley c4645a718b Bug 1190496 - Namespace the SharedThreadPool.h include. r=cpearce 2015-08-04 14:00:25 -07:00
Jan Gerber bc5430d2fd Bug 1185792: [webm] P1. Don't clear mNeedReIndex if GetCachedRanges is emtpy. r=jya 2015-07-30 15:10:05 +10:00
Jean-Yves Avenard d614b68bdf Bug 1183888: Report empty buffered ranges unless we have a start time. r=bholley 2015-07-24 23:02:20 +10:00
Alfredo Yang 8393a2233e Bug 1163486 - Remove MP4Reader. r=jya 2015-07-21 02:48:00 +02:00
Carsten "Tomcat" Book de3872af29 Backed out changeset 1704ea727e81 (bug 1163486) for at least b2g bustage 2015-07-21 08:42:54 +02:00
Alfredo Yang 23c919b20e Bug 1163486 - Remove MP4Reader. r=jya 2015-07-20 19:25:00 +02:00
Jan Gerber 8f71a8484f Bug 1034081 - Never seek before startTime. r=rillian
Only adjust seek target up to startTime

--HG--
extra : rebase_source : 1154392a32c97b227f6293be06cbe1a31ab960e0
2015-07-14 05:59:00 -07:00
Jan Gerber 7bed9a2be5 Bug 1148102: P7. Hookup WebMDemuxer. r=jya 2015-07-20 17:27:08 +10:00
Jan Gerber 6946238e5e Bug 1148102: P6. Add WebMDemuxer object. r=jya 2015-07-20 17:27:08 +10:00
Jan Gerber 539c579cdd Bug 1148102: P4. Split WebMPacketQueue, use nsRefPtr instead. r=jya 2015-07-20 17:27:07 +10:00
Jan Gerber 186d37e9f7 Bug 1148102: P2. Split NesteggPacketHolder from WebMReader. r=jya 2015-07-20 17:27:06 +10:00
Jean-Yves Avenard 8dc9090482 Bug 1148102: P1. Mark WebMBufferedParser refcounting as thread-safe. r=kinetik
This is required should we use WebMBufferedParser in a MediaTaskQueue as we don't know which actual thread will actually be used.
2015-07-20 17:27:05 +10:00
Bobby Holley 04eaf4c167 Bug 1184634 - Move various includes into the mozilla namespace. r=gerald
I did my a quick best-effort pass to fix up the most egregious ordering
problems. I left some big pre-existing messes alone.
2015-07-16 22:23:18 -07:00
Bobby Holley 997543e6ba Bug 1184634 - Rename MediaTaskQueue to TaskQueue. r=gerald 2015-07-16 22:23:06 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Bobby Holley f15bd05ef7 Bug 1179110 - Use a Maybe<> to store start time, rather than using -1 as a sentinel. r=jya
This allows us to properly support videos with a negative start time, which
is happening here.
2015-07-02 12:05:17 -07:00
Bobby Holley a80e87862b Bug 1175768 - Use mirroring for buffered ranges. r=jya 2015-06-27 01:19:13 -07:00
Bobby Holley f25ea07acc Bug 1175768 - Dispatch NotifyDataArrived and remove the aBuffer argument. r=jya
It would be nice to remove the argument in a separate patch, but we can't
perform MediaResource reads on the main thread, so the SilentReadAt stuff
needs to happen at the same time as the off-main-thread stuff.
2015-06-27 01:19:10 -07:00
Matthew Gregan dfed61553f Bug 1177243 - Use PodZero rather than memset in WebM decoders. r=rillian 2015-06-25 17:23:35 -07:00
Jan Gerber ca28029a56 Bug 1104475 - Refactor Vorbis and Opus decoding out of WebMReader. r=kinetik 2015-06-19 10:24:57 +02:00
Ryan VanderMeulen d9ca5de3ed Backed out 8 changesets (bug 1175768) for frequent media test failures.
Backed out changeset a369cfb95b59 (bug 1175768)
Backed out changeset e02dd312d622 (bug 1175768)
Backed out changeset 6776ce74b9e5 (bug 1175768)
Backed out changeset 6aa5fa1d318e (bug 1175768)
Backed out changeset a8bd7a0d2aea (bug 1175768)
Backed out changeset 41ffc9a9ac48 (bug 1175768)
Backed out changeset 2d2cefa397dc (bug 1175768)
Backed out changeset 4e06368496d2 (bug 1175768)

CLOSED TREE
2015-06-23 16:20:15 -04:00
Bobby Holley 5c20ea36aa Bug 1175768 - Use mirroring for buffered ranges. r=jya 2015-06-22 22:53:09 -07:00
Bobby Holley 23c16e6894 Bug 1175768 - Dispatch NotifyDataArrived and remove the aBuffer argument. r=jya
It would be nice to remove the argument in a separate patch, but we can't
perform MediaResource reads on the main thread, so the SilentReadAt stuff
needs to happen at the same time as the off-main-thread stuff.
2015-06-22 22:53:07 -07:00
Bobby Holley 89519087bc Bug 1163223 - Move bailout case in GetBuffered into the readers. r=jww
The problem here is that, because we run mReader->SetStartTime() as a promise
callback, MDSM::HasStartTime() may be true while the reader hasn't been
notified yet. This is obviously broken, but no more broken than the fact that
GetBuffered operates synchronously (and is basically the last piece of
machinery left doing so). Fixing that is next on my list, but let's just hack
around this for now to get this stack landed.
2015-06-16 15:08:29 -07:00
Wes Kocher f45cfb1d2d Backed out 8 changesets (bug 1163223) for getting in the way of me backing out f46a712edf7e
Backed out changeset c1b33c43f0c5 (bug 1163223)
Backed out changeset a7ee6eb45f62 (bug 1163223)
Backed out changeset b2e10f194455 (bug 1163223)
Backed out changeset 9e7651567cad (bug 1163223)
Backed out changeset 20e25e93ed5f (bug 1163223)
Backed out changeset 5193508738f8 (bug 1163223)
Backed out changeset aea6b8d15318 (bug 1163223)
Backed out changeset 7b6804398fc3 (bug 1163223)
2015-06-16 14:47:50 -07:00
Bobby Holley 593a76d612 Bug 1163223 - Move bailout case in GetBuffered into the readers. r=jww
The problem here is that, because we run mReader->SetStartTime() as a promise
callback, MDSM::HasStartTime() may be true while the reader hasn't been
notified yet. This is obviously broken, but no more broken than the fact that
GetBuffered operates synchronously (and is basically the last piece of
machinery left doing so). Fixing that is next on my list, but let's just hack
around this for now to get this stack landed.
2015-06-16 12:59:56 -07:00
Bobby Holley adc66a3dab Bug 1173001 - Initialize reader task queue in the constructor. r=jww
This is a necessary step towards having mirrored/canonical values, since those
need to know the task queue in their constructor.
2015-06-10 14:17:25 -07:00
Bobby Holley f83f94efbb Bug 1160695 - Track "metadata duration" separately and mirror it to MediaDecoderReader. r=jww 2015-06-08 09:21:22 -07:00
Eric Rahm 75c4bebb79 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Eric Rahm 60ccf43cb3 Bug 1165515 - Part 7: Convert PR_LOG_DEBUG + 1 to PR_LOG_VERBOSE. rs=froydnj
Used the command: |sed -E -i -e 's/PR_LOG_DEBUG\s*\+\s*1/PR_LOG_VERBOSE/g'|
2015-06-03 15:22:32 -07:00
Eric Rahm f50b813989 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-03 15:22:28 -07:00
Matthew Gregan e19c34db37 Bug 1157991 - Remove buggy/unused multiple-frame-per-packet handling from WebM decoders. r=giles 2015-06-04 00:19:17 +12:00
Carsten "Tomcat" Book 5471309381 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)

--HG--
extra : rebase_source : 6fb850d063cbabe738f97f0380302153e3eae97a
2015-06-02 13:05:56 +02:00
Eric Rahm a9afd68cef Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00
Eric Rahm 7ac2b84d0c Bug 1165515 - Part 7: Convert PR_LOG_DEBUG + 1 to PR_LOG_VERBOSE. rs=froydnj
Used the command: |sed -E -i -e 's/PR_LOG_DEBUG\s*\+\s*1/PR_LOG_VERBOSE/g'|
2015-06-01 22:17:24 -07:00
Eric Rahm 141e0ff4a2 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 22:17:19 -07:00
Wes Kocher 4e9f80ed2e Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm f82c0e7caf Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 14:31:01 -07:00
Eric Rahm 82553a3fab Bug 1165515 - Part 7: Convert PR_LOG_DEBUG + 1 to PR_LOG_VERBOSE. rs=froydnj
Used the command: |sed -E -i -e 's/PR_LOG_DEBUG\s*\+\s*1/PR_LOG_VERBOSE/g'|
2015-06-01 14:31:00 -07:00
Eric Rahm dc090e3fe5 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 14:31:00 -07:00
Eric Rahm 3925a960aa Bug 1165515 - Part 1: Convert PR_LOG to MOZ_LOG. r=froydnj 2015-05-21 13:22:04 -07:00
Jean-Yves Avenard 54a681396b Bug 1163445: Part5. Replace dom::TimeRanges with TimeIntervals object. r=mattwoodrow 2015-05-18 16:15:47 +10:00
Eric Rahm 47d9aba92d Bug 1163201 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj 2015-05-14 10:13:23 -07:00
Eric Rahm 34f99e4b4c Bug 1163201 - Part 1: Remove instances of #ifdef PR_LOGGING in dom/. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
2015-05-14 10:13:23 -07:00
JW Wang fc64b939e2 Bug 1164297 - tweaks to logging modules of MediaDecoderStateMachine to remove accessing to env vars. r=cpearce. 2015-05-14 10:15:05 +08:00
Karl Tomlinson ff0a1eca14 bug 1161402 add MediaDataDecoderCallback::OnReaderTaskQueue() r=cpearce
--HG--
extra : rebase_source : 59323104c9ffca27e79a1da163d258c1a9ec22c2
2015-05-01 12:03:32 +12:00
Bobby Holley 4f3c199145 Bug 1158226 - Eagerly compute keyframe-ness and stash it on the packet holder. r=kinetik 2015-04-28 23:42:51 -07:00
Bobby Holley 3ed8d105fc Bug 1158226 - Separate packet demuxing from the higher-level track-sorting logic. r=kinetik 2015-04-28 23:42:50 -07:00
Bobby Holley 130cc25bda Bug 1158226 - Use NesteggPacketHolder::Timestamp to simplify code. r=kinetik 2015-04-28 23:42:49 -07:00
Bobby Holley 301c50d6de Bug 1158226 - Store timestamps on the NesteggPacketHolder. r=kinetik 2015-04-28 23:42:49 -07:00
Bobby Holley 7a713e7c96 Bug 1157840 - Refcount NesteggPacketHolder. r=kinetik 2015-04-23 16:30:08 -07:00
Andrea Marchesini e666f02521 Bug 1156632 - Remove unused forward class declarations - patch 2 - dom/media, dom/indexedDB, dom/svg, r=ehsan 2015-04-22 08:29:17 +02:00
Nicolas Silva e887c595eb Bug 1155621 - Remove no-op gfx2DGlue conversion helpers. r=Bas 2015-04-21 17:22:30 +02:00
Jean-Yves Avenard 4623f4873e Bug 1153049: Part4. Remove redundant mHasAudio/mHasVideo member. r=cpearce
--HG--
extra : rebase_source : f53f194f7e8c870024c39270a626bc41f2f79d0b
2015-04-14 15:17:51 +10:00
Jean-Yves Avenard 378df808cf Bug 1153049: Part3. Using AudioInfo/VideoInfo object. r=cpearce
This remove all remaining references to stagefright/MP4 specific objects.

--HG--
extra : rebase_source : 0f34f7851c0f22532dffb88c32ac83ebb962a7cc
2015-04-14 15:16:32 +10:00