Commit Graph

74 Commits

Author SHA1 Message Date
Sebastian Hengst
f310d4012a Backed out changeset c89b8cc657b2 (bug 1266646) 2016-06-13 21:23:53 +02:00
ctai
4b40fd1bc1 Bug 1266646 - Rename MediaStreamDirectListener and MediaStreamTrackDirectListener to DirectMediaStreamListener and DirectMediaStreamTrackListener respectively. r=jesup,pehrsons
Rename those two function to better name alignment with AddDirectListener and AddDirectTrackListener.

MozReview-Commit-ID: 6QY08oyih1X

--HG--
extra : rebase_source : e0f2ac5de75d54a870f5a99f08505e40aa0696d9
2016-04-29 11:45:25 +08:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
ctai
e55d14cd55 Bug 1278027 - Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in MediaEncoder::NotifyQueuedAudioData. r=jesup
MozReview-Commit-ID: JBRdxD1wA4c

--HG--
extra : transplant_source : %F1%8BN%F2%0D%07%88%E3%239%C6%B8%3A%5EB%1A%AC%CE%FA%9D
2016-06-07 12:25:04 +08:00
Chris Peterson
11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
ctai
7e0671d483 Bug 1266647 - Clean NotifyQueuedTrackChange to only notify when command is track create and track end. r=jesup r=pehrsons
MozReview-Commit-ID: 4Pp3xHeBIW4

--HG--
extra : transplant_source : %D4c%13P%82Y%04%FA%0E%9D%9C%97%91%AAH%FCI%C3u_
2016-05-04 16:08:44 +08:00
ctai
8fcb64e480 Bug 1266644 - Rename StreamBuffer to StreamTracks. r=jesup r=pehrsons
Rename StreamBuffer to StreamTracks. We still need a place to keep the track information in every MediaStream, even the StreamBuffer::Track::mSegment is empty.

--HG--
rename : dom/media/StreamBuffer.cpp => StreamTracks.cpp
rename : dom/media/StreamBuffer.h => StreamTracks.h
2016-01-26 10:49:01 +08:00
bechen
d83a7ef916 Bug 1261007 - Part 3 - Remove the same/redundant code of checking the unique image. r=jolin
MozReview-Commit-ID: ByLCFShcN8q

--HG--
extra : transplant_source : %A0d%BA%13%5D%2C%FEOFF%8B%A9%DF%C0L1%AE%A0%AE%F4
2016-04-18 14:31:02 +08:00
bechen
7f96be6bff Bug 1261007 - Part 1 - Force to send video sample into encoder if we got the same video sample more than 1 seconds. Enable testcases. r=jolin
MozReview-Commit-ID: GXFZVqDUChM

--HG--
extra : transplant_source : %E0%D9JK%EF%A3%7C%F1%E25%DC%09%A1El%22P/%20%9F
2016-04-13 17:10:55 +08:00
Andreas Pehrson
be74876e25 Bug 1208371 - Add PrincipalHandle to MediaChunks. r=mt,jesup
PrincipalHandle is a thread safe pointer to a holder of (the main-thread-only
nsIPrincipal) that can be passed around the MSG.

A MediaStreamTrack whose source has just updated its principal, sets the new
principal aside (as its "pending principal"), and combines the new principal
into its current principal.

Then the source starts passing the new principal to the MediaStreamGraph as
a PrincipalHandle.

Changes to a track's PrincipalHandle on the MSG will be surfaced through the
MediaStreamTrackListener API. These changes are dispatched to main thread
and compared to a MediaStreamTrack's pending principal. In case of a match
the track knows the correct principal is flowing and can move the pending
principal to be the current principal and update any main thread principal
observers.

MozReview-Commit-ID: D0JXGWhQFFU

--HG--
extra : rebase_source : 296e269bb46fc5a85a9c3f90dfc0dc40e53572bc
2016-04-06 14:56:44 +02:00
bechen
fd7bde80bb Bug 1215115 - part2: Mux opus into webm, remove bitdepth. r=rillian
MozReview-Commit-ID: 7D74vONbkFP

--HG--
extra : transplant_source : 2%AA%C8%F34%1E%CF%3C%9B%88%AC%AD%9F-%DC%7C%FE%B1m%5D
2016-04-01 11:04:00 +08:00
bechen
3c837a6b1a Bug 1215115 - part1: Replace the vorbis by opus in MediaEncoder and also reomve the VorbisTrackEncoder files. r=rillian
MozReview-Commit-ID: Kjf96Nk2pPk

--HG--
extra : transplant_source : .3QTH%88%84%1B%B7%3B%06%B6%06mB%B8%BBB%BA%18
2016-03-30 18:03:05 +08:00
Randell Jesup
20b96bf233 Bug 1257318: Pass TRACK_EVENT_ENDED events through to the TrackEncoders r=padenot
MozReview-Commit-ID: 4b6p27YrHEw

--HG--
extra : rebase_source : c608431a3bed2dff6c08881e2bc5a8deac470a48
2016-03-19 10:37:42 -04:00
Randell Jesup
9f6c2b2c00 Bug 1257318: Make recorder.pause()/resume() work with DirectListeners r=padenot
MozReview-Commit-ID: FrqlK7DqmIZ

--HG--
extra : rebase_source : 3e23500131fc0edbb17f8fe65e9adbe8365e992a
2016-03-19 01:04:50 -04:00
Randell Jesup
2de5a1de8e Bug 1257318: Move MediaRecorder to use DirectListeners wherever possible. r=roc
--HG--
extra : rebase_source : 5350255f08a3409568f6f4501f32111a7525df5b
2016-03-19 16:53:51 -04:00
Benjamin Chen
c258d7a911 Bug 1243611 - When EOS, call vpx_codec_encode correctly. r=rillian
MozReview-Commit-ID: IzrDAOD11r9

--HG--
extra : rebase_source : 31fd4b8f4e6b24b63864e93f6484a87f325f3f34
2016-02-26 16:07:29 +08:00
Maire Reavy
76e43453eb Bug 1213775: VP8 automatic resizing breaks ffmpeg-based players; turn it off in VP8TrackEncoder r=jya
Can re-enable once fixed in ffmpeg *and* commonly installed, since this
feature is meant to save video replayable elsewhere.

MozReview-Commit-ID: L5c6rZ8aC1s
2016-02-29 17:25:40 -05:00
Randell Jesup
e67a5005ec Bug 1234230: Don't pass null images for video encoding, and don't reencode the same image r=roc
Largely clones logic from OMXEncoder.

MozReview-Commit-ID: JfSERuCCPzT
2016-02-29 17:25:35 -05:00
Birunthan Mohanathas
d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda
d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Jean-Yves Avenard
bc55ba93a4 Bug 1240411: P9. Clean up media headers. r=jwwang
Remove redundant virtual keyword and add missing override if any.
2016-01-19 19:47:36 +11:00
Benjamin Chen
795c13e328 Bug 1198157 - Call |NotifyEndOfStream| if the encoder can't been initialized after 30 seconds. r=jwwang
--HG--
extra : rebase_source : 5c9b28e6162a2d61e9e40c0c6dd7925018b37a35
2016-01-06 15:42:08 +08: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
Guang-De Lin
42c53cfea9 Bug 1154213 - Handle timestamps of video/webm vorbis track encoding. r=mreavy, r=rjesup 2015-11-18 10:51:07 +08:00
sajitk
582e1a55fa Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher
f3a9eb2a26 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE
--HG--
extra : commitid : BMVKq6cPeho
2015-11-11 09:36:56 -08:00
sajitk
3cbe348cdd Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG--
extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
2015-11-11 06:52:00 +01:00
Mike Hommey
4d40edea15 Bug 1221453 - Use AbsolutePaths with LOCAL_INCLUDES instead of manual -I in CXXFLAGS. r=gps 2015-11-06 09:59:21 +09:00
Munro Chiang
42b02d58cd Bug 1205927 - Part 1: [MediaEncoder] Support *.3g2 with EVRC audio format. r=ayang 2015-10-27 15:12:26 +08:00
Nicholas Nethercote
a34d272e2b Bug 1209812 (part 3) - Rename SurfaceFormat::R5G6B5 as R5G6B5_UINT16. r=Bas.
--HG--
extra : rebase_source : 1efcfb2522e823e55b5c7b77531a9d2c42c49c8b
2015-10-22 23:01:31 -07: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
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Andreas Pehrson
cf12f20f9b Bug 1182426 - Add some asserts to VP8TrackEncoder for sanity. r=roc
--HG--
extra : commitid : 9dFV0mv1iSr
extra : rebase_source : 9189ebce5d39dd576fca123ac2a9fa99872de777
2015-10-02 13:59:18 +08:00
Andreas Pehrson
4c43df2634 Bug 1182426 - Convert non-PlanarYCbCRImages in VP8TrackEncoder. r=roc
--HG--
extra : commitid : 9dFV0mv1iSr
extra : rebase_source : 82cf3fde97c1f74229a9bbca4f8eebe1b953b167
2015-10-02 13:59:17 +08:00
Andreas Pehrson
1447402197 Bug 1182426 - Flatten YUV formats conversion code in VP8TrackEncoder. r=roc
--HG--
extra : commitid : 9dFV0mv1iSr
extra : rebase_source : bc4935d580936903461c00312dde61c95a726eca
2015-10-02 13:59:17 +08:00
Andreas Pehrson
82fe052e12 Bug 1182426 - Don't try to encode new frames of a size other than the initial in VP8TrackEncoder. r=roc
--HG--
extra : commitid : 9dFV0mv1iSr
extra : rebase_source : bcf38a8371226b53fd5e731fda50d3c260b60d9f
2015-10-02 13:59:17 +08:00
Andreas Pehrson
db0b3b7874 Bug 1182426 - Sort includes in VP8TrackEncoder.cpp alphabetically. r=roc
--HG--
extra : commitid : 9dFV0mv1iSr
extra : rebase_source : fe094fcd39d4620ef50dae24efc6e374c47ba407
2015-10-02 13:59:17 +08:00
Andreas Pehrson
2802ee3e88 Bug 1170958 - Add input stream and track as args to NotifyQueuedTrackChanges. r=roc
This allows for tracking the input track of an added track (for
ProcessedMediaStream tracks; SourceMediaStream tracks don't have input
tracks) directly in the NotifyQueuedTrackChanges handler, which will be
necessary for locking MediaInputPorts to specific tracks.

--HG--
extra : commitid : GPSNwBVyD4j
extra : rebase_source : 4bed5dffe66b71b7ad23f4c02531d84af25cd316
2015-09-30 09:31:53 +08:00
Wes Kocher
03a1803261 Backed out 9 changesets (bug 1170958) for frequent test_getUserMedia_addTrackRemoveTrack.html failures
Backed out changeset 277c1f8098d1 (bug 1170958)
Backed out changeset aa86bb9eea95 (bug 1170958)
Backed out changeset 8af8b85a4b26 (bug 1170958)
Backed out changeset ec1bf225e9cb (bug 1170958)
Backed out changeset 4a04ddca2b6b (bug 1170958)
Backed out changeset e85c9977a311 (bug 1170958)
Backed out changeset 16b40ff04e8f (bug 1170958)
Backed out changeset ad206925c84a (bug 1170958)
Backed out changeset 2106eccec79b (bug 1170958)
2015-09-25 13:08:55 -07:00
Andreas Pehrson
7aca9eb1fd Bug 1170958 - Add input stream and track as args to NotifyQueuedTrackChanges. r=roc
This allows for tracking the input track of an added track (for
ProcessedMediaStream tracks; SourceMediaStream tracks don't have input
tracks) directly in the NotifyQueuedTrackChanges handler, which will be
necessary for locking MediaInputPorts to specific tracks.

--HG--
extra : commitid : Kvj9RrN9MgP
2015-09-25 23:23:17 +08:00
Nicholas Nethercote
842dd1cf5a Bug 1207741 - Remove gfxIntSize. r=nical.
gfxIntSize is just a typedef of gfx::IntSize, so this is very mechanical. The
only tricky part is deciding for each occurrence whether to replace it with
IntSize, gfx::IntSize or mozilla::gfx::IntSize; in all cases I went with the
shortest one that worked given the existing "using namespace" declarations.

--HG--
extra : rebase_source : 67fd15f87222b16defa70ef795c6d77dfacf1c36
2015-09-23 11:49:05 -07:00
Maire Reavy
1939f24ed7 Bug 1161276: part 2 - pass bitrates to track encoders for MediaRecorder r=roc 2015-06-08 11:47:28 +08:00
Wes Kocher
5d45d1a728 Backed out 3 changesets (bug 1161276) for test_mediarecorder_bitrate.html failures CLOSED TREE
Backed out changeset 9187f4d2518f (bug 1161276)
Backed out changeset 4e8f28b17300 (bug 1161276)
Backed out changeset cf05881e89ed (bug 1161276)
2015-09-17 13:06:41 -07:00
Maire Reavy
a4af8ac183 Bug 1161276: part 2 - pass bitrates to track encoders for MediaRecorder r=roc 2015-06-08 11:47:28 +08:00
Benjamin Chen
cb59611f93 Bug 1197669 - Part2 - 1. Ensure the EOS is sent to MediaCodec. 2. mEndOfStream should be protected by monitor. r=sotaro 2015-09-01 11:25:35 +08:00
Paul Adenot
cd7cf1f8ca Bug 901633 - Part 3 - Fix TrackEncoder to use the new AudioChunk methods. r=jesup
--HG--
extra : rebase_source : 58be44dff12ef0168a09d7dde5a8e24061f21f3c
2015-07-29 18:25:34 +02:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Nicholas Nethercote
87b80f8c66 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.

--HG--
extra : rebase_source : 6a8c8d8ffb53ad51b5773afea77126cdd767f149
2015-07-28 23:24:24 -07: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