Commit Graph

54 Commits

Author SHA1 Message Date
Chris Pearce
eb35ad5fb8 Bug 993003 - Ensure we abort media load if IMFSourceReader creation fails. r=padenot 2014-04-09 16:45:32 +12:00
Matt Woodrow
1decbcaebc Bug 904890 - Part 4: Enable hardware accelerated video decoding for OMTC+D3D9/11. r=cpearce 2014-04-07 15:17:41 +12:00
Chris Pearce
d0a93358ad Bug 986947 - Make MP3 contained in MP4 playback again on Windows with WMF backend. r=padenot
Report that we can play MP3 inside MP4 on Windows Vista and later in
HTMLMediaElement.canPlayType. Chrome and IE on Windows match this behaviour.

Add a test file with MP3 contained inside MP4. Note the B2G emulator can't play
this file, so I added a codecs parameter to the file's mime type so that
decoder backends have to opt-in to testing with it.

Enable playback of MP3 inside MP4 in WMFReader.

Change from reporting the IMFSourceReader's duration inside WMFReader, to
instead report the IMFSourceReader's duration as the media "end time". This is
needed because the MP3-contained-in-MP4 file's first sample output by the
IMFSourceReader has a non-zero timestamp, and the MediaDecoderStateMachine
assumes that the media samples will be in the range
[$firstSampleStartTime, $firstSampleStartTime+$reportedDuration]. But that's
not the case here, the IMFSourceReader seems to output samples in the range
[0,$reportedDuration]. This assumption mismatch means on the
MP3-contained-in-MP4 file we end up trying to seek after what the
IMFSourceReader assumes is the end of the file, which fails and causes
test failures.
2014-04-04 10:39:42 +13:00
Chris Pearce
2f77737864 Bug 987127 - Destroy and re-create IMFSourceReader without using DXVA when DXVA init fails to fix failure on AMD Radeon 3000 chipsets. r=padenot 2014-04-02 14:07:41 +13:00
Chris Pearce
223e397746 Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
* * *
Bug 778077 - Fix up MediaOMXReader fastseek to ensure audio stream stays in sync with video stream. r=cajbir
2014-04-01 16:39:04 +13:00
Ed Morley
05dcbf9506 Backed out changeset 00fa39c23b44 (bug 778077) for reftest failures 2014-03-28 12:31:29 +00:00
Chris Pearce
dac6ce38ba Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
2014-03-28 22:36:10 +13:00
Phil Ringnalda
e21145ad4a Backed out 2 changesets (bug 778077, bug 631058)
CLOSED TREE

Backed out changeset dda301682977 (bug 631058)
Backed out changeset 25b633e7dcd5 (bug 778077)
2014-03-27 21:50:02 -07:00
Chris Pearce
fc3fc91d79 Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
2014-03-28 15:50:28 +13:00
Chris Pearce
5e594c8460 Bug 973408 - Set MediaDecoderReaders idle when they're not decoding. r=kinetik 2014-03-11 11:44:10 +08:00
Ms2ger
f79d93ff0a Bug 952033 - Part c: Use IntSize and IntRect in VideoData; r=roc 2014-02-09 09:04:38 +01:00
Ben Kelly
1b1cb3004d Bug 960873: Part 1: Refactor MediaDecoderReader.h into separate headers. r=cpearce 2014-02-03 20:49:21 -05:00
Birunthan Mohanathas
e81a8f702d Bug 828300 - Replace NS_ARRAY_LENGTH with mozilla::ArrayLength/MOZ_ARRAY_LENGTH. r=ehsan 2014-01-30 13:26:54 -05:00
Chris Pearce
f0bdd1774e Bug 945645 - Only init WMF video decoding if we have a video container. r=padenot. 2014-01-07 14:36:12 +13:00
Ehsan Akhgari
cd98ad7afc Bug 950840 - Rename some logging macros in content/media/wmf; r=cpearce 2013-12-17 14:43:29 -05:00
Chris Pearce
25d65fda1c Bug 886196 - Implement WMF platform decoder for FMP4 demuxer. r=padenot 2013-11-21 10:04:33 +13:00
Matthew Gregan
6dcb5015db Bug 939662 - Remove "using namespace mozilla::dom;" from MediaDecoder.h and fix fallout. r=cpearce 2013-11-18 17:22:47 +13:00
Chris Pearce
e8d0d063b3 Bug 933579 - Export IsVideoContentType() to VideoUtils, so that it can be used elsewhere, and move all of VideoUtils into namespace mozilla. r=kinetik 2013-11-04 11:45:19 +13:00
Chris Pearce
9125652ed9 Bug 930833 - Extract more WMF utility functions to WMFUtils.h/cpp. r=padenot 2013-10-26 15:23:37 +13:00
Chris Pearce
2744117b84 Bug 930829 - Add MediaData class as base for VideoData and AudioData to simplify writing a generic stream decoder. r=kinetik 2013-10-25 15:44:58 +13:00
Birunthan Mohanathas
872802570b Bug 784739 - Switch from NULL to nullptr in content/; r=ehsan
--HG--
extra : rebase_source : 9237726507e8002479616a98a82646a763932507
2013-10-23 16:34:10 -04:00
Chris Pearce
cd4b7635ae Bug 928765 - Create MediaDecoderReader::GetBuffered() base implementation that estimates buffered ranges, so that subclasses do have to keep reimplementing the estimation. r=doublec 2013-10-21 16:31:05 +13:00
Matthew Gregan
e1f44d3688 Bug 920867 - Split VideoInfo into Video and Audio objects, then encapsulate in new MediaInfo object. r=cpearce 2013-09-27 17:22:38 +12:00
Chris Pearce
7fb506d1f8 Bug 915957 - Move MediaDecoder::NotifyBytesConsumed() calls into MediaResource, so we don't need to remember to do them in all decoder backends. r=kinetik 2013-09-18 15:37:23 +12:00
Chris Pearce
6745dba042 Bug 915958 - Automatically Finish() MediaQueues, so that each backend doesn't need to remember to do it. r=edwin 2013-09-13 14:33:54 +12:00
Chris Pearce
cf122919c7 Bug 908862 - Strip ID3 tags before we expose MP3 data to DirectShow, to work around bugs in its MP3 decoder. r=padenot 2013-08-29 10:53:03 +12:00
Chris Pearce
3ab415c2ae Bug 901944 - Ignore MF_E_TRANSFORM_TYPE_NOT_SET error when setting D3DManager on H264 Decoder. This error is returned on some (or all?) video cards on Vista, and appears to be safe to ignore. r=padenot 2013-08-13 14:42:39 +12:00
Chris Pearce
9a2e6ae827 Bug 901944 - Disable DXVA on Vista, to avoid rendering artifacts. r=kentuckyfriedtakahe 2013-08-12 17:17:38 +12:00
Ryan VanderMeulen
181107aedd Backed out changeset ce3a1df4d559 (bug 875247) for mochitest-mc crashes. 2013-08-09 17:56:15 -04:00
Chris Pearce
0f20fe47c3 Bug 875247 - Use DXVA2 via D3D11 on Windows 8 to avoid readback of video frames when we turn on OMTC on Windows 8. r=Bas,padenot,gps 2013-08-10 08:17:44 +12:00
David Zbarsky
2486054166 Bug 901060: Fix build bustage on Windows, r=bz over irc 2013-08-07 17:40:21 -04:00
Brian R. Bondy
f9df99564d Bug 878449 - Fixed mismatched CoInitialize call causing crash in JumpList. r=padenot. 2013-06-20 08:57:46 -04:00
Chris Pearce
24f2771c6d Bug 881954 - Only initialize DXVA when we're decoding video. r=padenot 2013-06-14 09:07:28 +12:00
Chris Pearce
d04999e520 Bug 880062 - Make WMF video backend call MediaDecoder::SetMediaSeekable(false) when it can't seek like it's supposed to. r=padenot 2013-06-13 10:15:23 +12:00
Chris Pearce
2b70112a5c Bug 880006 - Make WMF video backend call MediaDecoder::NotifyBytesConsumed() like it's supposed to. r=padenot 2013-06-11 12:53:26 +12:00
Chris Pearce
590f37edd9 Bug 870400 - Calculate audio timestamps for WMF based on audio frames played, rather than trusting the container's timestamps. r=padenot 2013-05-31 11:34:52 +12:00
Ryan VanderMeulen
a10a8857fa Backed out changeset 9b5a9cd5032d (bug 870400) for Windows mochitest-1 failures. 2013-05-22 07:40:29 -04:00
Chris Pearce
22eb7c1ef4 Bug 870400 - Calculate audio timestamps for WMF based on audio frames played, rather than trusting the container's timestamps. r=padenot 2013-05-22 17:43:26 +08:00
Chris Pearce
44c5698dd1 Bug 872375 - Specify picture region in D3D9SurfaceImage. r=padenot 2013-05-20 13:14:13 +08:00
Trevor Saunders
36f862aafb bug 869283 - fix gcc warnings in wmf r=cpearce 2013-05-06 21:58:55 -04:00
Chris Pearce
bbaa7306e8 Bug 847267 - Use DXVA2 to offload H.264 decoding to the GPU on Windows. r=Bas 2013-05-04 22:12:41 +12:00
Chris Pearce
60462ac067 Bug 866664 - Don't call WMFDecoder::IsMP3Enabled() off the main thread. r=padenot 2013-04-30 22:14:18 +12:00
Chris Pearce
cdcda30e31 Bug 852915 - Disable MP3 playback using WMF on Win7SP0 to prevent random crashes. r=bbondy 2013-04-19 14:54:26 +12:00
Phil Ringnalda
d0b651a807 Back out 248daf8c6362 (bug 852915) for Win7 mochitest-1 orange 2013-04-17 23:23:33 -07:00
Chris Pearce
d657cc74b8 Bug 852915 - Disable MP3 playback using WMF on Win7SP0 to prevent random crashes. r=bbondy 2013-04-18 16:38:14 +12:00
Andrea Marchesini
b57856b7a9 Bug 841014 - Rename nsTimeRanges.h to TimeRanges.h. r=Ms2ger
--HG--
rename : content/html/content/src/nsTimeRanges.cpp => content/html/content/src/TimeRanges.cpp
rename : content/html/content/src/nsTimeRanges.h => content/html/content/src/TimeRanges.h
2013-03-02 14:14:44 -05:00
Chris Pearce
bb134603da Bug 830171 - Use SourceReader in async mode to better allow shutdown on MediaResource close. r=padenot 2013-02-15 21:35:48 +13:00
Chris Pearce
60bc3aeda7 Bug 839055 - Refuse to play a video file with WMF which has corrupt or unplayable video or audio streams. r=padenot 2013-02-15 12:54:27 +13:00
Ehsan Akhgari
1090ae9f96 Bug 792263 - Implement decodeAudioData; r=bzbarsky,cpearce,padenot 2013-02-01 17:13:23 -05:00
Chris Pearce
c9887127f0 Bug 823646 - Handle dynamic format changes and video frame display apperature attributes in WMFReader. r=padenot 2013-01-21 14:38:47 +13:00