Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 88ead5d627 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/media. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D65178

--HG--
extra : moz-landing-system : lando
2020-03-04 15:39:20 +00:00
Jean-Yves Avenard af3748243a Bug 1580695 - Revert bug 1533129. r=alwu,bryce
This  change was a workaround a Youtube bug that expected a particular behaviour from old TV and that we were exploiting. It was adding support for unsupported, unofficial code.

MediaCapabilities is how things should be done.

Making this code to work conditionally is too much effort. Reverting it entirely is easier.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 22:50:35 +00:00
Chris Pearce f1b4ef2942 Bug 1533129 - Add extended MIME parameter support to MediaSource.isTypeSupported on YouTube only. r=jya
YouTube.com/tv uses YouTube specific extensions to MediaSource.isTypeSupported
in order to determine whether it serves 4K. It checks with bogus values, and if
we reject the bogus values, it assumes we're responding truthfully to the other
queries. So add support to reject the bogus values on YouTube.com.

With this patch, we can play 4K on YouTube.com/tv.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 09:53:26 +00:00
shindli ab80016442 Backed out changeset e80a847a8b9b (bug 1533129) for causing perma mda failures in dom/media/mediasource/test/test_isTypeSupportedExtensions.html
--HG--
extra : rebase_source : 434f35ad3363c0c59eea03858f045d122cc3f114
2019-04-10 06:35:39 +03:00
Chris Pearce 2d1f469cd2 Bug 1533129 - Add extended MIME parameter support to MediaSource.isTypeSupported on YouTube only. r=jya
YouTube.com/tv uses YouTube specific extensions to MediaSource.isTypeSupported
in order to determine whether it serves 4K. It checks with bogus values, and if
we reject the bogus values, it assumes we're responding truthfully to the other
queries. So add support to reject the bogus values on YouTube.com.

With this patch, we can play 4K on YouTube.com/tv.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 23:23:35 +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 ad801ddb59 Bug 1409664 - P10. Extend MediaExtendedMIMEType to know about audio configuration. r=bryce
Summary:
Addtionally, change the framerate to be of type double and allow to create a MediaExtendedMIMEType based on the new dom VideoConfiguration and AudioConfiguration object.

Depends on D1622

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1623
2018-07-03 11:45:19 -07:00
Jean-Yves Avenard c69eab3317 Bug 1396629 - P2. Change string type. r=cpearce
MozReview-Commit-ID: Jl8t60Qh600

--HG--
extra : rebase_source : 99ba93b18adf4e9b1c4bb29a9626a166c63ede98
2017-09-04 22:43:12 +02:00
Gerald Squelart 7866e6fdb6 Bug 1377015 - MediaCodecs::ContainsPrefix implementation and tests - r=rillian
Many video codecs use a suffix to specify level, profile and optional features,
like "avc1.42E001" or "vp09.00.41.08".
MediaCodecs::ContainsPrefix() can be used to facilitate codec identification
from their prefix alone, e.g.: "avc1" or "vp09".

MozReview-Commit-ID: D6kcjggXptS

--HG--
extra : rebase_source : 3a60c01da1d91adf29f51ce3c32f8df60282c90a
2017-06-29 11:17:56 -07:00
Jean-Yves Avenard 2c10a0dfc5 Bug 1345756: P2. Fix coding style. r=gerald
MozReview-Commit-ID: C7q5HjycoH2

--HG--
extra : rebase_source : 7272278958ede9236437e72acdf0ad7a81b48e5d
2017-03-09 10:32:08 +01:00
Wes Kocher eb19bf64a5 Backed out 4 changesets (bug 1345756) for failures in test_SeekToLastFrame_mp4.html a=backout
Backed out changeset ee6db88f8695 (bug 1345756)
Backed out changeset afd77992867f (bug 1345756)
Backed out changeset 83dc982bfc63 (bug 1345756)
Backed out changeset bd4999a68867 (bug 1345756)

MozReview-Commit-ID: 1J7H3EfW3fZ
2017-03-09 11:06:41 -08:00
Jean-Yves Avenard 35bacd020e Bug 1345756: P2. Fix coding style. r=gerald
MozReview-Commit-ID: C7q5HjycoH2

--HG--
extra : rebase_source : 523d197a043d2bfc0d458d5c590ca1e7ee2d5fb0
2017-03-09 10:32:08 +01:00
Gerald Squelart 9c41bb7d24 Bug 1333314 - MediaCodecs::operator==(ascii literal) - r=jya
Instead of `...Codecs().AsString().EqualsASCII("...")`, one can just type
`...Codecs() == "..."`.

MozReview-Commit-ID: JS0yXhs0mz1

--HG--
extra : rebase_source : 40947ca3975ae5390d5dae5add7ed35460235545
2017-01-24 15:42:48 +11:00
Gerald Squelart afc4e55065 Bug 1329568 - Store original media-content string - r=jya
Some code (mostly logging) needs to know the original full MIME string, which
we would normally not need to keep in MediaExtendedMIMEType.

MozReview-Commit-ID: Jcd290ScHAb

--HG--
extra : rebase_source : 1165bc3425ed34a93564335a10ea3c6257da6f19
2016-12-28 18:56:22 +11:00
Gerald Squelart dd8e7f0b39 Bug 1329568 - Media...Type::SizeOf... methods - r=jya,njn
When replacing strings with MediaContentType objects, some classes will want to
know about their size.

MozReview-Commit-ID: LNdaaUdJac3

--HG--
extra : rebase_source : 70bfbfa55bc6f2c7a8aa026797103cd77615df08
2016-12-22 11:54:56 +11:00
Gerald Squelart 062283957f Bug 1329568 - MediaCodecs - r=jya
MediaCodecs factors out the codecs string from MediaExtendedMIMEType.

It also provides utility methods to go through a list of codecs, and test the
presence of specific codecs.

Note that there is no real way (yet?) to validate the given codecs strings, we
just assume that it's a comma-separated list of codecs. Further work can be
done later on if useful.

MozReview-Commit-ID: 5n2nWmaNT2O

--HG--
extra : rebase_source : 44ca49aa3d2a795171ebff75c91bb228196bc429
2016-12-28 10:48:27 +11:00
Gerald Squelart 29896bdd35 Bug 1329568 - MediaMIMEType 'audio/' and 'video/' checks - r=jya
A lot of code wants to check if the type starts with 'audio/' or 'video/',
MediaMIMEType::IsAudio() and IsVideo() will help with that -- and could later
be optimized if needed.

Note that types starting with 'application/' will still need manual testing,
but they are rare anyway.

MozReview-Commit-ID: UBcxS69Hcb

--HG--
extra : rebase_source : 24bd67f6ec18a2a6c7d33b065ac1036aa51de2ae
2016-12-17 17:43:02 +11:00
Gerald Squelart 8a97444e89 Bug 1329568 - MediaMIMEType comparisons against others - r=jya
`==` and `!=` against other MediaMIMEType objects, and against MEDIAMIMETYPE
checked literals.
This will allow simple (and compile-time-checked!) tests like:
  if (contentType.Type() == MEDIAMIMETYPE("audio/mp4")) { ...

MozReview-Commit-ID: 5yMua5krOKD

--HG--
extra : rebase_source : 778adc5fd45624d60529c259aeb1c41d4f66eb2f
2017-01-01 10:06:26 +11:00
Gerald Squelart 7c523a416e Bug 1329568 - MediaMIMEType construction from literal string - r=jya
MediaMIMEType object can now be constructed from string literals by using e.g.:
MEDIAMIMETYPE("audio/mp4") -- Note that it's an all-caps macro.
The string will be checked for validity at compile time.

To help with this, a new class DependentMediaMIMEType can point inside another
string (usually a string literal), but can only be constructed for valid
strings -- It will fail to compile when using MEDIAMIMETYPE, or it would
assert at runtime if directly built.

MozReview-Commit-ID: 5T3AKfpGbO4

--HG--
extra : rebase_source : 4bf9da294406c9dd6bfd69d560bae4bea44cadf3
2017-01-01 09:52:06 +11:00
Gerald Squelart ab3c0bec0e Bug 1329568 - MediaMIMEType - r=jya
MediaMIMEType factors out the main MIME "type/subtype" string from
MediaExtendedMIMEType, as it is often useful to deal with just that part.
Like MediaContentType and MediaExtendedMIMEType, MediaMIMEType is always valid
once constructed.

MozReview-Commit-ID: 5Urlk6OLo5q

--HG--
extra : rebase_source : aef60fde09b13befa1311c6cd712eac19c438021
2016-12-01 16:57:31 +11:00
Gerald Squelart 14cc7d114d Bug 1329568 - MediaExtendedMIMEType - r=jya
This patch factors out all data handling of MIME strings from MediaContentType
to MediaExtendedMIMEType.

MediaExtendedMIMEType is pretty much a copy of the old MediaContentType, as the
functionality was fine (but will be modified in upcoming patches).
MediaContentType then just delegates the work to its embedded
MediaExtendedMIMEType field.
The main difference is that the default constructor and Populate() method have
been replaced with a single constructor that takes all the arguments at once.

MozReview-Commit-ID: GBAgPDT2DUW

--HG--
rename : dom/media/MediaContentType.cpp => dom/media/MediaMIMETypes.cpp
rename : dom/media/MediaContentType.h => dom/media/MediaMIMETypes.h
extra : rebase_source : 1c925d8e049d9d349ec4c3dd1a079f570b809970
2016-12-01 13:05:45 +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 8d36cf82dd Bug 1329568 - Store original media-content string - r=jya
Some code (mostly logging) needs to know the original full MIME string, which
we would normally not need to keep in MediaExtendedMIMEType.

MozReview-Commit-ID: Jcd290ScHAb

--HG--
extra : rebase_source : d0c62f39a042ef256f2a0d6aaee162e7a58c4a9e
2016-12-28 18:56:22 +11:00
Gerald Squelart 8f52cbdabb Bug 1329568 - Media...Type::SizeOf... methods - r=jya,njn
When replacing strings with MediaContentType objects, some classes will want to
know about their size.

MozReview-Commit-ID: LNdaaUdJac3

--HG--
extra : rebase_source : 334bdca4a9b7a5db455bb731c495fa7a96b5b03c
2016-12-22 11:54:56 +11:00
Gerald Squelart 3c3afeffd5 Bug 1329568 - MediaCodecs - r=jya
MediaCodecs factors out the codecs string from MediaExtendedMIMEType.

It also provides utility methods to go through a list of codecs, and test the
presence of specific codecs.

Note that there is no real way (yet?) to validate the given codecs strings, we
just assume that it's a comma-separated list of codecs. Further work can be
done later on if useful.

MozReview-Commit-ID: 5n2nWmaNT2O

--HG--
extra : rebase_source : 721db464b9544959490bcaae7bd7537ffbac5baa
2016-12-28 10:48:27 +11:00
Gerald Squelart 0d8bcb0ce3 Bug 1329568 - MediaMIMEType 'audio/' and 'video/' checks - r=jya
A lot of code wants to check if the type starts with 'audio/' or 'video/',
MediaMIMEType::IsAudio() and IsVideo() will help with that -- and could later
be optimized if needed.

Note that types starting with 'application/' will still need manual testing,
but they are rare anyway.

MozReview-Commit-ID: UBcxS69Hcb

--HG--
extra : rebase_source : 0d52b0deb90ddcc037f2037b68baaf0ae34f45db
2016-12-17 17:43:02 +11:00
Gerald Squelart 650dcee293 Bug 1329568 - MediaMIMEType comparisons against others - r=jya
`==` and `!=` against other MediaMIMEType objects, and against MEDIAMIMETYPE
checked literals.
This will allow simple (and compile-time-checked!) tests like:
  if (contentType.Type() == MEDIAMIMETYPE("audio/mp4")) { ...

MozReview-Commit-ID: 5yMua5krOKD

--HG--
extra : rebase_source : bc1ade528841b5fd71278b827a94edc65e9a8898
2017-01-01 10:06:26 +11:00
Gerald Squelart 7c854f2bad Bug 1329568 - MediaMIMEType construction from literal string - r=jya
MediaMIMEType object can now be constructed from string literals by using e.g.:
MEDIAMIMETYPE("audio/mp4") -- Note that it's an all-caps macro.
The string will be checked for validity at compile time.

To help with this, a new class DependentMediaMIMEType can point inside another
string (usually a string literal), but can only be constructed for valid
strings -- It will fail to compile when using MEDIAMIMETYPE, or it would
assert at runtime if directly built.

MozReview-Commit-ID: 5T3AKfpGbO4

--HG--
extra : rebase_source : c2a1a8c1ed092581204161dd5a396a7ef11ea16e
2017-01-01 09:52:06 +11:00
Gerald Squelart fe26cb66da Bug 1329568 - MediaMIMEType - r=jya
MediaMIMEType factors out the main MIME "type/subtype" string from
MediaExtendedMIMEType, as it is often useful to deal with just that part.
Like MediaContentType and MediaExtendedMIMEType, MediaMIMEType is always valid
once constructed.

MozReview-Commit-ID: 5Urlk6OLo5q

--HG--
extra : rebase_source : c46b480b9fc63eab9170b052c7f9ea9b7bbd048e
2016-12-01 16:57:31 +11:00
Gerald Squelart d6f0cf3f9c Bug 1329568 - MediaExtendedMIMEType - r=jya
This patch factors out all data handling of MIME strings from MediaContentType
to MediaExtendedMIMEType.

MediaExtendedMIMEType is pretty much a copy of the old MediaContentType, as the
functionality was fine (but will be modified in upcoming patches).
MediaContentType then just delegates the work to its embedded
MediaExtendedMIMEType field.
The main difference is that the default constructor and Populate() method have
been replaced with a single constructor that takes all the arguments at once.

MozReview-Commit-ID: GBAgPDT2DUW

--HG--
rename : dom/media/MediaContentType.cpp => dom/media/MediaMIMETypes.cpp
rename : dom/media/MediaContentType.h => dom/media/MediaMIMETypes.h
extra : rebase_source : cefaeeb2a81b60c575e350cc8399af038a021dc2
2016-12-01 13:05:45 +11:00