Commit Graph

108 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Nathan Froyd
a31fa9e19c Bug 1453437 - return UniquePtr from MediaRawData::CreateWriter; r=gerald
Returning UniquePtr is nicer than returning raw pointers, and has the
nice side effect of forcing us to clean up the uses of nsAutoPtr that
were hanging about.
2018-04-12 15:28:21 -04: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
Gerald Squelart
c5aeab4f69 Bug 1407810 - Use DDMOZ_LOG in media stack - r=jwwang
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.

MozReview-Commit-ID: IeJJmzYqWMQ

--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
2017-10-13 16:31:59 +11:00
Gerald Squelart
1b357db99b Bug 1407810 - Use DDLogger in media stack - r=jwwang
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
  DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
  classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
  machine -> reader -> demuxer -> resource, etc.

And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)

More will be added later on, from just converting MOZ_LOGs, and as needed.

MozReview-Commit-ID: KgNhHSz35t0

--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
2017-10-10 17:55:27 +11:00
Gerald Squelart
b0442493e5 Bug 1405531 - Remove unused MediaDataDemuxer::HasTrackType - r=jwwang
The only actual code use in MediaSourceDemuxer can trivially be folded into
its caller GetNumberTracks in the same class.

MozReview-Commit-ID: E6zh98zmJwJ

--HG--
extra : rebase_source : 9358dc37523d6cd7c1a4d5ec62a790db6a092063
2017-10-04 11:40:29 +11:00
Jean-Yves Avenard
ac1d631264 Bug 1393087 - P3: Retry backward to find keyframe. r=kinetik
When we seek in a webm containing an alpha channel, the first frame of a cluster may not be a keyframe for both channels. So seek backward until we find one.

We limit such operation on video with an alpha channel to prevent potential regression (even though thoses files would technically be invalid)

MozReview-Commit-ID: 14ETazkQ0AG

--HG--
extra : rebase_source : 8e106a382605c23769da5a8da5b88d107833cc6e
2017-09-25 16:47:08 +02:00
Jean-Yves Avenard
c7f6c04dad Bug 1393087 - P1. Only consider a video frame as keyframe if both channels are keyframes. r=kinetik
We want both the normal and alpha channels to be keyframe.

MozReview-Commit-ID: 9hHo7v97R3s

--HG--
extra : rebase_source : c531b8947b96760ad03e4dc75e6431706ebaa5a5
2017-09-25 15:59:47 +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
Jean-Yves Avenard
64a4b87c4c Bug 1394591 - P6. Simplify some internal codec mimetype. r=gerald
The codec mimetype is now shown in the media devtools. May as well make it readable.

MozReview-Commit-ID: 6rccDiTR24m

--HG--
extra : rebase_source : 7b8d1da8f05d0c46d5fd57b5e604ec3aed36a5f2
2017-09-01 23:04:39 +02:00
Sebastian Hengst
e9bfcd79f9 Backed out changeset de401d17868d (bug 1394591) 2017-09-04 00:06:51 +02:00
Jean-Yves Avenard
9b2818843f Bug 1394591 - P6. Simplify some internal codec mimetype. r=gerald
The codec mimetype is now shown in the media devtools. May as well make it readable.

MozReview-Commit-ID: 6rccDiTR24m

--HG--
extra : rebase_source : 7b8d1da8f05d0c46d5fd57b5e604ec3aed36a5f2
2017-09-01 23:04:39 +02: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
Kartikaya Gupta
ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
JW Wang
30093548fb Bug 1378295. P6 - remove AbstractMediaDecoder and fix includes. r=jya
MozReview-Commit-ID: xN1Ywo9VDY

--HG--
extra : rebase_source : 9aee1697b5299e43eb35450a20015c08a11bdea6
extra : intermediate-source : 3095884f04356d0d2c3c34843098a0a8b23211b8
extra : source : ef0f7e5300060b7888b961596a32a8fbf483ebd2
2017-07-13 17:39:42 +08:00
Jean-Yves Avenard
7ac281a2f6 Bug 1368856: initialize variable. r=rillian
There's no way to verify locally the while loop will execute and set the return value, so we get an uninitialized variable warning.

Initialize it at declaration time to failure, relying on the later code to override with success.

Actually, it doesn't matter what we initialize it to, since the while loop will never terminal if GetNextPacket somehow returns success without pushing a new packet onto the sample array. But this silences the warning.

MozReview-Commit-ID: 20rh1OGpR1E

--HG--
extra : rebase_source : 599a6d1bf0d38077bddfcec975e514eb8e5ee67e
2017-05-31 09:53:03 +02:00
Ralph Giles
e12f75bc3f Bug 1314147 - Recognize AV1 in WebMDemuxer. r=jya
Call AOMDecoder to handle AV1 video tracks from the WebM container.
The new decoder is very similar to VPXDecoder so we can use parallel
calls. This codec is still build-time conditional.

MozReview-Commit-ID: 5cexCZiNBqo

--HG--
extra : rebase_source : 992687c0d589bef75b6b77a1cc4137d61267472c
2017-04-19 14:41:37 -07:00
Ralph Giles
1e2cce29f2 Bug 1358662 - Call VPXDecoder libvpx wrappers for WebM. r=jya
Use the new helper functions instead of calling libvpx directly.
This simplifies adding other codecs in the future.

MozReview-Commit-ID: 8VX0d5S50EE

--HG--
extra : rebase_source : 34be2118bc5d1bfcb6237d7fbe67d8fbc5ef1508
2017-04-24 15:08:50 -07:00
Ralph Giles
9032567bba Bug 1358662 - Store LastSeenFrame dimensions as an nsIntSize. r=jya
This simplifies the comparison and update logic.

MozReview-Commit-ID: A6YII8tlEUn

--HG--
extra : rebase_source : e225b34f91e12591d5872121e024ef29c63a11e0
2017-04-21 18:05:46 -07:00
Sebastian Hengst
7349ffcf3d Backed out changeset 555b0322f776 (bug 1358662) for failing mda, crashtests and reftests. r=backout
Android 4.3: mda: test_EndedEvent.html, test_FrameSelection.html
OS X 10.10 debug: mda: test_BufferingWait.html

Linux x64 asan&pgo:
crashtest: video-replay-after-audio-end.html
reftest: bug686957.html
2017-04-25 22:36:21 +02:00
Sebastian Hengst
303542221f Backed out changeset 377615a0cf70 (bug 1358662) 2017-04-25 22:36:20 +02:00
Ralph Giles
9960954550 Bug 1358662 - Call VPXDecoder libvpx wrappers for WebM. r=jya
Use the new helper functions instead of calling libvpx directly.
This simplifies adding other codecs in the future.

MozReview-Commit-ID: 8VX0d5S50EE

--HG--
extra : rebase_source : c870b32bac6b924188dd722c052fb88156ad96c8
2017-04-24 15:08:50 -07:00
Ralph Giles
afff134a91 Bug 1358662 - Store LastSeenFrame dimensions as an nsIntSize. r=jya
This simplifies the comparison and update logic.

MozReview-Commit-ID: A6YII8tlEUn

--HG--
extra : rebase_source : ddf4304298209e515eb44962e8bc9ccd38c9956f
2017-04-21 18:05:46 -07:00
JW Wang
f2ea37e57b Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i

--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
2017-04-17 16:35:04 +08:00
JW Wang
302d82c85a Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
MozReview-Commit-ID: 4bVeqIuWO2O

--HG--
extra : rebase_source : d504ac15a6dc59ad42f3ab80faf23f629d74315f
extra : intermediate-source : 6e52995b6c8146451d98dffc62f6907755dc856e
extra : source : 82d2649cdafb5a6389f6858c23578811933580c9
2017-04-14 17:13:36 +08:00
JW Wang
235f1f55ed Bug 1356506 - change the type of MediaData::mTimecode to TimeUnit since int64_t is ambiguous. r=gerald
MozReview-Commit-ID: 7dO5OOUuORz

--HG--
extra : rebase_source : 1c1c020700d9180ef9f85d7e2e679f498ab71fce
extra : intermediate-source : d173c820bef7a113e28e9732c42e8c1af36160ab
extra : source : 04c08a780526ca3a5ac4d1a6f9b7ae30d9957e92
2017-04-14 14:52:14 +08:00
JW Wang
464497b945 Bug 1355756. P1 - change the type of MediaData::mDuration to TimeUnit. r=gerald
MozReview-Commit-ID: 3d4bUYtSuMI

--HG--
extra : rebase_source : 94c821b6d381421035e6a12cbe038436055c5822
extra : intermediate-source : 9a06beffc736486f47b9cf05e7f482e726d53068
extra : source : fdbdcd5c1474f04dc1dbde66fcf3a9ecec953053
2017-04-12 17:27:34 +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
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
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
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
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
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