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

64 Коммитов

Автор SHA1 Сообщение Дата
JW Wang 1a90a30802 Bug 1248229. Part 2 - GC might happen in between OutputStreamManager::Disconnect() and OutputStreamManager::Connect(). We need to check if the stream is already destroyed before trying to connect it. r=roc.
MozReview-Commit-ID: EL3ip1yjNaz
2016-02-22 11:04:41 +08:00
JW Wang 8305f2e98d Bug 1248314. part 2 - move track initialization code into the constructor of DecodedStreamData. r=roc.
MozReview-Commit-ID: 2aQ7cXxRDTE
2016-02-15 11:41:31 +08:00
JW Wang fb95de6307 Bug 1248314. Part 1 - Since OutputStreamManager::Connect/Disconnect is tightly coupled with the constructor/destructor of DecodedStreamData, it would improve cohesion to let DecodedStreamData manage an OutputStreamManager and know when to call OutputStreamManager::Connect/Disconnect. r=roc.
MozReview-Commit-ID: Gg6WxMzAXSp
2016-02-15 11:39:13 +08:00
Jean-Yves Avenard c04fc8bec6 Bug 1237160: Do not count frames not composited as dropped. r=cpearce
This is a partial reversal of bug 1230338. We can't distinguish frames that are never composited because the media element is hidden from the frames genuinely dropped due to machine slowness. So until we can distinguish them, let's not report them as dropped.

MozReview-Commit-ID: ERV8Luaxp3F
2016-02-10 11:05:09 +11:00
Alastor Wu 28154f1f42 Bug 1242774 - only resolve promise when exist. r=jwwang. 2016-02-05 01:39:00 +01:00
JW Wang 4a525dc7dd Bug 1245542 - I suspect AudioData::mAudioData/mFrames are poisoned when sample format doesn't match the metadata. Let's ignore these samples to see if crash volume can be reduced. r=kinetik. 2016-02-05 10:19:12 +08: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
JW Wang b9727f12f3 Bug 1241003 - ignore AudioData with 0 frames to avoid silence. r=kinetik. 2016-01-21 21:14:42 +08:00
JW Wang 541dacf22b Bug 1240420. Part 1 - move checks of mismatched sample rate or channel numbers to AudioStream. r=kinetik. 2016-01-21 21:11:14 +08:00
JW Wang 31e6c6ee58 Bug 1240417. Part 1 - add a writer class to encapsulate pointer arithmetic. r=kinetik. 2016-01-18 11:24:06 +08:00
JW Wang ae5faca646 Bug 948267. Part 2 - implement AudioStream::DataSource for DecodedAudioDataSink and remove its audio thread. r=kinetik. 2016-01-12 21:48:25 +08:00
JW Wang 93bb6f7b7d Bug 1234424. Part 2 - remove unused code. r=roc. 2016-01-05 21:15:43 +08:00
JW Wang c892dcaefa Bug 1234424. Part 1 - share the underlying value of MDSM::mSameOriginMedia with DecodedStream. r=roc. 2016-01-05 21:15:37 +08:00
JW Wang 57b173ae94 Bug 1233650. Part 4 - remove unused functions from DecodedStream. r=roc. 2015-12-24 10:14:16 +08:00
JW Wang f7894b21a7 Bug 1233650. Part 3 - move creation of OutputStreamManager from DecodedStream to MDSM. r=roc. 2015-12-24 10:14:16 +08:00
JW Wang 7afdbac0f6 Bug 1233650. Part 2 - make OutputStreamManager ref-counted so it can be shared between MDSM and DecodedStream. r=roc. 2015-12-24 10:14:16 +08:00
JW Wang 8198911d8b Bug 1233650. Part 1 - extract OutputStreamManager to its own file. r=roc.
--HG--
rename : dom/media/mediasink/DecodedStream.cpp => dom/media/mediasink/OutputStreamManager.cpp
rename : dom/media/mediasink/DecodedStream.h => dom/media/mediasink/OutputStreamManager.h
2015-12-24 10:14:15 +08:00
JW Wang bcd91fefed Bug 1231091. Part 6 - fix test_streams_element_capture.html timeout. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang a03dc1e4e1 Bug 1231091. Part 5 - Remove DecodedStream::IsFinished() and unused code. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang 43c45372af Bug 1231091. Part 4 - ensure the end promise is resolved in the special case where video duration is 0. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang 2bdedb0118 Bug 1231091. Part 3 - resolve the end promise when all frames are rendered. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang 5cf3e3bfa5 Bug 1231091. Part 2 - return correct promises when audio/video track is asked. r=roc. 2015-12-22 08:42:38 +08:00
JW Wang 45b81db1ac Bug 1233648 - Fix some insufficient includes. r=kinetik. 2015-12-18 15:12:45 +08:00
JW Wang 480823b5c6 Bug 1232520 - dont' invoke AbstractThread::MainThread()->Dispatch() to avoid reentrant of AutoTaskDispatcher during tail dispatching phase. r=jya. 2015-12-18 11:50:32 +08:00
JW Wang f79563a6b5 Bug 1231075. Respect the timestamp of video frames and don't pop frames as fast as we can in real-time mode. r=roc. 2015-12-17 10:53:49 +08:00
JW Wang 9477651c83 Bug 1230882. Part 2 - remove DecodedStream::BeginShutdown() and other unused code. r=roc. 2015-12-14 11:32:19 +08:00
JW Wang f8c0036f90 Bug 1230882. Part 1 - destroy DecodedStreamData properly when dispatch fails. r=roc. 2015-12-14 11:32:18 +08:00
Matt Woodrow 6ef854d267 Bug 1230338 - Record video frames dropped by the compositor, or while flushing during skip-to-keyframe. r=jya 2015-12-04 13:33:21 +13:00
JW Wang 22151cf459 Bug 1218311 - Port the fix of bug 1193614 to VideoSink. r=cpearce. 2015-11-25 15:15:05 +08:00
Robert O'Callahan 472e6027ce Bug 1198663. Skip null Images in VideoSink::RenderVideoFrames instead of treating them as valid. r=jwwang
--HG--
extra : commitid : Dsr6BrRKse6
extra : rebase_source : dfff21c195243ddf3fb69cee92caf22da5383abd
2015-11-12 09:59:04 +13: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
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
JW Wang 32d2d557d7 Bug 1139256 - remove the assertion in AudioStream::GetPositionInFramesUnlocked(). See bug 1139256 comment 4 for the detail. r=kinetik. 2015-11-02 21:26:12 +08:00
Kilik Kuo 0bf3fd5a4f Bug 1194918 - Override function SetVolume/SetPreservesPitch in VideoSink for the contained AudioSink. r=jwwang. 2015-10-19 18:14:31 +08:00
Kilik Kuo 1f68a3c545 Bug 1194918 - Move av-sync and video frame rendering logic from MDSM to VideoSink. r=jwwang. 2015-10-19 18:08:11 +08:00
Kilik Kuo 12f5e4fabf Bug 1194918 - Add VideoSink which contains either AudioSinkWrapper or DecodedStreamSink as a default operating MediaSink in MDSM. r=jwwang. 2015-10-19 17:32:16 +08: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
JW Wang 74504dc15a Bug 1207915 - Apply the fix of bug 1052206 to DecodedStream. r=roc. 2015-09-28 05:46:47 +08:00
Carsten "Tomcat" Book 4fe48de950 Backed out 1 changesets (bug 1207915) for windows m3 test failures
Backed out changeset 84fd96dc7ddc (bug 1207915)
2015-09-24 11:44:25 +02:00
JW Wang 41104e7fe4 Bug 1207915 - Apply the fix of bug 1052206 to DecodedStream. r=roc. 2015-09-24 14:29:01 +08:00
Robert O'Callahan 1289d5e83f Bug 1189506. Call GraphTimeToStreamTime in DecodedStreamGraphListener::NotifyOutput, since there's no blocking pending there. r=karlt
--HG--
extra : commitid : 4DLFErvxqnP
extra : rebase_source : 00d7c561a1563b431c1098ea340603e252469c3d
2015-09-08 16:41:45 +12:00
Robert O'Callahan 13179ae295 Bug 1189506. Rename StreamTimeToGraphTime/GraphTimeToStreamTime to ...WithBlocking. r=karlt
--HG--
extra : commitid : 77I6WKoXbJA
extra : rebase_source : b289cbcb99c4bc52d70c78a6195c992bb5ba7ac1
2015-09-08 15:41:00 +12:00
Robert O'Callahan 53dbc8f50e Bug 1189506. Remove aFlags parameter from AllocateInputPort. r=karlt
--HG--
extra : commitid : GZuYprloPNM
extra : rebase_source : 17ca412dd6232ad5c739918500d959a03895a65c
2015-09-04 16:42:42 +12:00
Robert O'Callahan 86c380603b Bug 1189506. Convert ChangeExplicitBlockerCount to MediaStream::Suspend/Resume. r=padenot
--HG--
extra : commitid : EAfe35GbRPL
extra : rebase_source : f6da37f3a9e8eefbdcf3e6787ec7edcc99e53859
2015-09-11 01:45:36 +12:00
Robert O'Callahan 95ebfe3aa1 Bug 1189506. Don't bother blocking captured media-element MediaStreams while we're not decoding. r=jwwang
They should just run in realtime since we're getting rid of blocking.

--HG--
extra : commitid : K0MeENZ5JAa
extra : rebase_source : ed3cd908faa96fd4dab2f178836449774f085d27
2015-09-04 00:46:33 +12:00