Commit Graph

69 Commits

Author SHA1 Message Date
JW Wang
87a7705558 Bug 1316211. P16 - remove MediaDecoderReader completely and fix includes. r=gerald
MozReview-Commit-ID: AGNyyh4kt3e

--HG--
extra : rebase_source : 48bfd7c681693a965848078c19ac81707ac19540
extra : source : 093ff5fe2ab6dd7551453b10b480fa3553ec135d
2017-07-20 09:56:08 +08:00
JW Wang
d0454d90d1 Bug 1355745 - Change the type of TrackInfo::mMediaTime to TimeUnit. r=jya
MozReview-Commit-ID: 3vuPhLQBnFb

--HG--
extra : rebase_source : 465f8c6eb234694a101081bd5314cca63e4b3285
extra : source : bf604ecf38cbc46c286cc76c4f596fdfd397ac78
2017-04-12 16:53:09 +08:00
JW Wang
f45fa7374e Bug 1355740 - Change the type of TrackInfo::mDuration to TimeUnit. r=jya
MozReview-Commit-ID: P7aqw4d5Vk

--HG--
extra : rebase_source : f22743fec9c8b70cbb092e3b26e252e7a4cb0b31
extra : source : 2413cd58f073b734a2cb85cec3658942bfd46e08
2017-04-12 16:41:36 +08:00
Gerald Squelart
7961918dfc Bug 1341483 - MP4Metadata::GetTrackInfo() now also returns a success/error code - r=kinetik
MozReview-Commit-ID: KQ3fJzZkrGW

--HG--
extra : rebase_source : b9f4324f50c81f4945c0a47e63af0cb616ba013e
2017-02-27 17:05:41 +11:00
Gerald Squelart
a39a22468d Bug 1343152 - Move TrackTypeToStr(TrackInfo::TrackType) to MediaInfo.h/cpp - r=jya
MozReview-Commit-ID: 57U5ySHsIn1

--HG--
extra : rebase_source : d244ff6ec9564eade25858743cec29d0ddcf40bb
2017-02-27 17:15:36 +11: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
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
Kilik Kuo
2873d75a62 Bug 1316573 - Reset the information in EncryptionInfo to make MediaElement reusable from encrypted content to plain content. r=jya
MozReview-Commit-ID: 4OU0sb2OSzi

--HG--
extra : rebase_source : c18f76229bc2cfde79dc114ff5bc892a973a1ae2
2017-01-12 11:33:55 +08: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
Kaku Kuo
5bc83d3772 Bug 1309516 part 1 - retrieve start time before resolving the metadata promise; r=jya
MozReview-Commit-ID: FhnoFi1BSHM

--HG--
extra : rebase_source : 3c1a1efa936fa0f4decdfb12c90bcce607c5edba
2016-10-27 15:21:05 +08:00
Sebastian Hengst
1d1c10922e Backed out changeset d460f4c4b0c0 (bug 1309516) for notrun errors in media-src/media-src-7_3.html web-platform-test. r=backout 2016-11-05 11:01:22 +01:00
Kaku Kuo
7a08bded31 Bug 1309516 part 1 - retrieve start time before resolving the metadata promise; r=jya
MozReview-Commit-ID: FhnoFi1BSHM

--HG--
extra : rebase_source : 8f62dfd1bd0fb4da227c62dac615b4156c4db079
2016-10-27 15:21:05 +08:00
Chris Pearce
64e92ab177 Bug 1307019 - Ensure MDSM and MFR have consistent view of what counts as encrypted. r=jya
The patch in bug 1300069 introduced an inconsistency between what the
MediaDecoderStateMachine and the MediaFormatReader consider an encrypted
stream. The MDSM considered a stream encrypted if mInfo.IsEncrypted() is true,
and that only takes into account the PSSH. Whereas the MFR only considers the
presence of a TENC box to indicate encryptedness. This would cause the MDSM
to not wait for the CDM before trying to start decoding. So if you setup the
MediaSource before setting the MediaKeys on the MediaElement, you'll end up
trying to create an EME decoder without a CDMProxy, and that causes a null
pointer deref and crash.

This patch ensures that the MDSM and the MFR use the same logic to determine
whether a stream is encrypted.


MozReview-Commit-ID: KGuYTuP9XDL

--HG--
extra : rebase_source : 85b303597a401a69f7e4ac63a267d8c8eb52ffa5
2016-10-03 16:34:31 +13:00
Jean-Yves Avenard
aa40888631 Bug 1279348: Avoid division by 0. r=kentuckyfriedtakahe
MozReview-Commit-ID: DSwB3J9jADK

--HG--
extra : rebase_source : 147ba3e98d203ffcf7b477e2b38c63b1286fa881
2016-09-14 11:20:41 +10:00
Nicholas Nethercote
b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Iris Hsiao
b3cb3cf81f Backed out changeset 128c1454e51f (bug 1280346) for Mochitest failed 2016-07-19 13:01:53 +08:00
Jean-Yves Avenard
e1a20915fc Bug 1280346: Only consider a video info as invalid if image dimensions are null. r=rillian
Display dimensions are actually determined from the SPS NAL with h264 and as such we don't really care on what is found in the container (which may be incorrect).

MozReview-Commit-ID: 7JmxIawNOOn

--HG--
extra : rebase_source : 9454b07742af880cd992a92517880788bd18a712
2016-07-12 16:46:33 +10:00
Dan Glastonbury
8df918b09d Bug 1281632 - P4: Add VideoInfo ctor that takes nsIntSize. r=gerald
MozReview-Commit-ID: 1n4MdfoQtDY

--HG--
extra : rebase_source : bc9a410fb11f7f29c6287e39fd08f86c6a8e390a
2016-06-28 17:56:55 +12:00
Kilik Kuo
002f32571d Bug 1228601 - [Part1] Store only supported video rotation informatin into VideoInfo.; r=mattwoodrow
MozReview-Commit-ID: GF1PpJGkGyA

--HG--
extra : transplant_source : %A9%B2%94%EEb%B3%8B%B9P%AAj%25%9B%18t%22NV%0C%1C
2016-05-13 02:17:39 +08:00
Sebastian Hengst
e013fac160 Backed out changeset 998ed936f745 (bug 1228601) for reftest failure in 1frame_rotation_90.mp4. r=backout on a CLOSED TREE 2016-05-23 14:24:00 +02:00
Kilik Kuo
b0d32a9fb5 Bug 1228601 - [Part1] Store only supported video rotation informatin into VideoInfo.; r=mattwoodrow
MozReview-Commit-ID: GF1PpJGkGyA

--HG--
extra : transplant_source : %C5%FF%EB%29j%E2T_h%AC%22%8Ey%E0%91%C6%7Dh%1C%09
2016-05-13 02:17:39 +08:00
Jean-Yves Avenard
2184cba811 Bug 1266260: P3. Limit maximum sampling rate to some sane value. r=gerald
MozReview-Commit-ID: 5ulAivVkec5

--HG--
extra : rebase_source : 2aa4f50a00b6fbd75acfcdd30f965c12cb311852
2016-05-11 12:15:55 +02:00
Jean-Yves Avenard
25410f2b25 Bug 1267637: P1. Consider invalid an AudioData with more than 8 audio channels. r=gerald
Add AudioConfig::IsValid() method

--HG--
extra : rebase_source : 80f7dd62b3b5971a0710c0c3bbf40735a4095fbf
2016-04-27 17:34:41 +10:00
ctai
8fcb64e480 Bug 1266644 - Rename StreamBuffer to StreamTracks. r=jesup r=pehrsons
Rename StreamBuffer to StreamTracks. We still need a place to keep the track information in every MediaStream, even the StreamBuffer::Track::mSegment is empty.

--HG--
rename : dom/media/StreamBuffer.cpp => StreamTracks.cpp
rename : dom/media/StreamBuffer.h => StreamTracks.h
2016-01-26 10:49:01 +08:00
Jean-Yves Avenard
9afc460a4f Bug 1265093: Fix CID 1358648. r=gerald
MozReview-Commit-ID: 2GbzSvZ57TF

--HG--
extra : rebase_source : dd1fd154aee888995d5ecbf2432e03e5f6388367
2016-04-20 16:18:01 +10:00
Jean-Yves Avenard
4e8c588103 Bug 1243538: P2. Add convenience VideoInfo::ScaledImageRect. r=mattwoodrow
It is considered valid for a webm video to return a decoded size different to the metadata values. ScaledImageRect will scale the cropping rectangle according to the original cropping aspect ratio.

MozReview-Commit-ID: BcpoqQhEQB1
2016-04-20 17:43:42 +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
871c53283b Bug 1262753: P1. Add AudioConfig == and != operator. r=gerald
MozReview-Commit-ID: A7qVGxiMOnh

--HG--
extra : rebase_source : 199f8ba5aadb07438c463b857b74b2139a173190
2016-04-11 20:57:29 +10:00
Jean-Yves Avenard
e203ef077d Bug 1264991: Don't construct invalid channel configuration. r=gerald
MozReview-Commit-ID: JTZJdCD94gH

--HG--
extra : rebase_source : eb0f3d510f87b7e31e6e79679c4278db7a73ac5e
2016-04-16 14:35:32 +10:00
Jean-Yves Avenard
88bbc1f392 Bug 1248861: P8. Added ChannelLayout::MappingTable method. r=gerald
MozReview-Commit-ID: 5kRa08TpGTX

--HG--
extra : rebase_source : a3a0a24c749901002788e2ddc44c26931094bfca
2016-04-07 15:11:59 +10:00
Jean-Yves Avenard
aca16336fe Bug 1248861: P4. Add AudioConfig and introduce channel layout definition. r=cpearce
Long term goal would be to merge AudioConfig with the existing AudioInfo class which doesn't provide sufficient data to properly determine how to play multichannel audio.

MozReview-Commit-ID: 3UDpZWPBUvS

--HG--
extra : rebase_source : 0643fdba0a6decf4f76c42f40bbb1b237e3e0300
2016-04-06 10:20:42 +10: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
Jean-Yves Avenard
bc55ba93a4 Bug 1240411: P9. Clean up media headers. r=jwwang
Remove redundant virtual keyword and add missing override if any.
2016-01-19 19:47:36 +11:00
Chris Pearce
eed22e8016 Bug 1237836 - Add support for MetadataTags to MediaFormatReader. r=jya 2016-01-08 13:22:53 +13:00
Chris Pearce
bf16ee017a Bug 1237836 - Backout 3bae9aee9d8a for test failures. r=backout 2016-01-08 15:43:27 +13:00
Chris Pearce
4bd82d79ea Bug 1237836 - Add support for MetadataTags to MediaFormatReader. r=jya
--HG--
extra : rebase_source : fdfd6ff1dc5ae2f298d50201859663aee5a6f45d
2016-01-08 13:22:53 +13: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
Mike Hommey
58b657359f Bug 1225682 - Don't use nsAuto{,C}String as class member variables in dom/media/. r=cpearce 2015-12-02 11:04:37 +09:00
Robert O'Callahan
db9b81ec66 Bug 1214506. Ensure OggReader sets proper IDs for its tracks. r=jya
--HG--
extra : commitid : 2JuSaQfoTyz
extra : rebase_source : b70bef26e511216e13cddc27bcff8c81ae71c0a3
2015-10-31 00:59:26 +13: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
Jan Gerber
833434e663 Bug 1185792: [webm] P1. Make MediaInfo.mFrame nsIntRect for visible area. r=jya 2015-08-07 19:31:38 +10:00
Kilik Kuo
ad5c5e6495 Bug 1188812 - Obtain CDM can render capability and store into MediaInfo r=cpearce. 2015-08-06 14:24:00 +08:00
Bobby Holley
97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Jean-Yves Avenard
79cb7273cb Bug 1182444: Show audio as enabled when an audio track is present in stream. r=jesup 2015-07-17 14:50:51 +10:00
Jean-Yves Avenard
9037f64bb7 Bug 1176989: Inform MediaSourceDecoder about new encryption keys inside TrackBuffersManager. r=cpearce 2015-06-23 17:29:31 -07:00
Jean-Yves Avenard
16649c81d5 Bug 1171314: P1. Add SharedTrackInfo object. r=cpearce 2015-06-19 16:45:14 +10:00
Bobby Holley
3d04b30371 Bug 1163223 - Use AwaitStartTime to handle metadata end time. r=jww 2015-06-16 15:08:31 -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
7f9474887a Bug 1163223 - Use AwaitStartTime to handle metadata end time. r=jww 2015-06-16 12:59:57 -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