Commit Graph

93 Commits

Author SHA1 Message Date
Jean-Yves Avenard
3ae43eb506 Bug 1493898 - P6. Move YUVColorSpace definition in the gfx namespace. r=mattwoodrow.
YUVColorSpace is inseparable from the bit depth as the matrix coefficients to be calculated need the bit depth information.

So let's put the two types together. gfx namespace also makes more sense as that's where we find IntRect, IntSize and other.

The extent of the changes highlight how much similar data structures are duplicated across the code, to the point it's scary.

Differential Revision: https://phabricator.services.mozilla.com/D25347

--HG--
extra : moz-landing-system : lando
2019-04-11 12:41:33 +00:00
Jean-Yves Avenard
14fac11637 Bug 1493898 - P5. Add Colorspace and YUV range data to VideoInfo. r=bryce
And read the info from the VP9 bytestream.

Differential Revision: https://phabricator.services.mozilla.com/D25346

--HG--
extra : moz-landing-system : lando
2019-04-11 12:41:23 +00:00
Michael Froman
51aa9729a2 Bug 1500596 - pt2 - Add operator== for AudioInfo and VideoInfo. r=jya
These are needed for upcoming addition to an IPDL union.

Depends on D18639

Differential Revision: https://phabricator.services.mozilla.com/D18640

--HG--
extra : moz-landing-system : lando
2019-02-14 19:08:19 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Bryce Van Dyk
fa9d86fda5 Bug 1487416 - Replace mValid and mMode with mCryptoScheme for track and sample crypto structs. r=jya
Explicitly store the crypto scheme being used on our crypto structs to let us
differentiate between cenc and cbcs data. In doing so remove mMode and replace
mValid with IsEncrypted() for the following reasons:
- Different modes within the existing schemes are not currently utilized by the
  spec: the scheme implies mode. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by the spec --
  possibly if the isProtected flag which we were tracking with mMode, is
  ever changed to be more than a bool in the spec.
- mValid was typically used to check if these structs contained valid crypto
  data or not. With only one scheme this was often shorthand for 'IsEncrypted',
  but with multiple schemes what is considered valid data for one may not be for
  another. Do away with this and just explicitly have an 'IsEncrypted'.

Differential Revision: https://phabricator.services.mozilla.com/D15874

--HG--
extra : moz-landing-system : lando
2019-01-11 15:29:45 +00:00
Cosmin Sabou
15939f75f2 Backed out 6 changesets (bug 1487416) for causing Android build bustages on RemoteDataDecoder.cpp. CLOSED TREE
Backed out changeset 05bcc598e9fb (bug 1487416)
Backed out changeset b99936efbbc9 (bug 1487416)
Backed out changeset ee55b284223e (bug 1487416)
Backed out changeset d25449127f8f (bug 1487416)
Backed out changeset f7c201b7f9bc (bug 1487416)
Backed out changeset 233aedc8b42e (bug 1487416)
2019-01-10 23:37:20 +02:00
Bryce Van Dyk
1a3a965df3 Bug 1487416 - Replace mValid and mMode with mCryptoScheme for track and sample crypto structs. r=jya
Explicitly store the crypto scheme being used on our crypto structs to let us
differentiate between cenc and cbcs data. In doing so remove mMode and replace
mValid with IsEncrypted() for the following reasons:
- Different modes within the existing schemes are not currently utilized by the
  spec of implementation. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by the spec.
- mValid was typically used to check if these structs contained valid crypto
  data or not. With only one scheme this was often shorthand for 'IsEncrypted',
  but with multiple schemes what is considered valid data for one may not be for
  another. Do away with this and just explicitly have an 'IsEncrypted'.

Differential Revision: https://phabricator.services.mozilla.com/D15874

--HG--
extra : moz-landing-system : lando
2019-01-10 18:37:48 +00:00
Sylvestre Ledru
804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Jean-Yves Avenard
b10364a15f Bug 1493198 - P2. Use enum for describing color depth. r=mattwoodrow
Depends on D6662

Differential Revision: https://phabricator.services.mozilla.com/D6663

--HG--
extra : moz-landing-system : lando
2018-09-25 20:44:55 +00:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Jean-Yves Avenard
45419290ff Bug 1444479 - P10. Don't reject files with more than 8 audio channels. r=padenot
MozReview-Commit-ID: 642RlRlHRv7
2018-03-24 10:58:02 +01:00
Jean-Yves Avenard
ce853cc7ef Bug 1431221 - P6. Add channel map information to AudioInfo. r=padenot
MozReview-Commit-ID: 2zOvciLFtAr
2018-03-24 10:57:54 +01:00
Jean-Yves Avenard
48cf8d7243 Bug 1431221 - P5. Split AudioConfig.{h,cpp} from MediaInfo. r=padenot
MozReview-Commit-ID: EzaC19HS2B8
2018-03-24 10:57:54 +01:00
Jean-Yves Avenard
e9e8bc2708 Bug 1431221 - P4. Use similar channel decriptions as Windows WAVE and FFmpeg. r=padenot
This makes it for future easier conversion for the FFmpeg and Windows WMF decoder, so that we can use their channel map directly.

Also introduce a difference between 2F2 and QUAD, cubeb supports will be added in a future change.

MozReview-Commit-ID: L5NkjeuGslI
2018-03-24 10:57:54 +01:00
Jean-Yves Avenard
1e2f478164 Bug 1431221 - P1. Add method to retrieve SMPTE equivalent layout from any channel layout. r=padenot
MozReview-Commit-ID: J8yT5OWIbAH
2018-03-24 10:57:53 +01:00
Dorel Luca
f41b03eca9 Backed out changeset 38577c007450 (bug 1424371) for Marionett test failure on testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py. CLOSED TREE 2018-02-19 22:15:23 +02:00
Milan Sreckovic
7571df7e7c Bug 1424371: Use BaseRect access methods instead of member variables in dom/ r=qdot
MozReview-Commit-ID: HXWhggOMIEK

--HG--
extra : rebase_source : 9c9eacf80d2b7f78faa82a1549170b98d12cdaa8
2018-02-19 12:56:10 -05:00
James Cheng
0052736720 Bug 1407919 - Part4 - Add mBitDepth field into VideoInfo. r=jya
MozReview-Commit-ID: GfQndec1cyB

--HG--
extra : rebase_source : 86f940b5e4a9497fa51dc16c3bbe813698b260bf
2017-10-17 11:17:23 +08:00
Kilik Kuo
58868278cc Bug 1393272 - Use original width and height if either the scaled width or height is 0. r=jya
MozReview-Commit-ID: 3y4c5zJZD0a

--HG--
extra : rebase_source : ec0d168f544be8dea1cbf63d9b2c253ea139286c
2017-10-12 16:40:50 +08:00
Jean-Yves Avenard
d9036ddaef Bug 1397307 - P1. Make method const. r=gerald
MozReview-Commit-ID: 2UrTZroXpRG

--HG--
extra : rebase_source : d3c95c1c07fb46d28d7aea9fc8891894e7024b5a
2017-09-08 12:49:01 +02:00
Jean-Yves Avenard
9349efba14 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc

--HG--
extra : rebase_source : 918cf87b2ce82c8de245dcb23cc359289ac5f21f
2017-09-04 11:27:43 +02:00
Chris Pearce
e4e1189f9a Bug 1395021 - Move TrackID definition from StreamTracks.h into TrackID.h. r=jwwang
This means that MediaInfo.h doesn't need to include StreamTracks.h, which pulls
in MediaSegment.h and the MSG and a bunch of DOM bindings stuff.

MozReview-Commit-ID: 6JSO1dxJq8k

--HG--
extra : rebase_source : c5ca38a6e0b297e4e05db3b23c7c2ead49e9f8bc
2017-08-30 15:24:54 +12:00
Chris Pearce
ec0ac75c45 Bug 1394648 - Switch from nsInt{Point,Rect,Size} to gfx::Int{Point,Rect,Size} in dom/media. r=jwwang
The nsRect.h and nsSize.h headers typedef nsIntRect to gfx::IntRect etc, so the
rect/size objects we use will be the same, just under a different name.
However the old headers #include a bunch of things we don't use, so we if we
use the gfx objects directly we end up with a smaller include graph.

MozReview-Commit-ID: 7S4OSqBJK9m

--HG--
extra : rebase_source : 7cc48507356ce754e8395af957fa68a28711e00a
2017-08-29 14:00:33 +12:00
Milan Sreckovic
8ad3e52a49 Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in dom/*. r=overholt
MozReview-Commit-ID: B9YWmM3C1oX

--HG--
extra : rebase_source : d7c27de968295ee13ece8bda23798cb215d60a4b
2017-08-14 08:30:10 -04:00
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