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

163 Коммитов

Автор SHA1 Сообщение Дата
Michael Layzell cab1a9949b Bug 1336510 - Part 4: Capture a strong reference to this in dom/media, r=jwwang
MozReview-Commit-ID: 4lVGrGzhVXh
2017-02-24 14:34:23 -05:00
Wes Kocher 7e8f316730 Backed out 8 changesets (bug 1336510) for windows debug mn-e10s failures a=backout
Backed out changeset 419ada2f9e81 (bug 1336510)
Backed out changeset 19239f566a93 (bug 1336510)
Backed out changeset c8aeead6fe83 (bug 1336510)
Backed out changeset 422e63b872b5 (bug 1336510)
Backed out changeset 21869174dfd3 (bug 1336510)
Backed out changeset 57476b9f342d (bug 1336510)
Backed out changeset e842cdaaa7e5 (bug 1336510)
Backed out changeset bd943b368ff7 (bug 1336510)

MozReview-Commit-ID: 2z3Wa9QFkX4
2017-02-23 16:07:41 -08:00
Michael Layzell 1d0870e2e1 Bug 1336510 - Part 4: Capture a strong reference to this in dom/media, r=jwwang
MozReview-Commit-ID: 4lVGrGzhVXh
2017-02-23 12:24:12 -05:00
Tom Tromey d2667a2b27 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L

--HG--
extra : rebase_source : 810ac727bef0751f24edea18c52e0ec170bf367d
2016-12-14 09:32:21 -07:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Chun-Min Chang 9efca17a07 Bug 1321502 - part 2: Use preferred layout for initializing cubeb when audio queue is empty; r=jya
MozReview-Commit-ID: BDEb8IxuJRn

--HG--
extra : rebase_source : a3bc1ea315c6a00d479a1b7da3eb14d89f458b2d
2017-02-04 08:22:15 +08:00
Chun-Min Chang 561671475d Bug 1321502 - part 1: Enable multi-channel support in Gecko on Windows; r=jya
MozReview-Commit-ID: KURUk3EffOu

--HG--
extra : rebase_source : a0ce3fb8691f45a33995a3ce1ba895c254a35c8c
2017-01-26 17:35:31 +08: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
Carsten "Tomcat" Book f040eda61d Merge mozilla-central to autoland 2017-01-23 11:42:26 +01:00
JW Wang da6c0492b0 Bug 1331862. Part 1 - extract code to functions for reuse. r=kaku
MozReview-Commit-ID: 9QNTaBxGUFq

--HG--
extra : rebase_source : 98e95c60cbd66a5df4571644e4a6415f5bdbc371
extra : intermediate-source : 9dcd71ff0f89beda838f09865dfaa7f96983e430
extra : source : b0cf54f37556f520e45a001dcfa681e4a612a927
2017-01-18 17:55:59 +08:00
Bevis Tseng 72d516ef01 Bug 1314833 - Part 2.2: Use AbstractThread::CreateDirectTaskDrainer() to Drain Direct Tasks Dispatched to MediaStreamGraph. f=rjesup,r=padenot,jwwang
MozReview-Commit-ID: 1KgE3uKu4CG

--HG--
extra : rebase_source : 2ad950afe84675fb9bc4c449e53e7c0d52270175
2016-12-07 22:00:12 -10:00
Bevis Tseng f2bdbd8fd1 Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
MozReview-Commit-ID: 9yJi3iDtVZG

--HG--
extra : rebase_source : 39c720ccc576ed9247b5e8abb70d99d7873b3ad6
2016-11-29 13:03:36 +08:00
JW Wang 4f5754ca55 Bug 1328130. Part 2 - remove MozPromiseRequestHolder::Begin(). r=gerald
MozReview-Commit-ID: JL27n0Era6E

--HG--
extra : rebase_source : e6de76db3fb35b110370497f4060ea1c3f527f23
extra : intermediate-source : 5bc39a45ef042b895a5abda59cc0796e8cfb4be3
extra : source : a7f7faded7b112e8a971ca96b091a9a22214a2bb
2017-01-11 16:33:29 +08:00
John Lin d496213476 Bug 1322679 - call MarkSentToCompositor() when VideoSink::Redraw() processing queued frame. r=jwwang
MozReview-Commit-ID: IBM6HcCpVA8

--HG--
extra : rebase_source : 7cdbe96a7236e2e0be61b6dc953963fde3fe6b84
2016-12-09 19:57:12 +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
Kaku Kuo 42a1f53991 Bug 1309516 part 0 - make sure that the VideoSink::Redraw() always draws something; r=jwwang
MozReview-Commit-ID: BQ0FDyNPuri

--HG--
extra : rebase_source : 42649411a6b00cc09f581b63a00e98b14a093986
2016-11-15 12:04:26 +08:00
JW Wang b7474df3ed Bug 1316543 - Fix the calculation of VideoSink::mVideoFrameEndTime. r=cpearce
MozReview-Commit-ID: 4p34iXLtQz5

--HG--
extra : rebase_source : e084436cd88e7bea9000422a7e57d8f343c26f41
2016-11-10 17:12:01 +08:00
Chris Pearce ad6837ab57 Bug 1307546 - Give VideoSink a minimum update interval. r=jwwang
Without this, we can end up with very short, or even negative, update
intervals, meaning we unnecessarily use CPU when we can't actually
advance the playback position.

MozReview-Commit-ID: 6H32uVCyCll

--HG--
extra : rebase_source : 952799b846bcbb562d4ff99e97a8dcb5d8b2f558
2016-11-07 16:21:58 +13:00
JW Wang fea88a9ded Bug 1315586 - DecodedStream::NotifyOutput() should compare |a->mTime| to GetPosition() instead of |aTime|. r=pehrsons
MozReview-Commit-ID: AyqsW9w5Je0

--HG--
extra : rebase_source : b401aad9c175e6ded87edd535c3124eec139ecab
2016-11-07 11:10:53 +08:00
Sebastian Hengst 5bac92d3b9 Backed out changeset d5a00a0b689c (bug 1307546) for increased mda test_BufferingWait_mp4.html failure on Windows 7. r=backout a=backout
MozReview-Commit-ID: J0DyTk9rJJe
2016-11-05 16:52:33 +01:00
Chris Pearce d2ec5f2f3e Bug 1307546 - Ensure we don't set timers with negative intervals in to update A/V sync. r=jya
Our logic to do A/V sync sets a timer to drop expired frames based on the
start time of the next frame in the queue. If the frames in the queue are
badly muxed and don't have monotonically increasing start times, we can
end up setting a timer with a negative interval. This causes us to reevaluate
the frames in the VideoSink's queue immediately, set the same timer again,
and so we end up hot-looping.

This is a simple low-risk fix that detects when we're about to set a negative
interval timer, and instead sets the timer 1/30th of a second in the future.

This fix is deliberately low risk, such that it's suitable for uplift. I have
an idea how to do this better, but the lower risk this is most suitable for
uplift.

MozReview-Commit-ID: CDOqJJodx4l

--HG--
extra : rebase_source : b2833382d95143ee1845f2ea32dcc77a1903dc00
2016-11-04 16:42:24 +13:00
JW Wang f682200758 Bug 1198168 - add debugging logs. r=kaku
MozReview-Commit-ID: D35N9bNNOeK

--HG--
extra : rebase_source : 4da554e41c48e52f9f90e3c9d222d4a85130da87
2016-11-01 14:41:09 +08:00
JW Wang d30c88bef8 Bug 1309111 - Some macros are not expanded correctly by MSVC. r=gerald
MozReview-Commit-ID: BGJXOgslSt8

--HG--
extra : rebase_source : a62efe2e0653f009a7010e5c95dcbb09bed2213b
extra : source : f8a392e8034e1ca216aaf7084f860b0a03e021eb
2016-10-11 13:28:56 +08:00
JW Wang 15fc2d73c6 Bug 1306813 - Don't puslish events to mOnOutput after DecodedStream::Stop() is called. r=pehrsons
Because the TaskQueue of MDSM will shut down soon and TaskQueue::Dispatch() will fail (via mOnOutput.Notify()).
We reset mStream in Forget() on the TaskQueue thread of MDSM so NotifyOutput() can check it
and ensure mOnOutput.Notify() always happen before DecodedStream::Stop().

MozReview-Commit-ID: 4sCXk1KAfCC

--HG--
extra : rebase_source : 1ec50a86fa1519c4fc8caa1087f2794411aa23b0
2016-10-04 14:54:23 +08:00
Jean-Yves Avenard aa4ed2f442 Bug 1305826: P3. Only process the number of frames, do not rely on allocated size. r=gerald
This is only for safeguarding, in case an audio buffer was over allocated. There should be none. But better be safe than sorry

MozReview-Commit-ID: JszA8CqycTr

--HG--
extra : rebase_source : ddeb1ff1f19abba36e4cbb1bab5132f15f5a2a74
2016-10-01 19:34:42 +10:00
JW Wang 1a0d74d8ae Bug 1305353. Part 3 - discard audio samples in DecodedStream::NotifyOutput(). r=pehrsons
MozReview-Commit-ID: 7o6cdP126ip

--HG--
extra : rebase_source : 1c048589c50697b103d41d1f350d3056b392ffdf
extra : source : cb75ad9850543f4739ab37f8cd309301d067fc46
2016-09-26 15:25:11 +08:00
JW Wang 951520874b Bug 1305353. Part 2 - remove DecodedStreamData::GetPosition() and its friends. r=pehrsons
MozReview-Commit-ID: FJvBDO0x6b0

--HG--
extra : rebase_source : 1038e583031cea484cbb1f4e83d8e7fa26b96eb5
extra : source : c9883664b68c0782450994ebe0e1d5798baa06a5
2016-09-26 15:12:20 +08:00
JW Wang b903738272 Bug 1305353. Part 1 - publish output time to DecodedStream using MediaEventProducer. r=pehrsons
MozReview-Commit-ID: 5f37RfBhDA

--HG--
extra : rebase_source : 890a5b52fffac35302db1a8f17b4ff68b31e5ba4
extra : source : 07a11ac6970391aafc96f39370ab83370316f65a
2016-09-26 15:08:12 +08:00
Jamie Nicol 22f1d4f009 Bug 1245959 - Check video frame has non-zero dimensions before sending image to compositor. r=nical
MozReview-Commit-ID: 6PlWqE6is7Z

--HG--
extra : rebase_source : df4ff6689eea6ff8e95dd0f6d7e3e37b994875a1
2016-09-19 14:41:36 +01:00
Sotaro Ikeda 8cffca6531 Bug 1299415 - Clear ImageContainer cached resources When VideoSink pause playing r=jwwang 2016-09-04 23:38:43 -07:00
JW Wang 713c29c0d1 Bug 1299021. Part 2 - ensure resolving the end promise when mVideoSinkEndRequest is resolved. r=kikuo
MozReview-Commit-ID: 2XTpqVGBrBN

--HG--
extra : rebase_source : 37246ada49fd5b8a4de57ece3c3941f182db5e2c
2016-08-29 21:28:36 +08:00
JW Wang 2ecd9cc1dd Bug 1299021. Part 1 - extract the code about resolving the end promise. r=kikuo
MozReview-Commit-ID: ECr058zKdUk

--HG--
extra : rebase_source : ae2b59cbf758ab9b703c9aed471ddb7bf3145f4f
2016-08-29 20:56:00 +08:00
JW Wang 716c3e5830 Bug 1299019 - ensure mVideoFrameEndTime is mono-increasing. r=kikuo
MozReview-Commit-ID: 3rwItcTAqUQ

--HG--
extra : rebase_source : dfcefdd15f85387a13312c271c4df7b424f4d239
2016-08-29 20:46:26 +08:00
Jean-Yves Avenard b3537bb63d Bug 1298594: P4. Pop the frame when current time is past the end of the current frame. r=jwwang
Most frames start when the previous one stop.

MozReview-Commit-ID: H92Bmiki49Q

--HG--
extra : rebase_source : 071416d9151d5188550d73f0eb5a4c70a5fbd48b
2016-08-29 15:46:56 +10:00
JW Wang 663ca6b4fa Bug 1297553 - Dump more debugging messages for MDSM and MediaSink. r=kaku
MozReview-Commit-ID: ILcF1hT2hVN

--HG--
extra : rebase_source : 1f6564eb5161608ee6031b1c362a6b689762dcfe
2016-08-24 11:45:58 +12:00
Chris Pearce b20d1d8c23 Bug 1295630 - Provide a way for A/V sync to be ruined, so talos can test compositor throughput by painting expired frames. r=mattwoodrow
In bug 1258870 I changed the media code so that we dropped all late video
frames. Without this, our A/V sync was broken when the decode was struggling
to keep up, and we weren't reporting dropped frames when the decode couldn't
keep up, and so players couldn't adapt to a bitrate which the decode could keep
up on.

However, dropping all late frames broke talos tests which relied on the old
behaviour of us rendering video frames that were late. So this patch adds a
pref to cause the frame dropping code to not drop the last frame in the
queue, so there will always be something for the compositor to composit. This
means talos will once again be able to test how fast it can composit frames
that aren't supposed to be drawn.

The pref is media.ruin-av-sync.enabled.

It defaults to false.

MozReview-Commit-ID: J3VvpzoDRmI

--HG--
extra : rebase_source : ee24f37f201ef266e0894ca2c5afda498629ec0a
2016-08-19 21:34:42 +12:00
Chris Pearce 3940f4a605 Bug 1258870 - Don't push late video frames to the compositor, drop them. r=jwwang
We can get out of A/V sync if the decode is struggling to keep up. This is
because of the loop in VideoSink::UpdateRenderedVideoFrames(). If this function
runs while there's only one frame in the video queue, we won't drop that one
frame if it's late. If we're struggling to keep up, it's increasingly likely
that we'll end up running this function with only one frame in the video queue.
That results in us entering VideoSink::RenderVideoFrames() with only 1 late
frame, which the compositor dutifully draws. Resulting in a late frame being
drawn, and thus broken A/V sync.

This change makes VideoSink::UpdateRenderedVideoFrames() drop all late
frames, even the last one in the video queue. We now keep A/V sync when the
decode is struggling to keep up. However, if I do this, we end up dropping
(and reporting that we drop) a lot more frames, and thus rendering a lot fewer.
But since we when we drop the frames we report them as dropped, a well written
MSE player can detect that we've failing miserably to keep up, and and lower
their bitrate.




MozReview-Commit-ID: ybkq48mKk2

--HG--
extra : rebase_source : f03c186059a365a45de698b2a30e632daae47fb8
2016-08-15 13:35:52 +12:00
ctai 2c69985ffe Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : transplant_source : %3D%AA%00%CE%A3SV5%8F%84%96%AC%E2%D9%10%EC%85%07N%DF
2016-07-25 10:01:26 +08:00
Sebastian Hengst f4671c3b11 Backed out changeset 4111e388bd90 (bug 1201363) 2016-08-03 19:33:25 +02:00
ctai a3cc6128d3 Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : amend_source : 7b9c51dcb4046c6c807d1cf1e48bef301e45fa8e
2016-07-25 10:01:26 +08:00
Carsten "Tomcat" Book 27cb7f4d79 Backed out changeset 06c0a7eb7bc6 (bug 1201363) 2016-08-02 12:53:53 +02:00
ctai edeaa48113 Bug 1201363 - Call MediaStreamVideoSink::setCurrentFrames in SourceMediaStream::AppendToTrack. r=jesup
In this patch, we first deal with the case of MediaElement. Now we replace |PlayVideo| with |VideoFrameContainer::SetCurrentFrames| in |SourceMediaStream::AppendToTrack|. The MSG use TimeStamp::Now() for the TimeStamp of each video frame in most of case except MediaElement case. Becasue the MediaElement has its own VideoQueue, we need to calucalte the correct Timestamp based on the StartTimeStamp of this MediaStream and the elpased time of the video frame in DecodedStream.

MozReview-Commit-ID: 2bm2AHkFXHu

--HG--
extra : transplant_source : %C4n%D7a%10%CFK%D5%F2%DC%10%08%C2%24%EC%11%13J%DB%5D
2016-07-25 10:01:26 +08:00
Gerald Squelart 7bea2e1262 Bug 1289668 - Refactor FrameStatistics writers to use Data struct - r=kamidphish
Decoders now use FrameStatisticsData to gather data for their frame-related
notifications. This will ease introducing new members later on.

MozReview-Commit-ID: DWdOSPX3JM

--HG--
extra : rebase_source : a3e05f34353a397d1c82b3f4d935c0864f90556e
2016-07-18 10:41:40 +10:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Farmer Tseng 55fd27efdb Bug 1283489 - mParams.mPlaybackRate should be updated after call GetVideoPosition(). r=jwwang 2016-07-10 23:35:00 +02:00
ctai fd36b32d94 Bug 1266646 - Move group of MediaStreamListener to a new header file. r=pehrsons
This can reduce the include header dependency. MediaStreamVideoSink will inherit from DirectMediaStreamTrackListener. But we can't use forward declaration on MediaStreamListener because the usage of nsTArray<RefPtr<MediaStreamVideoSink>>.

MozReview-Commit-ID: 328s4Kw9NvW

--HG--
extra : transplant_source : %D2%18%E3%3B%0C%D8%F04%F3%EB%EB%A0%A7%8B%B1%A9%AB%97rY
2016-06-30 15:07:48 +08:00
Andreas Pehrson e028368c0f Bug 1280445 - Remove wrapper from MediaStream. r=jesup, r=padenot
MozReview-Commit-ID: CTCFloIUXKa

--HG--
extra : rebase_source : b1c2073c638bb65c19a0f40e8d17e9a5bae15c98
extra : source : c6d854b3209e7de7d97153c0bfc492c1d5f1e6b5
2016-06-29 12:27:13 +02:00
JW Wang e34042f5dc Bug 1277175 - Remove AudioStream::IsPaused(). r=kinetik.
MozReview-Commit-ID: K2CHJ0E90MW

--HG--
extra : rebase_source : 4f0bd8f2e46ad8850a15c7a1102c9bae5217e6bc
2016-05-31 15:59:20 +08:00
JW Wang fbdef02717 Bug 1272565 - draw a blank image when no frames in the video track.
MozReview-Commit-ID: 1Kijn00XAnQ
2016-05-17 10:33:32 +08:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00