Commit Graph

238 Commits

Author SHA1 Message Date
Jean-Yves Avenard
f59129b497 Bug 1347538: Don't reject seeks with EOS. r=kinetik
The MediaDecoderStateMachine treat seek's EOS as fatal errors, so instead we always resolve the seek promise, and let the next GetSample return EOS.

MozReview-Commit-ID: 6MGaJ3C8xrH

--HG--
extra : rebase_source : 50c111fb38f50e8a0c823aeef21e9635a88c0afc
2017-03-24 18:36:50 +01:00
Jean-Yves Avenard
10e0910cef Bug 1334508: Treat demuxing errors differently than EOS. r=kinetik
MozReview-Commit-ID: JZTjo8jxfCr

--HG--
extra : rebase_source : abbb3fd9f7733bf4d20f91942eab108462712257
2017-02-19 23:46:16 +01:00
Tom Tromey
5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Jean-Yves Avenard
52e09e4b68 Bug 1340129: P1. Allow empty raw frames. r=gerald
MozReview-Commit-ID: AU0QrahHtYe

--HG--
extra : rebase_source : 34604298e01db1b7b481fc55c25cb5f23e806fa2
2017-02-16 23:41:44 +01:00
Jean-Yves Avenard
36471a6bc1 Bug 1336431: P4. Rename SharedTrackInfo. r=gerald
into TrackInfoSharedPtr to better indicate what this class is about.
Adding cast operator to allow transparent conversion from TrackInfoSharedPtr to const TrackInfo*

MozReview-Commit-ID: 6RwXl5CG0fG

--HG--
extra : rebase_source : b5a7a0f06793c609e2eab60aacc4f76d96d6ec32
2017-02-13 19:18:05 +01:00
Jay Harris
4105b89c62 Bug 1306477 - Adds support for subsample encrypted WebMs r=cpearce
MozReview-Commit-ID: HzQKShlmcON

--HG--
extra : rebase_source : 7dc1b27f62b116bd9c0a3b182dde9e25736e591f
2017-02-07 13:30:08 +13:00
Jean-Yves Avenard
16bf821b42 Bug 1325707: P3. Fix coding style. r=gerald
Fixed coding style of files encountered in P1 and P2.

MozReview-Commit-ID: LApVu9K2oto

--HG--
extra : rebase_source : e3bb296baaec9df2011ff312fec2eda19dd125e6
2017-02-07 09:15:59 +01:00
Jean-Yves Avenard
ec59353902 Bug 1325707: P2. Handle OOM conditions when creating MediaRawData object. r=gerald
MozReview-Commit-ID: HtkhrT36Kf4

--HG--
extra : rebase_source : febe0c4114d8d888b152db3f7b5331c0fb32f442
2017-02-07 09:03:36 +01:00
JW Wang
992114f5fd Bug 1332160 - use nsCString internally whenever possible. r=gerald
MozReview-Commit-ID: 1DUaJWfbL88

--HG--
extra : rebase_source : f4a02736b0385e4be6258a185822f7855d0b0189
extra : intermediate-source : 1faaf4254a2e1ce2c096a8650b66d07c84c7fdbe
extra : source : c23fc2cea382627af8ff20ae3edea926eaa6d51a
2017-01-18 16:51:31 +08:00
Gerald Squelart
5745998021 Bug 1331770 - Rename 'MediaContentType' to 'MediaContainerType' - r=jya
MozReview-Commit-ID: F0BWai8vPyo

--HG--
rename : dom/media/MediaContentType.cpp => dom/media/MediaContainerType.cpp
rename : dom/media/MediaContentType.h => dom/media/MediaContainerType.h
extra : rebase_source : 640ada96750b4496055087e80ae3f600c9df31c9
2017-01-18 11:59:03 +11:00
Gerald Squelart
843031e2a5 Bug 1330284 - Use MediaContentType in WebMDecoder - r=jya
MozReview-Commit-ID: 5tcc9of73WR

--HG--
extra : rebase_source : 38ef74afdf27fec45f84f33f539717b3595358f2
2017-01-01 12:16:38 +11:00
Andreas Pehrson
b1d79c9b17 Bug 1231848 - Do not write framerate metadata to webm container in MediaRecorder. r=bechen,jesup,rillian
MozReview-Commit-ID: 2lehFGZTPxh

--HG--
extra : rebase_source : e9d416f33ff3b2c909417080654b0dbc9f7b39f9
2017-01-13 09:00:55 +01:00
Jean-Yves Avenard
e73c9ba70f Bug 1320705: P6. Fix codec mimetypes. r=gerald
MozReview-Commit-ID: FozWtbvDNnA

--HG--
extra : rebase_source : b256424224a10af4957fe4b8ed73347e3608f198
2016-12-02 12:23:23 +11:00
Jean-Yves Avenard
8639a53028 Bug 1320705: P4. Pass discard padding information from webm container. r=kinetik
MozReview-Commit-ID: G2OnV1iZohn

--HG--
extra : rebase_source : 02782a9fa3102890ec2dc910ef755bc0e719fb5e
2016-11-30 20:40:59 +11:00
karo
464c7bb954 Bug 1320829 - updated WebM demuxer to surface alpha information. r=jya
MozReview-Commit-ID: 1jBmc5KUEme

--HG--
extra : rebase_source : 65101540a1bba6041642b89151b545bb7971c3fa
2016-11-23 11:52:16 +13:00
Gerald Squelart
038cba7f2e Bug 1313497 - Pass TimeUnit by const& in MediaDataDemuxer - r=jya
Thanks to the previous patch, MediaDataDemuxer::Seek and
SkipToNextRandomAccessPoint (and all overrides in derived demuxers) can now
take their TimeUnit parameter by const&.

MozReview-Commit-ID: 6CqfjAXZ7Yk

--HG--
extra : rebase_source : c3453e4432d9e0281cf5eba55217b0c1d6312f5b
2016-11-13 15:13:51 +11:00
Jean-Yves Avenard
272037b262 Bug 1314533: P5. Abort when webm parser encounter an error. r=kinetik
MozReview-Commit-ID: 6XHthan8LLp

--HG--
extra : rebase_source : 1615507f27dcdee57d371d60d4ac58dd757c4adc
2016-11-04 23:01:49 +11:00
Jean-Yves Avenard
20dc9102e8 Bug 1299072: P12. Use MediaResult for MediaDataDemuxer promises. r=gerald
MozReview-Commit-ID: JeQrmoHbb8m

--HG--
extra : rebase_source : 1f4581e5789f18b358a6f5bb5f8595cc7a75110b
2016-09-12 12:22:20 +10:00
Carsten "Tomcat" Book
bf5be9e9d9 Backed out changeset 87880c0f7336 (bug 1300703) on request from jya 2016-09-07 14:14:31 +02:00
Jean-Yves Avenard
5d2aa966ca Bug 1300703: [webm] Use default duration if known. r=kinetik
MozReview-Commit-ID: J18IdDGkL62

--HG--
extra : rebase_source : fa1e1fdba214f0a0f70656f0523bc76f2cfe5662
2016-09-06 17:23:38 +10:00
Randell Jesup
ec4a1d7fa3 Bug 1294753: Flush WebM clusters if the timecode offset will over/underflow r=rillian 2016-08-18 00:31:13 -04:00
Randell Jesup
a1568bf7f1 Backed out changeset 96cf1604d227 (bug 1294753) 2016-08-18 02:21:41 -04:00
Randell Jesup
b7952dd505 Bug 1294753: Flush WebM clusters if the timecode offset will over/underflow r=rillian 2016-08-18 00:31:13 -04:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Jean-Yves Avenard
d9896af911 Bug 1289059: P1. Add MediaDemuxer generic logging. r=cpearce
MozReview-Commit-ID: 453QrMX1nWp

--HG--
extra : rebase_source : 679586d22a380e57c19c1e78b29e71282c08ecbf
2016-07-24 22:30:07 +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
Ralph Giles
b9106558db Bug 1282963 - Share CodecDelay prepend code. r=kinetik
Both the WebM and mp4 demuxers need to pack this value into
the the CodecSpecificConfig, so move the shared implementation
to the OpusDecoder, near where it is unpacked so the two can
be kept in sync.

MozReview-Commit-ID: 2pQaruJoAWr
2016-06-29 15:49:04 -07:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Bryce Van Dyk
a35190cc6e Bug 1257727, 1257729 - Update WebM handling to deal with encrypted WebMs. r=jya
- WebMDemuxer will read crypto information from WebM metadata.
- WebMDemumer adds crypto information to samples.
- WebMDemuxer can now return encryption info from GetCrypto().
- WebMDexmuer will not attempt to peek encrypted frames as it
will give back garbage data. This means resolution changes
internal to encrypted WebM files will not work.
- WebMDecoder now exposes a single string version of
CanHandleMediaType. This is done in the same way as the
Mp4Decoder, so that the future update to MediaKeySystemAccess
for WebM handling can maintain the same conventions.

MozReview-Commit-ID: CU3JVi3t7Vn

--HG--
extra : transplant_source : %87gn%5Bm%B5t%EA%9F%5Bh%B4%3B%9D%5E%AE%AB%AF%12%0A
2016-05-27 14:34:54 +12:00
Jean-Yves Avenard
5995268333 Bug 1274445: [webm] P1. Track separately audio track from video track. r=kinetik
Bug 1224973 added a new usage of the MediaDataDemuxer where we would seek only inside the video track. So we can't use a common nestegg context for demuxing both the audio and video.
So instead we now use two different nestegg context.

MozReview-Commit-ID: 4G86Na5abe2

--HG--
extra : rebase_source : 4f296a649f73ef2f37a770db2c8a0f7f0e5c54a2
2016-05-30 15:40:05 +10:00
Jean-Yves Avenard
adcff7f912 Bug 1276572: [webm] Fix MediaRawDataQueue::PushFront. r=jwwang
We want to add MediaRawDataQueue aOther at the front, not at the back.

MozReview-Commit-ID: 9icTWzRqS4u

--HG--
extra : rebase_source : 2713cbe952461c520a420925040be2de257f0596
2016-05-30 19:17:03 +10:00
Chris Peterson
11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
Matthew Gregan
3e8997c3fe Bug 1261900 - Allow WebMDemuxer to resume demuxing even after encountering EOS. r=jya
Use the recently added nestegg_read_reset API to restore the demuxer to the
last valid state so that MSE can reattempt parsing the next packet as more
data is added to the stream.
2016-04-22 23:10:00 +10:00
Jean-Yves Avenard
6ca9901bbc Bug 1261900: [webm] P9. Prevent null deref when webm logs are turned on. r=kinetik 2016-04-27 10:07:03 +10:00
Jean-Yves Avenard
b5b89317e9 Bug 1261900: [MSE/webm] P6. Don't unnecessarily calculate the next keyframe time. r=kinetik
MSE only uses the webm demuxer to demux all samples at once. Attempting to find the next keyframe as such always fail.
2016-04-22 16:41:52 +10:00
Jean-Yves Avenard
ebffea1ce6 Bug 1261900: [MSE/webm] P5. Re-add WebMTrackDemuxer::GetEvictionOffset. r=gerald 2016-04-22 16:37:39 +10:00
Jean-Yves Avenard
7a284b30ab Bug 1261900: [webm] Use block duration if known. r=kinetik 2016-04-21 21:07:54 +10: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
d31cb0499b Bug 1206637: P2. Replace all cached preferences with MediaPrefs ones. r=cpearce
Additionally, clean up stray and unused Preferences.h header.

MozReview-Commit-ID: IcPrD2inkDE

--HG--
extra : rebase_source : c3c6e37767627db3601090c2855a3dfa98cb4368
2016-05-10 11:02:28 +10:00
Jean-Yves Avenard
0dc386ec98 Bug 1243538: [webm] P7. Let the decoder handle picture resizing. r=SingingTree
Is is now up to the decoders to automatically determine the correct size of the decoded frame.
By leaving the original dimensions in the VideoInfo, it will allow automatic rescale of the cropping window according to the original dimensions.

MozReview-Commit-ID: FZM4YlataNz
2016-04-20 17:44:18 +10:00
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