Commit Graph

210 Commits

Author SHA1 Message Date
Andreea Pavel
d95d878a50 Backed out 15 changesets (bug 1014393) for causing test_mediarecorder_record_gum_video_timeslice_mixed.html a=backout
Backed out changeset 83a1758bc6fa (bug 1014393)
Backed out changeset be1f1f82f92c (bug 1014393)
Backed out changeset 21ec9e104912 (bug 1014393)
Backed out changeset ea6314a61a77 (bug 1014393)
Backed out changeset e35a1a354bb5 (bug 1014393)
Backed out changeset 5c4b5620be2e (bug 1014393)
Backed out changeset 579d7f15d4f2 (bug 1014393)
Backed out changeset f9a9b2fc3335 (bug 1014393)
Backed out changeset c49241bad727 (bug 1014393)
Backed out changeset fc24872739e4 (bug 1014393)
Backed out changeset fd846ac16731 (bug 1014393)
Backed out changeset 4b11f19aa613 (bug 1014393)
Backed out changeset 4a57b865b461 (bug 1014393)
Backed out changeset 147d5aeaab46 (bug 1014393)
Backed out changeset c58e17df9c99 (bug 1014393)

--HG--
rename : dom/media/encoder/EncodedFrame.h => dom/media/encoder/EncodedFrameContainer.h
2019-08-03 20:23:02 +03:00
Andreea Pavel
5f860a304f Backed out changeset 6954782553c7 (bug 1014393) for build bustages a=backout 2019-08-03 20:09:29 +03:00
Gurzau Raul
3d31a9b7c0 Backed out 15 changesets (bug 1014393) for permafailing at test_mediarecorder_record_gum_video_timeslice_mixed.html a=backout 2019-08-03 19:22:18 +03:00
Andreas Pehrson
217959703e Bug 1014393 - Use undef-after-def pattern in MediaRecorder and related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D37700

--HG--
extra : moz-landing-system : lando
2019-08-01 08:48:39 +00:00
Andreas Pehrson
35b3d95480 Bug 1014393 - Unify MediaRecorder session shutdown paths and fix event timing when stopping per spec. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D17814

--HG--
extra : moz-landing-system : lando
2019-08-01 08:48:23 +00:00
Andreas Pehrson
243ffff1f1 Bug 1014393 - Remove MediaRecorder::GetParentObject. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D35308

--HG--
extra : moz-landing-system : lando
2019-08-01 08:48:16 +00:00
Andreas Pehrson
ab728319e1 Bug 1014393 - Remove MediaRecorder::Session::PushBlobRunnable. r=bryce
This moves the impl of PushBlobRunnable from a runnable to MozPromise, which
let's us more easily modularize it's parts (gather the blob, fire dataavailable)
to make individual code paths more explicit.

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

--HG--
extra : moz-landing-system : lando
2019-08-01 08:48:09 +00:00
Andreas Pehrson
3fdfbbebfb Bug 1014393 - Break out muxing and queueing of track data from MediaEncoder to new Muxer class. r=bryce
This first of all does some refactoring of how metadata is encoded in
MediaEncoder. This is now guided by the new Muxer class. If we're ready to pass
data to the muxer and it does not have metadata yet, we provide metadata before
giving it any media data. This metadata is passed to the muxer in a single call.
The metadata provided in this call must stay valid for the entire recording.
This removes MediaEncoder::GetEncodedMetadata().

This also removes the ctor argument from the WebMWriter since it can now rely on
the single SetMetadata() instead.
To comply with the ContainerWriter::SetMetadata() docs,
WebMWriter::SetMetadata() will now also sanity check metadata.

ContainerWriter instances are updated somewhat, to accommodate these changes.

Lastly, and most important, the new Muxer class manages muxing of the (up to)
two tracks into a single container, ensuring that timestamps increase
monotonically throughout a recording.

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

--HG--
extra : moz-landing-system : lando
2019-08-01 08:48:05 +00:00
Gurzau Raul
bcc3fa9613 Backed out 15 changesets (bug 1014393) for build bustage at TestMuxer.cpp on a CLOSED TREE.
Backed out changeset e6d834f3786e (bug 1014393)
Backed out changeset 2d880ea6e67c (bug 1014393)
Backed out changeset 9a087b7459cc (bug 1014393)
Backed out changeset 0dd76879ff03 (bug 1014393)
Backed out changeset b88188e0d590 (bug 1014393)
Backed out changeset 24f244ea8fff (bug 1014393)
Backed out changeset 0e85d193f8ff (bug 1014393)
Backed out changeset 12f932aeb3e9 (bug 1014393)
Backed out changeset 8bcbc931942b (bug 1014393)
Backed out changeset a16bcc633362 (bug 1014393)
Backed out changeset bf46f2a2e519 (bug 1014393)
Backed out changeset aa508d83a2c3 (bug 1014393)
Backed out changeset 085fb3e97aaa (bug 1014393)
Backed out changeset e872361b9f3b (bug 1014393)
Backed out changeset b4fb228c8624 (bug 1014393)

--HG--
rename : dom/media/encoder/EncodedFrame.h => dom/media/encoder/EncodedFrameContainer.h
2019-07-31 23:28:47 +03:00
Andreas Pehrson
0123e701dd Bug 1014393 - Use undef-after-def pattern in MediaRecorder and related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D37700

--HG--
extra : moz-landing-system : lando
2019-07-31 11:30:26 +00:00
Andreas Pehrson
da4fea8db5 Bug 1014393 - Unify MediaRecorder session shutdown paths and fix event timing when stopping per spec. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D17814

--HG--
extra : moz-landing-system : lando
2019-07-31 11:30:01 +00:00
Andreas Pehrson
b0373ad9e6 Bug 1014393 - Remove MediaRecorder::GetParentObject. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D35308

--HG--
extra : moz-landing-system : lando
2019-07-31 11:29:54 +00:00
Andreas Pehrson
e8685eab05 Bug 1014393 - Remove MediaRecorder::Session::PushBlobRunnable. r=bryce
This moves the impl of PushBlobRunnable from a runnable to MozPromise, which
let's us more easily modularize it's parts (gather the blob, fire dataavailable)
to make individual code paths more explicit.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 11:29:47 +00:00
Andreas Pehrson
de0e63f0ea Bug 1014393 - Break out muxing and queueing of track data from MediaEncoder to new Muxer class. r=bryce
This first of all does some refactoring of how metadata is encoded in
MediaEncoder. This is now guided by the new Muxer class. If we're ready to pass
data to the muxer and it does not have metadata yet, we provide metadata before
giving it any media data. This metadata is passed to the muxer in a single call.
The metadata provided in this call must stay valid for the entire recording.
This removes MediaEncoder::GetEncodedMetadata().

This also removes the ctor argument from the WebMWriter since it can now rely on
the single SetMetadata() instead.
To comply with the ContainerWriter::SetMetadata() docs,
WebMWriter::SetMetadata() will now also sanity check metadata.

ContainerWriter instances are updated somewhat, to accommodate these changes.

Lastly, and most important, the new Muxer class manages muxing of the (up to)
two tracks into a single container, ensuring that timestamps increase
monotonically throughout a recording.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 11:29:34 +00:00
Andreas Pehrson
4b3fa9c67e Bug 1493613 - Move MediaStream control from DOMMediaStream to MediaStreamTrack. r=padenot
This is inherently large, because modifying these bits of DOMMediaStream and
MediaStreamTrack affects all consumers and producers of all DOMMediaStreams and
MediaStreamTracks.

Things are generally much simpler now.

Producers of tracks now create a MediaStream in the graph, add it to a
MediaStreamTrackSource subclass that takes ownership of it, and add the source
to a MediaStreamTrack. Should the producer need a DOMMediaStream it is now much
simpler to create as the only thing needed is the current window. The stream is
a rather simple wrapper around an array of MediaStreamTracks.

HTMLMediaElement is still not as straight forward as other consumers since it
consumes the DOMMediaStream directly, as opposed to a set of tracks.
The new MediaStreamRenderer helper class helps bridge the gap between this fact
and the new track-based MediaStreamGraph interface, as it needs to juggle
registering multiple audio tracks for audio output. This hooks into existing
HTMLMediaElement logic and brings a welcome simplification to all the glue
previously needed there.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 07:58:17 +00:00
Mihai Alexandru Michis
e0b0dfa5eb Backed out 15 changesets (bug 1014393) for causing bustages in TestMuxer.cpp and gmock-internal-utils.h CLOSED TREE
Backed out changeset 0ddbdbfa87f6 (bug 1014393)
Backed out changeset 37399c83d3bf (bug 1014393)
Backed out changeset fe652475a785 (bug 1014393)
Backed out changeset 2812ca77d87d (bug 1014393)
Backed out changeset 6755ef7b361c (bug 1014393)
Backed out changeset 72e545bdcce3 (bug 1014393)
Backed out changeset 2f030ee55722 (bug 1014393)
Backed out changeset e9416b502170 (bug 1014393)
Backed out changeset 5a01d6d44634 (bug 1014393)
Backed out changeset 3457a5065dc4 (bug 1014393)
Backed out changeset 2a4999e0475b (bug 1014393)
Backed out changeset 0be3804dc04e (bug 1014393)
Backed out changeset 234994d8f136 (bug 1014393)
Backed out changeset d17f91ff2014 (bug 1014393)
Backed out changeset 25f58baa8159 (bug 1014393)

--HG--
rename : dom/media/encoder/EncodedFrame.h => dom/media/encoder/EncodedFrameContainer.h
2019-07-12 17:18:23 +03:00
Andreas Pehrson
221a8dfeca Bug 1014393 - Use undef-after-def pattern in MediaRecorder and related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D37700

--HG--
extra : moz-landing-system : lando
2019-07-12 13:42:00 +00:00
Andreas Pehrson
25e0a96f86 Bug 1014393 - Unify MediaRecorder session shutdown paths and fix event timing when stopping per spec. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D17814

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:32 +00:00
Andreas Pehrson
4eb24d2d87 Bug 1014393 - Remove MediaRecorder::GetParentObject. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D35308

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:27 +00:00
Andreas Pehrson
4ce75e7e63 Bug 1014393 - Remove MediaRecorder::Session::PushBlobRunnable. r=bryce
This moves the impl of PushBlobRunnable from a runnable to MozPromise, which
let's us more easily modularize it's parts (gather the blob, fire dataavailable)
to make individual code paths more explicit.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:24 +00:00
Andreas Pehrson
2e37cdaa99 Bug 1014393 - Break out muxing and queueing of track data from MediaEncoder to new Muxer class. r=bryce
This first of all does some refactoring of how metadata is encoded in
MediaEncoder. This is now guided by the new Muxer class. If we're ready to pass
data to the muxer and it does not have metadata yet, we provide metadata before
giving it any media data. This metadata is passed to the muxer in a single call.
The metadata provided in this call must stay valid for the entire recording.
This removes MediaEncoder::GetEncodedMetadata().

This also removes the ctor argument from the WebMWriter since it can now rely on
the single SetMetadata() instead.
To comply with the ContainerWriter::SetMetadata() docs,
WebMWriter::SetMetadata() will now also sanity check metadata.

ContainerWriter instances are updated somewhat, to accommodate these changes.

Lastly, and most important, the new Muxer class manages muxing of the (up to)
two tracks into a single container, ensuring that timestamps increase
monotonically throughout a recording.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 13:41:15 +00:00
Andreas Pehrson
82a2eb17d3 Bug 1523563 - Pass in mime type to MediaEncoder and give preference to it when passed. r=jib
Somewhere along the way this must have gotten broken.
Until this, passing mime type to MediaRecorder has had no effect.

This patch does two things:
1) Passes the mime type through from MediaRecorder to MediaEncoder
2) Gives preference to the mime type when passed, wrt picking codecs,
   however, we still yield to a video mime type when given a video track
   since that's how both Firefox and Chromium function today.

Proper spec handling of mime type will be fixed in bug 1512175.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 16:09:35 +00:00
Andreas Pehrson
099e60b97b Bug 1522305 - Make MediaRecorder timeslice parameter unsigned. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D17815

--HG--
extra : moz-landing-system : lando
2019-06-13 08:40:42 +00:00
Andreas Pehrson
e8b6f83dce Bug 1538727 - Move TrackListener and track-PrincipalChangeObserver removal to Stop(). r=bryce
These are added in start, and we get into unexpected state if they notify us
after Stop() (when MediaEncoder shuts down and internally removes the tracks
it is encoding) but before Shutdown() when we remove the listeners. This is not
symmetrical. The proper thing to do is to remove these listeners in Stop() as
well.

Depends on D29080

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

--HG--
extra : moz-landing-system : lando
2019-04-30 18:39:21 +00:00
Sylvestre Ledru
03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia
ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Andrea Marchesini
484db81418 Bug 1455020 - Extend CheckInnerWindowCorrectness() to check the state of the worker, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D25486

--HG--
extra : moz-landing-system : lando
2019-04-01 16:46:46 +00:00
Andreas Pehrson
154c803c91 Bug 1423253 - Route MediaEncoder::Suspend/Resume through the graph thread for less drift. r=padenot
Because we sync video frames to audio time before encoding, we suspend and
resume on the audio thread because that's the only place we have acccess to
both clocks at the same time;
- A dispatch to the audio encoder puts the event in the right place in the
  audio encoder buffer.
- TimeStamp::Now() is the current video time, and since we capture it on the
  audio thread these are in sync. This timestamp needs drift compensation too -
  this happens in a later patch on this bug.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 11:42:55 +00:00
Ryan Hunt
00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06: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
Andreas Pehrson
67a532de95 Bug 1514016 - Make MediaRecorder::Pause and MediaRecorder::Resume idempotent. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D15910

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:56 +00:00
Andreas Pehrson
f562a09e08 Bug 1514016 - Make MediaRecorder::Stop idempotent. r=jib
Depends on D14571

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:55 +00:00
Bryce Van Dyk
4c57de267d Bug 1514016 - Use DispatchTrustedEvent helper in MediaRecorder::DispatchSimpleEvent. r=pehrsons
During review of bug 1458538, :bz noted that our event dispatching code could be
simplified by using DOMEventTargetHelper::DispatchTrustedEvent. As this was not
done during that bug, driveby fix here while we're making other changes.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:54 +00:00
Bryce Van Dyk
cebb739adb Bug 1514016 - Add logging of this to MediaRecorder::pause and resume. r=pehrsons
Driveby change to bring our logging here in line with out other logging.

Depends on D14488

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:54 +00:00
Bryce Van Dyk
53de28258e Bug 1514016 - Fire pause and resume events asynchronously. r=pehrsons
Depends on D14487

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:53 +00:00
Bryce Van Dyk
f542c26fa8 Bug 1514016 - Replace DispatchStartEventRunnable with DispatchEventRunnable. r=pehrsons
Depends on D14486

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

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:53 +00:00
Bryce Van Dyk
497b61bdf5 Bug 1514016 - Add DispatchEventRunnable to media recorder to aid with dispatching different named events. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D14486

--HG--
extra : moz-landing-system : lando
2019-01-14 18:32:52 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Andreas Pehrson
dff48ba75c Bug 1423241 - Remove OnTracksAvailableCallback from MediaRecorder. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D12280

--HG--
extra : moz-landing-system : lando
2018-11-23 15:02: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
Bumsik Kim
c3572e1952 Bug 1458538 - Add pause and resume events for MediaRecorder. r=jya,bzbarsky
This resolves the two problems of MediaRecorder:

1. MediaRecorder does not fire pause/resume events when the corresponding methods are called, as mentioned in D7910.
2. The WebIDL for MediaRecorder does not specify onpause/onresume event handler attributes neither.

DispatchSimpleEvent() is used because there are no event attributes needed.

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

--HG--
extra : moz-landing-system : lando
2018-11-13 12:50:04 +00:00
Bumsik Kim
90d3be0a4c Bug 1496383 - Fix state error cases of MediaRecorder to match the W3C spec r=jya
Fix a bug that the current MediaRecorder's state error cases does not match the W3C spec.
pause() and resume() should throw an INVAILD_STATE_ERR only when it is inactive state, making them
independant.
Simply changing if statements is enough because the underlying encoder object (TrackEncoder) will
ignore Suspend/Resume calls when it is already suspended/recording so there won't be side-effects by
multiple pause()/resume() calls.

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

--HG--
extra : moz-landing-system : lando
2018-10-08 09:06:07 +00:00
Jean-Yves Avenard
b3aec00d77 Bug 1409664 - P3. Allow audio/webm container type in MediaRecorder. r=bryce
Summary:

Depends on D1614

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1616
2018-07-03 11:45:16 -07:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Andi-Bogdan Postelnicu
60732a90a5 Bug 1453795 - DOM/Media - Initialize member fields in classes/ structures. r=jyavenard
--HG--
extra : rebase_source : 0c785260497fadf98cf3cff8b9fcae8ea699c2c1
2018-06-15 10:25:02 +03:00
Andreas Pehrson
6017499cef Bug 1266345 - Let MediaRecorder ignore ended tracks. r=bryce
MozReview-Commit-ID: 8P1p0uI46BZ

--HG--
extra : rebase_source : 635ac78b2ea46041b77fd80ad5d4a387998cb413
extra : source : 1974769521fc9c1e823e56766e2ac2ba967b28a4
2018-06-08 12:28:55 +02: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