Commit Graph
136 Commits
Author SHA1 Message Date
Bryce Van Dyk ede72c429c Bug 1400757 - Add telemetry to MediaRecorder and TrackEncoder to track basic usage. r=francois,pehrsons
Add telemetry to collect the following:
- Number of times a MediaRecorder is started during a session
- Duration of media recordings
- How often we're timing out init of audio and video track encoders

MozReview-Commit-ID: 9Pc2oKNCH1M
2017-09-19 07:34:02 +12:00
Andreas Pehrson 419fc023e1 Bug 1296531 - Don't use direct audio listener with full duplex in MediaRecorder. r=jesup
MozReview-Commit-ID: LS6eF6n7t7M
2016-11-22 09:54:47 +01:00
Andreas Pehrson 1e7c4d659a Bug 1296531 - Refactor MediaRecorder. r=jesup,SingingTree
The main purpose of this patch is to make the TrackEncoders run in a TaskQueue
to avoid multi-threaded access to members, and to change to track listeners to
allow for recording all kinds of tracks (the description of bug 1296531).

MozReview-Commit-ID: EtLXaDDBPdy
2017-05-24 18:51:47 +02:00
Bryce Van Dyk 9b4004deff Bug 1336367 - Move AudioTrackEncoder Segment init logic into new method. r=pehrsons
The AudioTrackEncoder has logic to attempt to init when given an AudioSegment.
This logic has previously been part of NotifyQueuedTrackChanges. This
changeset moves the logic to its own method. This allows for finer testing of
the init attempt behaviour.

MozReview-Commit-ID: Der1iM9J8fr
2017-09-14 07:19:27 +12:00
Bryce Van Dyk 21df8c6bfc Bug 1336367 - Significantly lower TrackEncoder timeout, make best effort init audio encoder on timeout. r=pehrsons
MozReview-Commit-ID: 2J5DPfkulIF
2017-09-12 09:32:17 +12:00
Jean-Yves Avenard 278692ecb6 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc
2017-09-04 11:27:43 +02:00
Chris Pearce 4fff51ac44 Bug 1388288 - Make OpusTrackEncoder build in non-Unified mode. r=SingingTree
MozReview-Commit-ID: 9Y6rkxYwVhw
2017-08-08 16:42:57 +08:00
Bryce Van Dyk 4b8e881cf5 Bug 1382718 - Update detection of image bitmap format in VP8 Encoder. r=jesup
Utilize ImageUtils to detect the bitmap format of images passed to the VP8
encoder, rather than duplicating this functionality in the encoder. Resolve an
issue with incorrect identification of unevenly sized I420 frames that was
breaking screen capture based MediaRecorder. clang-format code which has been
touched.

MozReview-Commit-ID: 4IfKSYxGuAX
2017-07-24 09:13:01 +12:00
Nicholas Nethercote d4dada6a3b Bug 1382099 - Remove MOZ_WIDGET_GONK from dom/media/. r=gerald.
As well as the obvious #ifdefs, this allows DOMHwMediaStream to be
removed, and also the "phone-state-changed" observer.
2017-07-24 10:08:55 +10:00
Nicholas Nethercote a58025002f Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.
2017-06-22 17:08:53 +10:00
Bryce Van Dyk 27bfeefb9e Bug 1368490 - Make sure number of channels is correctly set for opus encoder. r=jesup
MozReview-Commit-ID: 7bOxCvlvTDq
2017-05-30 21:01:02 +12:00
Bryce Van Dyk 94cbe3b93b Bug 1354457 - Record time spent paused in media encoder and adjust time stamps when muxing. r=pehrsons
MozReview-Commit-ID: 7J6oQf7qn4u
2017-05-05 15:13:11 +12:00
Bryce Van Dyk b0ffab24f3 Bug 1354457 - Remove old suspend logic from media encoder. r=pehrsons
The switch from duration to time stamp based samples has removed the need for
this logic.

MozReview-Commit-ID: 7J6oQf7qn4u
2017-05-05 15:12:03 +12:00
Bryce Van Dyk 255ffdf1bc Bug 1354457 - Stop video frames being forwarded for direct connections when recorder is suspended. r=pehrsons
MozReview-Commit-ID: 7J6oQf7qn4u
2017-05-01 14:29:46 +12:00
Andreas Pehrson 2a3132b062 Bug 1348381 - Handle VideoFrame::CreateBlackImage returning nullptr. r=jesup
MozReview-Commit-ID: LWon0cx5hAK
2017-04-28 13:58:22 +02:00
JW Wang 68670a77ff 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
2017-04-17 16:35:04 +08:00
Mike Hommey 3b0f91bc23 Bug 1357323 - Remove the gonk code that was referenced by the build system. r=gps 2017-04-18 17:46:39 +09:00
Mike Hommey d51030340d Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).
2017-04-18 16:56:09 +09:00
Alex Chronopoulos 39c2f1e4b3 Bug 1232043 - Reconfigure VP8 encoder when resolution change. r=pehrsons
MozReview-Commit-ID: GanvKEggNA7
2017-04-07 13:13:52 +03:00
Bryce Van Dyk a8fc92aa31 Bug 1349421 - Update handling of values derived from chunk duration in OpusTrackEncoder. r=derf
This changeset updates the handling of the variables based on
chunk.GetDuration() within the OpusTrackEncoder. This changeset alters places
where overflow could have taken place previously. It also adds asserts with
the dual purpose of defense and documentation for future developers.

MozReview-Commit-ID: 28vmAfE84ik
2017-03-31 07:57:37 +13:00
Bryce Van Dyk 1c87449fb1 Bug 1349421 - Adjust handling of chunk duration in opus encoder. r=jesup
For very long chunks, the opus encoder could run into issues with processing.
This changeset seeks to address that by using CheckedInt to prevent a potential
int overflow when encountering extremely long durations.

MozReview-Commit-ID: 7uLZAARLf5w
2017-03-30 13:38:10 +13:00
Wes Kocher 1fa645d370 Bug 1349467 - Fix some Audio/Video BUG_COMPONENTs in moz.build files r=jmaher
MozReview-Commit-ID: 3ItJdCtiOul
2017-03-22 17:23:12 -07:00
Randell Jesup 9ee6822cb7 Bug 1284800: Fix build fallout from moving libyuv into a subdirectory r=ted
MozReview-Commit-ID: CDMDXqpGueS
2017-02-24 14:01:56 -05:00
Tom Tromey a4b717ab39 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs
2016-12-15 20:16:31 -07:00
Paul Adenot 42ded867c8 Bug 1335066 - Fix logging in TrackEncoder.cpp. r=pehrsons
This was a mix of Android logging for b2g and normal logging and also noop
logging statement. This makes everything use MOZ_LOG.

MozReview-Commit-ID: BGE2JVcCVdF
2017-01-30 17:44:07 +01:00
Andreas Pehrson 2ee7d13dae Bug 1333341 - Fix accumulating rounding error in VP8TrackEncoder. r=jesup
MozReview-Commit-ID: 8XOKAuvpNuL
2017-01-24 16:19:00 +01:00
Andreas Pehrson dc87b1f28d Bug 1333341 - Fix accumulating rounding error in VideoTrackEncoder. r=jesup
MozReview-Commit-ID: GoVNRqvZPSF
2017-01-24 16:18:48 +01:00
Andreas Pehrson f8bec3832e Bug 1332619 - Fix missed duration when skipping a frame in VP8TrackEncoder. r=jesup
MozReview-Commit-ID: GpXUHfUj5v2
2017-01-20 15:47:04 +01:00
Ryan VanderMeulen 1ed171f11d Backed out 2 changesets (bug 1332619) by request.
Backed out changeset 08d0dccfb2c3 (bug 1332619)
Backed out changeset a406da1d258c (bug 1332619)
2017-01-23 11:25:11 -05:00
Andreas Pehrson b7126558c7 Bug 1332619 - Fix missed duration when skipping a frame in VP8TrackEncoder. r=jesup
MozReview-Commit-ID: GpXUHfUj5v2
2017-01-20 15:47:04 +01:00
Phil Ringnalda e2ca36f827 Backed out 2 changesets (bug 1332619) for frequent Win8 gtest failures in VP8VideoTrackEncoder.SkippedFrames
Backed out changeset 9ea8e4f2edae (bug 1332619)
Backed out changeset 123099d23df5 (bug 1332619)
2017-01-20 20:02:57 -08:00
Andreas Pehrson 36f82cef40 Bug 1332619 - Fix missed duration when skipping a frame in VP8TrackEncoder. r=jesup
MozReview-Commit-ID: GpXUHfUj5v2
2017-01-20 15:47:04 +01:00
Andreas Pehrson 79178c88ae Bug 1332598 - Make per-frame logs in VP8TrackEncoder verbose. r=jesup
MozReview-Commit-ID: HzpUlWjnAEW
2017-01-18 15:01:47 +01:00
Andreas Pehrson 9dea437e9b Bug 1332585 - Protect TrackEncoder members from races. r=jesup
mCanceled is one member which is protected only in a couple of places.

I hit a MOZ_CRASH without this in a gtest, but I'm not sure if we haven't seen
it in release by chance or by design.

MozReview-Commit-ID: 61KpjaBDyhB
2017-01-20 17:00:02 +01:00
Andreas Pehrson 4958b828a5 Bug 1332585 - Fix first frame duration being counted twice. r=jesup
MozReview-Commit-ID: HdHs1rpVUJK
2017-01-20 11:50:07 +01:00
Andreas Pehrson 2aa5619c3a Bug 1332584 - Use time conversion utils from VideoUtils. r=jesup
MozReview-Commit-ID: 7AVeGp5akfx
2017-01-20 18:59:46 +01:00
Andreas Pehrson 06476329fe Bug 1332584 - Append last frame on EOS in VideoTrackEncoder. r=jesup
MozReview-Commit-ID: LARhY0LAEtG
2017-01-20 18:29:26 +01:00
Andreas Pehrson 9880c7a7ee Bug 1330918 - Add VideoTrackEncoder::AppendVideoSegment logs. r=jesup
MozReview-Commit-ID: FwG0EHuaxpW
2017-01-18 19:28:32 +01:00
Andreas Pehrson ba52ac2259 Bug 1330918 - Use timestamps for frames in VideoTrackEncoder. r=bechen,jesup
This makes VideoTrackEncoder use timestamps when it passes frames to
VP8TrackEncoder. It also rewrites the chunks' durations and bases them on said
timestamps. This should mean that VP8TrackEncoder can continue passing durations
to the encoder as it does today.

MozReview-Commit-ID: GaUsF5PR4ZN
2017-01-19 15:14:02 +01:00
Wes Kocher 68b5235000 Backed out 2 changesets (bug 1330918) for frequent gtest failures a=backout
Backed out changeset aedd9a68f2c0 (bug 1330918)
Backed out changeset b2d8a93a50a8 (bug 1330918)

MozReview-Commit-ID: FhQrvvYY8LQ
2017-01-18 15:21:44 -08:00
Andreas Pehrson f8609b839a Bug 1330918 - Add VideoTrackEncoder::AppendVideoSegment logs. r=jesup
MozReview-Commit-ID: FwG0EHuaxpW
2017-01-18 19:28:32 +01:00
Andreas Pehrson daff68d2ca Bug 1330918 - Use timestamps for frames in VideoTrackEncoder. r=bechen,jesup
This makes VideoTrackEncoder use timestamps when it passes frames to
VP8TrackEncoder. It also rewrites the chunks' durations and bases them on said
timestamps. This should mean that VP8TrackEncoder can continue passing durations
to the encoder as it does today.

MozReview-Commit-ID: GaUsF5PR4ZN
2017-01-18 20:08:23 +01:00
Andreas Pehrson f14d4f7093 Bug 1330676 - Use VBR in VP8TrackEncoder. r=bechen,derf
MozReview-Commit-ID: AvezDCrOIuZ
2017-01-12 17:13:13 +01:00
Andreas Pehrson aa62b3a621 Bug 1231848 - Encode every frame as it comes in to VP8TrackEncoder. r=bechen,jesup
MozReview-Commit-ID: HZOcj9bqY0A
2017-01-12 12:19:34 +01:00
Andreas Pehrson ea788f1a76 Bug 1231848 - Do not write framerate metadata to webm container in MediaRecorder. r=bechen,jesup,rillian
MozReview-Commit-ID: 2lehFGZTPxh
2017-01-13 09:00:55 +01:00
Andreas Pehrson 0eb4b3c15a Bug 1322745 - Rewrite VP8TrackEncoder::GetSourceSurface and make it self contained. r=mchiang
MozReview-Commit-ID: IWKVFeGpXDp
2016-12-09 10:46:01 -10:00
Ehsan Akhgari c738449240 Bug 1311214 - Remove b2g OMX encoder/decoder; r=cpearce 2016-10-19 17:44:31 -04:00
ctai 9fc3c1d44f Bug 1300871 - Rollback to use original duration in video case. r=jesup
MozReview-Commit-ID: 2gK8vvBKtkC
2016-09-08 13:46:48 +08:00
Chia-hung Tai b9ed5c35d5 Bug 1299714 - Add back the missing timeout protection back to |VideoTrackEncoder::Init|. r=jesup,pehrsons
MozReview-Commit-ID: AhgikMTvxAE
2016-09-01 11:51:11 +08:00
Munro Mengjue Chiang 3b56789e2a Bug 1272877 - dispatch GetAsSourceSurface() to main thread to prevent assert; r=jesup
MozReview-Commit-ID: 7Y5cuNFw8sm
2016-08-23 15:45:23 +08:00