Commit Graph

126 Commits

Author SHA1 Message Date
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
JW Wang
1f62c1d92b Bug 1417869. P3 - pass descriptive messages to NetworkError(). r=jya
MozReview-Commit-ID: 6yaFJvXG3g8

--HG--
extra : rebase_source : 2d1c851098be7eb880a01432c504c6db96d86756
extra : source : a30f9699f49687b23d4ccf955d7a0af8ce0c7653
2017-11-17 11:07:30 +08:00
Alastor Wu
1bc4324cb2 Bug 1403832 - part1 : replace Error.Code() with Error.ErrorName(). r=jya
Use ErrorName() as it provides more useful information for the error detail.

MozReview-Commit-ID: BQUPQGcLd8L

--HG--
extra : rebase_source : 734825c88dfbe79de1e61498dcc24606c50314ee
2017-09-29 00:37:45 +08:00
Andrew McCreight
78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Ralph Giles
efcb8bc380 Bug 1376636 - Exempt AV1 decoding from the vp9 benchmark. r=gerald
Accept av1 video in the webm decoder even when we've determined
the machine is too slow for software vp9 decoding. While we're
at an experimental stage with this codec, poor performance is
preferable to not being able to see a demo at all.

MozReview-Commit-ID: 6DJHCPfXHlA

--HG--
extra : rebase_source : 8fb5c0dac6483abf4775e3546dadd5aaa45947ac
2017-06-27 17:20:00 -07:00
Sebastian Hengst
9a1a3b8ebd Backed out changeset 0e4bdf5c1628 (bug 1376636) for Android bustage. r=backout 2017-06-29 03:28:18 +02:00
Ralph Giles
892c70acff Bug 1376636 - Exempt AV1 decoding from the vp9 benchmark. r=gerald
Accept av1 video in the webm decoder even when we've determined
the machine is too slow for software vp9 decoding. While we're
at an experimental stage with this codec, poor performance is
preferable to not being able to see a demo at all.

MozReview-Commit-ID: 6DJHCPfXHlA

--HG--
extra : rebase_source : 0819c3ddd437e9e56b18ba1fc6c56d4bdaebfa77
2017-06-27 17:20:00 -07:00
Jean-Yves Avenard
a16fab66e4 Bug 1362165: P7. Only complete appendBuffer once readyState has changed. r=jwwang
MSE specs require that the readyState be modified during either the Initialization Segment Received or the Coded Frame Processing algorithms.

At this stage, we only handle the Initialization Segment part (readyState moving from HAVE_NOTHING to HAVE_METADATA)

MozReview-Commit-ID: KBnnWuHJ6Om

--HG--
extra : rebase_source : a4450139762d5d033438fbee2ce560fe02ed6ffc
2017-05-09 12:23:11 +02:00
JW Wang
4f89ce372f Bug 1343459. Part 1 - Label runnables under dom/media/mediasource. r=jya
MozReview-Commit-ID: 5lJUZXWFH8u

--HG--
extra : rebase_source : 0a4215862264dcf3103d52141650dd9516290a58
extra : intermediate-source : 934ff70dc058eb7e18bf70f69aeac38b0595bbe9
extra : source : 6804fe809dcc2a365b8922cf72da129e764830c2
2017-03-01 15:08:50 +08:00
Jean-Yves Avenard
3afb565f72 Bug 1341342: [MSE] P2. Always enable MSE with webm/vp8. r=gerald
MozReview-Commit-ID: 4x1zyDZXqUt
2017-02-22 13:03:00 +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
Bevis Tseng
f2bdbd8fd1 Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
MozReview-Commit-ID: 9yJi3iDtVZG

--HG--
extra : rebase_source : 39c720ccc576ed9247b5e8abb70d99d7873b3ad6
2016-11-29 13:03:36 +08: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
f17dd305d6 Bug 1331289 - Use MediaContainerType in MediaResource, SourceBuffer, TrackBuffersManager, and dependencies - r=jya
Continuing the work of replacing MIME strings with MediaContainerType, starting
from MediaResource and following the dependencies.

Most changes are mechanical: Just change ns*String into MediaContainerType, and
MIME string literals into MEDIAMIMETYPE("a/b").
Some checks for empty/invalid strings and lowercase comparisons can go, thanks
to the always-valid always-lowercase-MIME invariants of MediaContainerType.

One special case in is MediaSourceResource, which used to have an empty string
as its type (because its own type is not relevant, but its SourceBuffers carry
types). Because the inherited GetContentType *must* be overridden, and must
return a MediaContainerType, we needed a valid type even though it should not
be seen in the real world. I've chosen "application/x.mediasource" for that.

MozReview-Commit-ID: 1aCH75Kh2e6

--HG--
extra : rebase_source : 0d9cd9b69c264e5dcfc3845f80ee107f4bcbcd9a
2016-12-28 18:59:02 +11: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
f3a92fa0a6 Bug 1330284 - Use MediaContentType in MP4Decoder - r=jya
MozReview-Commit-ID: 9Npl40Iicjc

--HG--
extra : rebase_source : 27df1df1cdf8eb8b608e155c0146c8b09d655de4
2017-01-01 12:27:45 +11:00
Gerald Squelart
5587e692df Bug 1329568 - Remove MediaContentType crutches - r=jya
Now that we have move all data-handling functions to MediaMIMEType and friends,
we can remove direct accesses to data from MediaContentType, to better separate
the context that MediaContentType represents, from the data it includes.

Dependent code needs to be mechanically updated to now use the proper APIs.

Note that in most places, we just extract MIME strings. Further work will take
place in later bugs, to completely replace these strings with MediaContentType
or more appropriate types...

MozReview-Commit-ID: LoX8dhX7OlB

--HG--
extra : rebase_source : cf221ac3c104f99b36cfa055afcf67d3bca26d0e
2017-01-01 09:24:24 +11:00
Gerald Squelart
d206c54fef Bug 1329568 - MediaSource::IsTypeSupported should report a NotSupportedError if type is not supported - r=jya
Bug 1176218 made IsTypeSupported return a DOMTypeError if the type cannot be
parsed, but this was incorrect.
This was not important until now, because the basic parser accepted invalid
MIME types and therefore would never report an error there.
But the next couple of patches will introduce a stronger check that will
refuse types other that "application/...", "audio/...", and "video/...", and
would now trip the web-platform tests.

MozReview-Commit-ID: EeyFnyurEZK

--HG--
extra : rebase_source : 76f831ddc3c19e0d820454f6f949d44e15d6773c
2017-01-13 14:58:23 +11:00
Wes Kocher
48f75e3c03 Backed out 13 changesets (bug 1329568) for wpt-11 failures in mediasource-addsourcebuffer.html a=backout CLOSED TREE
Backed out changeset 8f37ee96bd78 (bug 1329568)
Backed out changeset 706da9f85272 (bug 1329568)
Backed out changeset c316c8d24d32 (bug 1329568)
Backed out changeset 90a091e65db3 (bug 1329568)
Backed out changeset da855d6a78bb (bug 1329568)
Backed out changeset 3a49367220e3 (bug 1329568)
Backed out changeset 453851b40e3e (bug 1329568)
Backed out changeset 662529436cc4 (bug 1329568)
Backed out changeset 7c62078beb88 (bug 1329568)
Backed out changeset 99758b5f7918 (bug 1329568)
Backed out changeset 2ce9dcf0c274 (bug 1329568)
Backed out changeset 644f206d06d6 (bug 1329568)
Backed out changeset e1ed12f057c8 (bug 1329568)

MozReview-Commit-ID: FhJlySehxHi
2017-01-12 15:10:52 -08:00
Gerald Squelart
3a78522186 Bug 1329568 - Remove MediaContentType crutches - r=jya
Now that we have move all data-handling functions to MediaMIMEType and friends,
we can remove direct accesses to data from MediaContentType, to better separate
the context that MediaContentType represents, from the data it includes.

Dependent code needs to be mechanically updated to now use the proper APIs.

Note that in most places, we just extract MIME strings. Further work will take
place in later bugs, to completely replace these strings with MediaContentType
or more appropriate types...

MozReview-Commit-ID: LoX8dhX7OlB

--HG--
extra : rebase_source : 63eba419e5cb8a69500008145769c8e4ef99f33f
2017-01-01 09:24:24 +11:00
Gerald Squelart
cd181bc396 Bug 1329561 - MediaContentType is always valid - r=jya
MediaContentType can only be created through MakeMediaContentType(), which
returns a Maybe<MediaContentType>.
If the return value is Nothing, parsing failed.
Otherwise the contained MediaContentType object is guaranteed to be valid;
E.g., GetMIMEType() will always return a non-empty string.

Note that this interface will change a lot in the following bugs&patches, so
please don't worry about the 'Get' in the never-failing GetMIMEType(), it will
be gone soon!

MozReview-Commit-ID: IjGKkQ6RVd4

--HG--
extra : rebase_source : 5254af80dec0beb05da49f68c12fecc28edd725e
2016-12-01 12:56:11 +11:00
bechen
b903d81761 Bug 1286738 - part4-fixWebMAudio: audio/webm doesn't need the IsWebMForced() check. r=jya
MozReview-Commit-ID: 1BWpKvT3XTs

--HG--
extra : rebase_source : b834c1f767b35036928c3d59663b62ead7482ea9
2016-10-26 17:31:22 +08:00
bechen
24016416cb Bug 1286738 - part3-mediasource: Enable fennec vp9 only if we have hw deocder. r=jya
MozReview-Commit-ID: BwAZTrgXcaP

--HG--
extra : rebase_source : 85ed47735c51281053b409d25bdebd6dad3aa1bc
2016-10-26 17:08:21 +08:00
Gerald Squelart
72c393635b Bug 1176218 - p5. Use DecoderTraits::CanHandleContentType in MediaSource - r=jya
Replace both uses of nsContentTypeParser with MediaContentType.

MozReview-Commit-ID: KV7ze3ASRf3

--HG--
extra : rebase_source : b3d102b02fa671d0a42d70ae7fe66bdd51ac5d86
2016-09-29 23:10:15 +10:00
Matthew Woodrow
76c0ae8105 Bug 1288618 - Part 1: Use gfxVars for CanUseHardwareVideoDecoding so we can access it in the GPU process. r=dvander 2016-08-25 15:48:35 +12:00
Carsten "Tomcat" Book
f918af64da Backed out 16 changesets (bug 1288618) for bustage on a CLOSED TREE
Backed out changeset 06187d250f7a (bug 1288618)
Backed out changeset 2a47f8ea1d89 (bug 1288618)
Backed out changeset e179c8e8265d (bug 1288618)
Backed out changeset 25396a1af922 (bug 1288618)
Backed out changeset e98f835c6ee5 (bug 1288618)
Backed out changeset 24df0e89b273 (bug 1288618)
Backed out changeset f8bbdabdb6da (bug 1288618)
Backed out changeset 8b0adeab93df (bug 1288618)
Backed out changeset 95f23366de82 (bug 1288618)
Backed out changeset 63a9c689e1d5 (bug 1288618)
Backed out changeset 8f67443dccb8 (bug 1288618)
Backed out changeset 4e7fe69d5f45 (bug 1288618)
Backed out changeset 53b113acee42 (bug 1288618)
Backed out changeset 2583ae4e2e3b (bug 1288618)
Backed out changeset 75a61d0e71b7 (bug 1288618)
Backed out changeset da740b4fd484 (bug 1288618)
2016-09-21 08:44:11 +02:00
Matthew Woodrow
cc6a2ea1e1 Bug 1288618 - Part 1: Use gfxVars for CanUseHardwareVideoDecoding so we can access it in the GPU process. r=dvander
--HG--
extra : rebase_source : 3e5e4d3cebeda21a080a0f5c9bcec95ba54f960c
2016-08-25 15:48:35 +12:00
Carsten "Tomcat" Book
45927144b4 Backed out changeset e00026b645d2 (bug 1288618) for valgrind failures 2016-09-15 16:34:35 +02:00
Matthew Woodrow
0cd90578a4 Bug 1288618 - Part 1: Use gfxVars for CanUseHardwareVideoDecoding so we can access it in the GPU process. r=dvander 2016-08-25 15:48:35 +12:00
Jean-Yves Avenard
162fa5f03b Bug 1299072: P11. Use MediaResult with AppendBuffer promises. r=gerald
Will allow to pass detailed failure causes in a followup patch.

MozReview-Commit-ID: 5yGjzZNcYWg

--HG--
extra : rebase_source : fdd76c98900320352ee3c349de1c40df29122ca9
2016-09-12 08:54:10 +10:00
Jean-Yves Avenard
6a25692b20 Bug 1299072: P10. Pass decoding error details to media element's error attribute. r=jwwang
MozReview-Commit-ID: 49DurV9WI5S

--HG--
extra : rebase_source : 469e6ed4e222fb6d6ac34843c3c3346a044c6023
2016-09-11 00:56:09 +10:00
Jean-Yves Avenard
5b04109e85 Bug 1297037: [MSE] Update Duration Change algorithm as per latest spec. r=gerald
The MSE spec was recently updated to use the highest end time across tracks rather than across the buffered ranges.

See https://github.com/w3c/media-source/issues/124 and the fix described in https://github.com/w3c/media-source/pull/154

MozReview-Commit-ID: 4CqI8d2e9gu

--HG--
extra : rebase_source : b25f0e2a76c517c0dca0a9def00edd6eff38d8ad
2016-08-26 16:39:36 +12:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Chris Pearce
1ec646af14 Bug 1278198 - Implement "Get Supported Configuration" algorithm in MediaKeySystemAccess. r=gerald
MozReview-Commit-ID: KiJMOm5HgHe

--HG--
extra : rebase_source : 0c60b76ad38cb9c5513e6618c8d8f4bc6f43b168
2016-07-01 13:36:57 +12:00
Jim Chen
ce45a595ab Bug 1287946 - Update existing code to use mozilla::java; r=me 2016-07-21 13:49:04 -04:00
Carsten "Tomcat" Book
e8bc59a87a Backed out changeset 684888aeee81 (bug 1287946) 2016-07-21 08:07:12 +02:00
Jim Chen
78f67d1f6f Bug 1287946 - Update existing code to use mozilla::java; r=me 2016-07-21 00:42:26 -04:00
Jean-Yves Avenard
103da1bf41 Bug 1286810: [MSE] P2. Update duration change as per new MSE spec. r=gerald
See w3c/MSE Issue 19, 20 & 26.

Changing the duration now can never call the range removal algorithm. An explicit call to remove must be used for range removal.
This change performs the following:
- Require remove() for all Range Removals
- Error on Duration Changes that need remove first

MozReview-Commit-ID: 1fK2O1slnQ1
2016-07-19 11:45:28 +10:00
Jean-Yves Avenard
94a6256296 Bug 1287244: [MSE] Remove check for not 'updating' in {set,clear}LiveSeekableRange(). r=gerald
See https://github.com/w3c/media-source/issues/118

MozReview-Commit-ID: FtIc1cVfn8R

--HG--
extra : rebase_source : d4cb85d8fa42f67e6710a64cb73f4dfda6088992
2016-07-16 14:35:02 +10:00
Jean-Yves Avenard
8b5b0ae730 Bug 1286723: [MSE] P1. Add support for live seekable attribute. r=bz,gerald
See https://github.com/w3c/media-source/issues/5

MozReview-Commit-ID: EP37gRmUAXF

--HG--
extra : rebase_source : cd134517a3f1d50bce2f17a82acabe0f2bb042cb
2016-07-14 14:34:45 +10:00
Jean-Yves Avenard
aee6e800d6 Bug 1286796: [MSE] P1. Replace InvalidAccessError usage with TypeError. r=gerald
See https://github.com/w3c/media-source/issues/34

MozReview-Commit-ID: 6RDjhxnaOGM

--HG--
extra : rebase_source : f7686b58bfde94865cccb123578675d11ce9a37e
2016-07-14 20:47:02 +10:00
Gerald Squelart
0451e54ac6 Bug 848994 - p1. Refactor Decoder Doctor - r=cpearce
Some refactoring, clean-ups, etc.

The main change is that the can-play status is passed when diagnostics are
finally recorded. This will help when introducing different types of
diagnostics in future patches (e.g., Key System issues).

MozReview-Commit-ID: 182ePlrMqn4
2016-04-22 13:42:11 +10:00
Gerald Squelart
0977ec8ef6 Bug 1248507 - p3. Use DecoderDoctorDiagnostics - r=jya,bz
DecoderDoctorDiagnostics are now used at places where Firefox Chrome and/or
websites checks whether some media formats may be played:
- audio|video.canPlayType()
- audio|video resource loader
- MediaSource.IsTypeSupported()
- MediaSource.AddSourceBuffer()

MozReview-Commit-ID: B1KdjXODq9j
2016-04-19 17:36:19 +10:00
Gerald Squelart
ecfb205472 Bug 1248507 - p1. Pass DecoderDoctorDiagnostics to PDMs&more - r=jya
Pass declared-but-yet-undefined DecoderDoctorDiagnostics pointer to various
routines that contribute to deciding if a media format can be played, and
those that create decoders.

Points where a DecoderDoctorDiagnostics can be injected are currently marked
with "/* DecoderDoctorDiagnostics* */ nullptr", and some will be used in
following patches.

MozReview-Commit-ID: 7u37bvY4CpW
2016-04-19 17:36:19 +10:00
Jean-Yves Avenard
8da4d6ea4d Bug 1259274: [MSE] P2. Remove unused code path. r=gerald
MozReview-Commit-ID: FHj3u1WL1ul

--HG--
extra : rebase_source : aa5303670890056e716edb3ce50e774df143c6e7
2016-03-27 18:44:10 +11:00
Jean-Yves Avenard
d5b11db943 Bug 1230265 - Add codec agnostic benchmark; r=kentuckyfriedtakahe
The Benchmark class is now taking a MediaDataDemuxer argument. Options allow to decode any videos and measure the decoding speed.

MozReview-Commit-ID: C017I1cGqPL
2016-03-09 15:43:57 +11:00
Anthony Jones
d00c420b2c Bug 1230265 - Benchmark VP9 decoder performance and enable VP9 on fast machines; r=jya
MozReview-Commit-ID: 4GhSLun9x6Z
2016-03-09 15:43:38 +11:00
sakshi
1af0b67296 Bug 1197311 - Remove PR_snprintf calls in dom/ r=froydnj 2016-02-17 14:23:39 -05:00
Jean-Yves Avenard
c5c63d35fc Bug 1245463: [MSE] P5. Remove no longer working Dump() commands. r=gerald
MozReview-Commit-ID: 71hgJ63ksPU
2016-02-12 23:45:48 +11:00