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

162 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 3cf8c6d0df Bug 1524890 - P7. No longer access AudioData::mFrames directly. r=bryce
This will allow to remove mFrames member and calculate from the size of the content, which will dynamically change depending on a cropping filter.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:47 +00:00
Jean-Yves Avenard dd3c534de5 Bug 1524890 - P6. Remove mFrames member from MediaData. r=bryce
The number of frames is only meaningful with audio as a VideoData always contain a single frame.
So we only have this member in AudioData, which will simplify the logic in a future commit where the number of frames present depends on the trimming filter applied.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:33 +00:00
Jean-Yves Avenard 964cc95e13 Bug 1524890 - P5. Make MediaData::Type an enum class. r=bryce
Make its use more explicit and less likely to be incorrect.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:18 +00:00
Jean-Yves Avenard afe04d2952 Bug 1524890 - P3. Add AudioData::Data method that returns a Span. r=bryce
So that we never access the underlying buffer directly.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:04 +00:00
Jean-Yves Avenard d41a4fc09b Bug 1524890 - P1. Remove unused method. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D20159

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:03 +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 4ace4150ca Bug 1487416 - Index.cpp's SampleIterator populates cbcs data. r=jya
Rework our mp4 sample iterator to handle cbcs crypto data.

To support this we populate the following new data for samples:
- Crypto pattern information, this is split into a count of encrypted blocks
  and a count of clear blocks.
- A constant IV.

This information is available at a track level and a sample group level. The
sample group level supersedes track level information if both a present.

Prior to this patch, some crypto information was written to samples in
the SampleIterator in Index.cpp, and some in the MP4Demuxer (based on if the
SampleIterator had not populated the data). This patch moves all these
operations into the SampleIterator -- the idea being that the sample iterator
should be the component responsible for setting up sample meta data.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 15:13:37 +00: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 150ebe3741 Bug 1487416 - Index.cpp's SampleIterator populates cbcs data. r=jya
Rework our mp4 sample iterator to handle cbcs crypto data.

To support this we populate the following new data for samples:
- Crypto pattern information, this is split into a count of encrypted blocks
  and a count of clear blocks.
- A constant IV.

This information is available at a track level and a sample group level. The
sample group level supersedes track level information if both a present.

Prior to this patch, some crypto information was written to samples in
the SampleIterator in Index.cpp, and some in the MP4Demuxer (based on if the
SampleIterator had not populated the data). This patch moves all these
operations into the SampleIterator -- the idea being that the sample iterator
should be the component responsible for setting up sample meta data.

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

--HG--
extra : moz-landing-system : lando
2019-01-10 18:39:02 +00: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
John Lin 80a3c5aa13 Bug 1425277 - p5: add Append() to MediaRawDataWriter. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D7561

--HG--
extra : moz-landing-system : lando
2018-11-26 18:28:31 +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
Nathan Froyd f4ed80c22c Bug 1469399 - remove virtual qualifiers from MediaRawData methods; r=jya
MediaRawData is never subclassed, so it's pointless to have these
methods be virtual.

--HG--
extra : rebase_source : ef55196831f5ff96e75b46f304541e1cb8fafada
extra : source : ccef9e2643a19668dc06426aa0e55ed5d61ae535
2018-07-23 11:19:59 -04:00
Cosmin Sabou aa6a55f066 Backed out changeset ccef9e2643a1 (bug 1469399) for geckoview failures on multiple files. CLOSED TREE 2018-07-23 19:46:01 +03:00
Nathan Froyd 4772318978 Bug 1469399 - remove virtual qualifiers from MediaRawData methods; r=jya
MediaRawData is never subclassed, so it's pointless to have these
methods be virtual.
2018-07-23 11:19:59 -04:00
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 bf9542b8b8 Bug 1453672 - Make MediaRawDataWriter's allocation methods MOZ_MUST_USE. r=gerald
The documentation says that the boolean return values from these methods
must be checked.  We might as well make the compiler check these things
for us.
2018-04-12 07:29:00 -04: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
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
Chris Pearce b37bd17a56 Bug 1433344 - Convert encrypted AAC to ADTS before decryption. r=jya
MozReview-Commit-ID: IGmBfJtYsCi

--HG--
extra : rebase_source : d066644e848f8fb379607d0168960132881d7df8
2018-01-30 14:39:09 +13:00
Cosmin Sabou b35f58da34 Backed out changeset 1fea6030657b (bug 1433344) for mda failures on EMEDecoderModule.cpp on a CLOSED TREE 2018-02-01 03:05:53 +02:00
Chris Pearce 328670db16 Bug 1433344 - Convert encrypted AAC to ADTS before decryption. r=jya
MozReview-Commit-ID: IGmBfJtYsCi

--HG--
extra : rebase_source : a0752ed6c85faf4333ae84a3e5b20695b5bf26a6
2018-01-30 14:39:09 +13:00
Chris Pearce f800da4db3 Bug 1430673 - Remove CDMProxy::GetSessionIdsForKeyId(). r=JamesCheng
MozReview-Commit-ID: EMT8BaHE2Pf

--HG--
extra : rebase_source : 292412397b5a3617857daf199e324f3560a58f14
2018-01-16 11:38:27 +13:00
James Cheng 72518fc606 Bug 1421168 - Remove deadcode VideoData::CreateAndCopyIntoTextureClient. r=gerald
There is only declaration but no definition.
Also, there is no caller. Remove it.

MozReview-Commit-ID: Dq1yIgqVVES

--HG--
extra : rebase_source : 5775e39f3bc964c0aa7bf9be7822f17eb3c630a3
2017-11-28 15:18:43 +08:00
Jean-Yves Avenard 72e08420b1 Bug 1215089 - P3: Add mBitDepth member to YCbCr data structure. r=kamidphish,mattwoodrow
MozReview-Commit-ID: BNLawJOfj3w

--HG--
extra : rebase_source : f538373e317e3e1e5452c0a0d6e00e810148ea87
2017-06-29 23:09:20 +02:00
Sebastian Hengst 46807fbb50 Backed out changeset 3fc22c028eab (bug 1215089) 2017-10-04 16:26:09 +02:00
Jean-Yves Avenard 89b1091f27 Bug 1215089 - P2: Add mDepth member to YCbCr data structure. r=kamidphish
MozReview-Commit-ID: BNLawJOfj3w

--HG--
extra : rebase_source : 6cd0336506a8feda874f6bd6525da73a745d5100
2017-06-29 23:09:20 +02:00
Chris Pearce c511200e11 Bug 1392508 - Don't include nsRect.h, nsSize.h and nsIMemoryReporter.h in MediaData.h as they're unused. r=gerald
Including these also causes us to include a bunch of headers about points,
margins, and nsISupports/XPCOM/js, which we don't need.

MozReview-Commit-ID: 167YidMaeUQ

--HG--
extra : rebase_source : ab9ab45699451bb3fef613f401ae0e3853487ef5
2017-08-22 03:44:32 +12:00
Kaku Kuo 4175fed6b6 Bug 1378691 P3 - return next key frame time back to MDSM; r=jwwang
MozReview-Commit-ID: LVhJ0DpM24c

--HG--
extra : rebase_source : 4aefd89a2cc2243538c248977bfff79731fc2946
2017-07-11 10:15:33 +08:00
Chris Pearce 2d16a23835 Bug 1351124 - Detect MP4 PSSH boxes in MOOF boxes and dispatch those in 'encrypted' events to content. r=jya
We detect when a PSSH is contained in a MOOF and stash them in the
mp4_demmuxer::Moof object.  When the mp4_demuxer::SampleIterator returns a
sample, we check whether it's the first sample from its MOOF, and if so, we
attach any PSSH boxes from that MOOF to the sample.  The TrackBuffersManager
checks samples upon demux, to see whether they have any EME init data attached,
and if so dispatches thoses to the HTMLMediaElement in 'encrypted' events.


MozReview-Commit-ID: F8GobKOr96F

--HG--
extra : rebase_source : 5366f1008979605aa8fc80216cd1d9cc2eefd346
2017-07-12 22:07:15 +12:00
Jean-Yves Avenard de2ba98442 Bug 1223270: P3. Remove extra copy of YUV buffer on Windows. r=mattwoodrow,nical
MozReview-Commit-ID: JgbAwtLNr9e

--HG--
extra : rebase_source : 72bc0cd32d95fc6eadc0604c00b9f53227135557
2017-05-03 23:25:54 +02:00
Jean-Yves Avenard 10d2da1b08 Bug 1374596: P7. Fix includes as per coding style. r=padenot
MozReview-Commit-ID: 5WfOWcOoxg0

--HG--
extra : rebase_source : 988c09623e83a0d9188d9ff5d705314e2c43e756
2017-06-20 17:56:55 +02:00
Carsten "Tomcat" Book 57edf8693b Backed out changeset c79b6d337d04 (bug 1223270) 2017-06-20 09:41:39 +02:00
Jean-Yves Avenard 683d6562da Bug 1223270: P3. Remove extra copy of YUV buffer on Windows. r=mattwoodrow,nical
MozReview-Commit-ID: JgbAwtLNr9e

--HG--
extra : rebase_source : c7e813a29bd4d0f46c73b5579fec4bc77081cee1
2017-05-03 23:25:54 +02:00
Ralph Giles e7a03fe937 Bug 1358662 - Add Span support to MediaRawData. r=jya
MozReview-Commit-ID: A3bHPlk0MQi

--HG--
extra : rebase_source : 4d6bafa6e744d1dce2884a6fa25dd907739e66db
2017-04-21 16:12:55 -07:00
JW Wang 80c9f230f3 Bug 1359715 - let functions in MediaData.h take TimeUnit instead of int64_t. r=kaku
We want to replace the use of int64_t for microseconds by TimeUnit
whenever possible since int64_t is ambiguous which could be microseconds
or milliseconds.

MozReview-Commit-ID: LRz9d4yKBYJ

--HG--
extra : rebase_source : 1f73f1f338142b3183491d04726821a881ccabbe
extra : intermediate-source : 88e167b7b06303d10d92cd5317502f405d1c553e
extra : source : 98deb30ec93d395f9951f5fc488170ae35e29675
2017-04-24 17:33:05 +08:00
Sebastian Hengst 7b18dee274 Backed out changeset a3284ad8a14c (bug 1358662) 2017-04-25 22:36:21 +02:00
Ralph Giles ebeeb5aa45 Bug 1358662 - Add Span support to MediaRawData. r=jya
MozReview-Commit-ID: A3bHPlk0MQi

--HG--
extra : rebase_source : 7d6de44693c3de089800ecfd4ab6c00570311d30
2017-04-21 16:12:55 -07: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 837a8390aa Bug 1356502. P2 - let VideoData::UpdateTimestamp() take a TimeUnit instead of ambiguous int64_t. r=gerald
MozReview-Commit-ID: G17uLSrjBrR

--HG--
extra : rebase_source : 7b1f57e85ff7610c50c84e7b92d10772712e5bf7
extra : intermediate-source : c725b22a1dc94bbb549c57064a151783b9aa1152
extra : source : 65f2827866f62a89e1865c60ea6c1437f4faee27
2017-04-14 14:17:04 +08:00
JW Wang 3c0e7bddc7 Bug 1356502. P1 - let MediaDatra::GetEndTime() return a TimeUnit instead of ambiguous int64_t. r=gerald
MozReview-Commit-ID: DBQELBs32Ad

--HG--
extra : rebase_source : a7c9f7affbdfa12aaf94a6d0505cf4f54f4408cc
extra : intermediate-source : e1fcccdb12bb86c23520b5c2e0d76aef355597a5
extra : source : ddb8a8382c74e18dd52cdfbc7e8eee54cf46f05d
2017-04-14 14:14:08 +08:00
JW Wang 6359124d70 Bug 1355756. P3 - let CreateAndCopyData() and its friends take TimeUnit for duration. r=gerald
MozReview-Commit-ID: ES0on9VCuu3

--HG--
extra : rebase_source : 8d3e80ec2e1923587b5865516a16bfff9009397d
extra : intermediate-source : 3e59c61b1ccef78e3e8fe52791d7104aade7930c
extra : source : 46fd639ea6a2219bbed70f6555a2acf03ec01a7a
2017-04-12 17:46:09 +08:00
JW Wang 75ff4526d0 Bug 1355756. P2 - let VideoData::UpdateDuration() take TimeUnit. r=gerald
MozReview-Commit-ID: BSydHhJwgup

--HG--
extra : rebase_source : 079c8b504b0fea4e3c2f3b6e9b5881278818d2de
extra : intermediate-source : 42bf372600bd3626ea23c832ea5799c2686ec7ff
extra : source : ba1098c7e9a3f34830c8dd956f37bf49fded15af
2017-04-12 17:34:06 +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
John Lin a5d3bc8a18 Bug 1344649 - part 2: let VideoData::CreateFromImage() accept only neccessary parameters. r=jya
VideoData doesn't care what's in aInfo but display size and aPicture are unused.

MozReview-Commit-ID: IBqq8Rm8dM4

--HG--
extra : rebase_source : 10e2390f87925ef9179d28d86240f68a35c6c6d4
2017-03-09 12:06:24 +08: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 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 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
karo 1da7e759db Bug 1321076 - New overloaded CreateAndCopy method that takes alpha plane and returns VideoData with SharedRGBImage, in the case of alpha. r=jya
MozReview-Commit-ID: AIJxPRjGvrg

--HG--
extra : rebase_source : fcde786d529f69ba6fe2a533e351a8b33afa1de7
2016-12-21 15:19:46 +13:00
Jean-Yves Avenard 8a14b3bd0e Bug 1323847: P3. Don't allocate data for empty buffer. r=gerald
MozReview-Commit-ID: I67RmFZpRDy

--HG--
extra : rebase_source : 19dcb4530dd053dc4b8735d872a4cb2e7adc2a6e
2016-12-16 16:20:06 +11:00
John Lin f2b5ca039b Bug 1323631 - update original frame timestamp or duration rather than creating shallow copy. r=jwwang
MozReview-Commit-ID: 4oSheJwFNOE

--HG--
extra : rebase_source : a4eaa1c9914e2cbc500c0de44ccc274b84bbe505
2016-12-15 17:57:21 +08:00
John Lin f2d11c05c8 Bug 1299068 - part 3: notify when VideoData are sent to compositor. r=jwwang
MozReview-Commit-ID: Jn4AqpMaXMg

--HG--
extra : rebase_source : 9080d1fd4cbc532019134ea7087bbef03ae2600a
2016-11-23 15:08:17 +08:00
Jean-Yves Avenard 48a994166b Bug 1320705: P2. Add mDiscardPadding information. r=kinetik
The WebMDemuxer added this information in the ExtraData field. However, this is incompatible with the MSE demuxer which will override the ExtraData field under some circumstances.
It's cleaner to have a dedicated field anyway.

MozReview-Commit-ID: GadD11zzZ8f

--HG--
extra : rebase_source : 9b9018bc791b224414ef223464f8d66f63ccc817
2016-11-30 17:24:45 +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
Sotaro Ikeda 1d3ceeff04 Bug 1306521 - Handle VP9 colorspace BT.709 on BasicCompositor r=nical,jwwang,jya,jrmuizel 2016-10-11 19:46:28 -07:00
Kaku Kuo fcd9df9127 Bug 1286454 part 1 - remove MediaData::mDiscontinuity; r=jwwang
This member is only assigned but never used now.

MozReview-Commit-ID: IbuAbRaXzc4

--HG--
extra : rebase_source : 166bd3bc7478f725b64b5b2a0e8e258980674d06
2016-08-25 20:30:02 +08:00
Matt Woodrow f323872778 Bug 1292032 - Clean up VideoData static constructor methods. r=jya
--HG--
extra : rebase_source : e025c9a15ad00e970f9027f72c78b5d6effbc301
2016-08-04 15:31:52 +12:00
Jean-Yves Avenard 5d0a764769 Bug 1288329: [ogg/vorbis] P2. Pass extra information to the decoder so that it can perform proper trimmer. r=gerald,jwwang
The OggReader always passed a complete ogg_packet to the vorbis decoder, ensuring that the right number of frames was be returned. In the conversion to the new architecture, this information got lost making the vorbis decoder always return more frames than normal on the last packet.

MozReview-Commit-ID: HYHxqXfYntJ

--HG--
extra : rebase_source : 3d2a59b011ec1e996ab7aaf29e16baa495f7d31c
2016-07-29 02:19:21 +10:00
Wes Kocher 8f0a108b9a Backed out 6 changesets (bug 1288329) for wpt failures a=backout
Backed out changeset f33cb032cc9f (bug 1288329)
Backed out changeset 49ea83d00a77 (bug 1288329)
Backed out changeset 1406c14098f1 (bug 1288329)
Backed out changeset 936b73eb37c6 (bug 1288329)
Backed out changeset a1c4d9b9de32 (bug 1288329)
Backed out changeset a76b6e559777 (bug 1288329)

--HG--
extra : amend_source : 4e054fc4af62693934a4ae450a9595443b6a961d
2016-07-29 12:36:20 -07:00
Jean-Yves Avenard eba49ebd1c Bug 1288329: [ogg/vorbis] P2. Pass extra information to the decoder so that it can perform proper trimmer. r=gerald,jwwang
The OggReader always passed a complete ogg_packet to the vorbis decoder, ensuring that the right number of frames was be returned. In the conversion to the new architecture, this information got lost making the vorbis decoder always return more frames than normal on the last packet.

MozReview-Commit-ID: HYHxqXfYntJ

--HG--
extra : rebase_source : 3aa215576fe77357dd9a484626c0e5759aeedb3c
2016-07-29 02:19:21 +10:00
Alfredo Yang 254d49c5f6 Bug 1257107 - discard decoded data if its pts is smaller than seek time. r=jya
MozReview-Commit-ID: 70rbBsor8lp

--HG--
extra : rebase_source : 7f88969e1c5f19aa1651080dd5b1985d0b718592
2016-06-08 10:59:57 +08:00
Jean-Yves Avenard ef05761a4e Bug 1268929: Limit memory allocated for media to 2GiB max. r=gerald
MozReview-Commit-ID: JGJLZrGFRe2

--HG--
extra : rebase_source : 9821edb3f8acc44e8196ab5d40e20fd639176408
2016-05-03 10:03:18 +10:00
Jean-Yves Avenard e9b7cf9729 Bug 1265093: Silence CID 1358535. r=gerald
It was a false positive, has mData can only be null if mLength is also 0.

MozReview-Commit-ID: LcPtn49ew6e

--HG--
extra : rebase_source : bf9b7330c310179e63c5c1904808743fc6a67e23
2016-04-20 16:07:16 +10:00
Jean-Yves Avenard b786ae484f Bug 1248861: P12. Update AudioCompactor to account for alignment padding. r=rillian
MozReview-Commit-ID: 2e9oUthWW4C

--HG--
extra : rebase_source : 30b370fc73e924c71c4f778913bebbace9505455
2016-04-09 21:11:16 +10:00
Jean-Yves Avenard 6409e5ed1a Bug 1248861: P3. Use AlignedAudioBuffer object with AudioData. r=cpearce
MozReview-Commit-ID: 7HiF4eHlRwB

--HG--
extra : rebase_source : e7fd44ced280ccc359f61b7e5668e5481bb7ecb9
2016-04-03 23:09:45 +10:00
Jean-Yves Avenard 24930cd8ab Bug 1248861: P2. Use AlignedByteBuffer with MediaRawData. r=cpearce
MozReview-Commit-ID: BGzpFEAisvE

--HG--
extra : rebase_source : 7140a2d637ffe477db7e050a130ecf7ca6eacb44
2016-04-03 21:05:23 +10:00
Jean-Yves Avenard c186f77a84 Bug 1248861: P1. Add AlignedBuffer template class. r=cpearce
Along with AlignedByteBuffer and AlignedFloatBuffer

MozReview-Commit-ID: LmGc2JDBETi

--HG--
extra : rebase_source : b1091188870f0cfbfebcacad940504b02bc7c1dc
2016-04-03 19:25:21 +10:00
Alastor Wu f8cd6def9a Bug 1238906 - part1 : check whether audio data is audible. r=jwwang
--HG--
extra : rebase_source : 46869a13ba565e0af5413cc2bb387e7c7e0c2df8
2016-01-21 10:19:19 +08:00
Sebastian Hengst 9249e58bdf Backed out 2 changesets (bug 1238906) for bustage in M(2) on OSX and Windows. r=bustage
Backed out changeset e729b30ba7b4 (bug 1238906)
Backed out changeset 1857bca40ac4 (bug 1238906)
2016-01-18 13:11:43 +01:00
Alastor Wu 45303164df Bug 1238906 - part1 : check whether audio data is audible. r=jwwang
--HG--
extra : transplant_source : I%CC%AD%125%872%94%D5%0A%5E%08t%0E%22%F0%A9%7E%1EK
2016-01-18 10:50:35 +08:00
Andrea Marchesini 7167daa292 summary: Bug 1231378 - part 5 - Fix uninitialized members of classes in dom/{workers,events,media,canvas}, r=smaug 2016-01-12 18:16:59 +00:00
Carsten "Tomcat" Book 00abd66130 Backed out changeset 6d08ab04a77c (bug 1231378) 2016-01-12 15:48:53 +01:00
Andrea Marchesini 98f16784c5 Bug 1231378 - part 5 - Fix uninitialized members of classes in dom/{workers,events,media,canvas}, r=smaug 2016-01-12 13:57:37 +00:00
Nathan Froyd ffeb7c7fe3 Bug 1229963 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in dom/media/; r=cpearce 2015-12-02 18:07:59 -05:00
Nicolas Silva 1ebb1e2bb7 Bug 1219330 - Handle PlanaYCbCrImage::SetData failure. r=jya, jesup 2015-11-03 12:24:26 +01:00
Nathan Froyd 1f0804852a Bug 1220491 - clarify ownership relationships for creators of AudioData; r=gerald
The way we pass in AudioDataValue arrays into AudioData is non-uniform:
sometimes we have nsAutoArrayPtrs, sometimes we don't, and it's not
immediately obvious from the function signature of the constructor that
we're actually taking ownership of this array.  Let's fix that by using
UniquePtr<AudioDataValue[]> smart pointers to hold the data prior to
creating AudioData values, and for passing in to AudioData's
constructor.  Using standard-er C++ things instead of our homegrown ones
is a good thing.
2015-11-01 17:34:26 -05: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
James Cheng 6930bc717c Bug 1203047 - Make MediaDecoderReader know less about AudioData/VideoData by using MediaData instead. r=jya
--HG--
extra : rebase_source : 928721bb5a8669445725cab86e43be002f38c88a
2015-09-10 03:06:00 +02:00
Karl Tomlinson ea84d39947 bug 962719 use unsigned ints for FrameID and ProducerID for defined overflow behavior r=roc
--HG--
extra : rebase_source : 0375f04a60a548975547b80e60e5cf5dada2f86f
2015-08-12 11:02:41 +12:00
Jean-Yves Avenard 34f14685e5 Bug 1190258: [MSE] P3. Use actual allocated size rather than logical size when calculating eviction rate. r=gerald
This makes eviction slightly more aggressive and ensure we are actually under the memory threshold.
2015-08-06 18:48:45 +10:00
Jean-Yves Avenard 2517b3c491 Bug 1190258: P2. Don't use a FallibleTArray as backend for MediaRawData. r=njn
MediaRawData is often kept to store small data that is unlikely to change over the lifetime of the MediaRawData.
The use of nsTArray as memory backend comes at a cost of much greater memory allocated than required.

Additionally, a MediaRawData was configured to allocate a minimum size of 4kiB.
While this made sense for our past use of MediaRawData, the new MSE keeps big arrays of them to keep audio and video samples.
Combined with the nsTArray overheads, our actual memory use was 22 times greater than thought.
A source buffer allow 100MiB worth of samples, resulting in an actual memory usage of 2.2GiB.
2015-08-06 18:48:45 +10:00
Jean-Yves Avenard 8c8e3b2a70 Bug 1190258: P1. Use getter to access MediaRawData mData and mSize member. r=cpearce 2015-08-06 18:48:44 +10:00
Bobby Holley 97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Kilik Kuo a3e974ad80 Bug 1186367 - Make MDSM more ignorant of AudioData/VideoData via using MediaQueue<MediaData> instead. r=jwwang 2015-07-28 00:21:33 +08:00
Jean-Yves Avenard ba9653671f Bug 1184429: P2. MediaResource::SilentReadAt to read from cache first. r=jwwang
In practice, it will always read from the cache. This allows SilentReadAt to really be silent and prevent unecessary NotifyDataArrived callbacks.
2015-07-17 19:38:09 +10:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Robert O'Callahan 75aeccfacf Bug 1143575. Add frame IDs to VideoData. r=cpearce
--HG--
extra : commitid : 5ijlvDzuKRq
extra : rebase_source : fc0c82ca6f5c5a2bb9f9f06f86a8e295aea7438d
2015-06-07 12:34:00 +03:00
Robert O'Callahan b5074af667 Bug 1143575. Keep currently-rendered frame at the front of the video queue. r=cpearce
This makes normal playback consistent with the buffering state, which already
does this. We'll also need this when we handle multiple images, because then
we need to hande the entire queue of images to the ImageContainer without
pulling any of them off the queue.

--HG--
extra : commitid : B1zt05nhVn6
extra : rebase_source : af8a411f5f9be9d3a8c15633b2c4ad446be6d13f
2015-07-03 19:29:30 +12:00
Robert O'Callahan c3252e17f5 Bug 1143575. Remove Theora-only duplicate frame optimization. r=cpearce
--HG--
extra : commitid : 6kaBElgTmcX
extra : rebase_source : 12941907af16da54a4db81ff82892bedc0b2653f
2015-03-28 10:53:37 +13:00
Jean-Yves Avenard 16649c81d5 Bug 1171314: P1. Add SharedTrackInfo object. r=cpearce 2015-06-19 16:45:14 +10:00
Bobby Holley d2949f85ca Bug 1163223 - Adjust incoming samples for start time. r=jww 2015-06-16 15:08:35 -07:00
Bobby Holley d9860a80b4 Bug 1163223 - Introduce StartTimeRendezvous and route samples through it. r=jww
No sample adjusting is done yet - this just makes the data available.
2015-06-16 15:08:30 -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 e78f41ef02 Bug 1163223 - Adjust incoming samples for start time. r=jww 2015-06-16 13:00:00 -07:00
Bobby Holley 06087fe59c Bug 1163223 - Introduce StartTimeRendezvous and route samples through it. r=jww
No sample adjusting is done yet - this just makes the data available.
2015-06-16 12:59:57 -07:00
Birunthan Mohanathas 04a761af4f Bug 1174220 - Part 3: Remove MediaLargeByteBuffer. r=jya 2015-06-14 21:37:13 -07:00