Commit Graph
51 Commits
Author SHA1 Message Date
Alastor Wu 47fe7031a0 Bug 1400758 - part3 : report the error description with InitPromise for ffmpeg decoders. r=jya
MozReview-Commit-ID: 3MGmU34JY3t
2017-09-18 18:10:05 +08:00
JW Wang f1ae66b766 Bug 1316211. P16 - remove MediaDecoderReader completely and fix includes. r=gerald
MozReview-Commit-ID: AGNyyh4kt3e
2017-07-20 09:56:08 +08:00
Jean-Yves Avenard 2f7eff642d Bug 1364870: [ffmpeg] only check format if frame has been decoded. r=gerald
The format member isn't set when an audio frame hasn't been decoded yet.

MozReview-Commit-ID: IgUj6bjVzdF
2017-05-19 09:52:12 +02:00
JW Wang d24c707be3 Bug 1359715 - let functions in MediaData.h take TimeUnit instead of int64_t. r=kaku
We want to replace the use of int64_t for microseconds by TimeUnit
whenever possible since int64_t is ambiguous which could be microseconds
or milliseconds.

MozReview-Commit-ID: LRz9d4yKBYJ
2017-04-24 17:33:05 +08:00
JW Wang b447b29002 Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
MozReview-Commit-ID: 4bVeqIuWO2O
2017-04-14 17:13:36 +08:00
Jean-Yves Avenard f466c5434b Bug 1336947: P2. Fix coding style. r=gerald
MozReview-Commit-ID: 74OQ6GxSFWX
2017-02-07 23:27:56 +01:00
Jean-Yves Avenard d6b004c4a8 Bug 1319987: P5. Promisify MediaDataDecoder. r=cpearce,gerald,mattwoodrow,snorp
This is a big change, and unfortunately impossible to break down with independently functional commits.

There are four main changes being applied here:

* Code cleanup, including making all MediaDataDecoder related code mozilla coding style compliant
* Make MediaDataDecoder use MozPromise
* Making Flush and Shutdown processes fully asynchronous
* Fixing few data races encountered across the code, in particular in the Android PDM

MozReview-Commit-ID: DpiZucGofJT
2017-01-26 13:56:46 +01:00
Jean-Yves Avenard 2f6bc81356 Bug 1304252: P1. Provide error details for ffmpeg decoder. r=gerald
MozReview-Commit-ID: A0qbYNm4CjX
2016-09-21 13:21:27 +10:00
Jean-Yves Avenard a18c867daa Bug 1299072: P18. Use MediaResult with InitPromise. r=gerald
MozReview-Commit-ID: JiLgiyxvfNC
2016-09-13 13:06:18 +10:00
Jean-Yves Avenard 3972e5c3d6 Bug 1299072: P15. Provide additional error details for most remaining decoders. r=gerald
Additionally, mark non fatal decoding error as such.

Due to the complexity of WMF decoder error handling, this will be done in a follow up bug.

MozReview-Commit-ID: KHWORM8899c
2016-09-13 11:15:36 +10:00
Jean-Yves Avenard 721a2dc099 Bug 1297265: P10. Rework FFmpeg Decoder use of InputExhausted. r=kamidphish
MozReview-Commit-ID: 8fndcHQELTo
2016-09-01 19:42:39 +10:00
Phil Ringnalda fc6fc4652f Backed out 11 changesets (bug 1297265) for gtest timeouts during MediaDataDecoder.H264
Backed out changeset 04d9b7160ac9 (bug 1297265)
Backed out changeset c7bffd1ba7fd (bug 1297265)
Backed out changeset ad1915ff688b (bug 1297265)
Backed out changeset 67a97304d44d (bug 1297265)
Backed out changeset e6b9e6184457 (bug 1297265)
Backed out changeset 30636ac0790f (bug 1297265)
Backed out changeset cc70d3a139bc (bug 1297265)
Backed out changeset 345a577c92a1 (bug 1297265)
Backed out changeset ec1f3ac8751c (bug 1297265)
Backed out changeset da9117375d2e (bug 1297265)
Backed out changeset dd4c7aafcc3d (bug 1297265)
2016-08-31 19:49:28 -07:00
Jean-Yves Avenard 8acdb727cb Bug 1297265: P10. Rework FFmpeg Decoder use of InputExhausted. r=kamidphish
MozReview-Commit-ID: 8fndcHQELTo
2016-08-30 15:22:36 +10:00
Jean-Yves Avenard eb50c1b477 Bug 1270016: P3. Only check audio format at decode time. r=kamidphish
With raw streaming flac, we can't determine the audio format at the time the codec is opened.
Additionally, when using streaming flac, we do not have a STREAMINFO block. The FFmpeg flac decoder check that extradata is null and not its size and would error due to an invalid extradata.

MozReview-Commit-ID: KZ3n8b8WUMo
2016-08-16 16:21:18 +10:00
Jean-Yves Avenard 42c92f11c5 Bug 1270016: P2. Make the FFVPX PDM work with FLAC. r=kentuckyfriedtakahe
MozReview-Commit-ID: BmwtZF3NSEI
2016-08-02 22:54:26 +10:00
Wes Kocher 494be38a74 Backed out 3 changesets (bug 1270016) for various media test failures/unexpected-passes a=backout
Backed out changeset 9178e6e14a5a (bug 1270016)
Backed out changeset 8359b182bb99 (bug 1270016)
Backed out changeset 8a0f3231b43e (bug 1270016)
2016-08-22 10:07:57 -07:00
Jean-Yves Avenard 762ddc4f77 Bug 1270016: P3. Only check audio format at decode time. r=kamidphish
With raw streaming flac, we can't determine the audio format at the time the codec is opened.
Additionally, when using streaming flac, we do not have a STREAMINFO block. The FFmpeg flac decoder check that extradata is null and not its size and would error due to an invalid extradata.

MozReview-Commit-ID: KZ3n8b8WUMo
2016-08-16 16:21:18 +10:00
Jean-Yves Avenard cb23b0fbf0 Bug 1270016: P2. Make the FFVPX PDM work with FLAC. r=kentuckyfriedtakahe
MozReview-Commit-ID: BmwtZF3NSEI
2016-08-02 22:54:26 +10:00
Alfredo Yang e890782c53 Bug 1068151 - keep decoding a corrupted video. r=jya 2016-05-30 18:24:00 +02:00
JW Wang cbe7f99505 Bug 1274216 - remove use of FlushableTaskQueue from PlatformDecoderModule. r=jya.
MozReview-Commit-ID: E3DG84yKRmw
2016-05-19 17:50:31 +08:00
JW Wang 403c45d43f Bug 1271508. Part 3 - extract code to the parent class and remove use of mTaskQueue from sub-classes. r=jya. 2016-05-09 23:23:48 +08:00
JW Wang 3bccdc9f87 Bug 1271508. Part 1 - refactor FFmpegAudioDecoder code to be similar to FFmpegVideoDecoder::Input() so it would be easier to extract common code to the parent class. r=jya.
MozReview-Commit-ID: 4IXZz50qrWm
2016-05-09 23:03:54 +08:00
Carsten "Tomcat" Book 70a979ac69 Backed out changeset 31dc08c9c505 (bug 1068151) for causing assertion failures 2016-05-06 14:02:12 +02:00
Alfredo Yang 5371875960 Bug 1068151 - keep decoding with malformat video. r=jya 2016-05-06 01:10:00 +02:00
Kyle Huey b972c94d0f Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book aadd508ffe Backed out changeset 85ce8cb0639a (bug 1268313) 2016-04-29 14:21:16 +02:00
Kyle Huey e62a0823c9 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Jean-Yves Avenard 64249b9813 Bug 1267637: [ffmpeg] P7. Reject audio data with unsupported channel configuration. r=gerald
MozReview-Commit-ID: AoEjMjYfUzn
2016-04-27 17:54:15 +10:00
Jean-Yves Avenard 7fc6840baa Bug 1248861: P3. Use AlignedAudioBuffer object with AudioData. r=cpearce
MozReview-Commit-ID: 7HiF4eHlRwB
2016-04-03 23:09:45 +10:00
Jean-Yves Avenard dc46b6fd6c Bug 1240995: [ffmpeg] P1. Refactor FFmpeg PDM. r=kentuckyfriedtakahe
This greatly simplify how the external libavcodec and libavutil are linked.
2016-01-23 01:35:52 +11:00
Jean-Yves Avenard b32324d95a Bug 1240630: [ffvpx] P1. Add a FFVPX PDM. r=kentuckyfriedtakahe
This allows support for linking to two different version of libavcodec: our own and the system one if found.
ffvpx symbols are loaded within the namespace mozilla::ffvpx.
2016-01-19 17:29:19 +11:00
Wes Kocher 7004fb81c7 Backed out 4 changesets (bug 1240630) for asan failures in mochitest(2) and mochitest(oth) CLOSED TREE
Backed out changeset dc949ca1e1ec (bug 1240630)
Backed out changeset 06abea99a292 (bug 1240630)
Backed out changeset 9d90d4b0b928 (bug 1240630)
Backed out changeset 6162c46b32ff (bug 1240630)
2016-01-20 13:47:41 -08:00
Wes Kocher aa6606894d Backed out changeset 8b78eccf2c29 (bug 1240995) for asan failures in mochitest(2) and mochitest(oth) CLOSED TREE 2016-01-20 13:47:13 -08:00
Jean-Yves Avenard 7af9163691 Bug 1240995: [ffmpeg] Refactor FFmpeg PDM. r=kentuckyfriedtakahe
This greatly simplify how the external libavcodec and libavutil are linked.
2016-01-20 20:22:43 +11:00
Jean-Yves Avenard acb371b446 Bug 1240630: [ffvpx] P1. Add a FFVPX PDM. r=kentuckyfriedtakahe
This allows support for linking to two different version of libavcodec: our own and the system one if found.
ffvpx symbols are loaded within the namespace mozilla::ffvpx.
2016-01-19 17:29:19 +11:00
Carsten "Tomcat" Book b865b52699 Backed out changeset 07e06fefa4c7 (bug 1240630) for webgl leaks 2016-01-20 16:11:05 +01:00
Carsten "Tomcat" Book f2ce22a6ee Backed out changeset 4ab338518d02 (bug 1240995) 2016-01-20 16:10:46 +01:00
Jean-Yves Avenard d3cc076d5e Bug 1240995: [ffmpeg] Refactor FFmpeg PDM. r=kentuckyfriedtakahe
This greatly simplify how the external libavcodec and libavutil are linked.
2016-01-20 23:55:37 +11:00
Jean-Yves Avenard c4ffe86614 Bug 1240630: [ffvpx] P1. Add a FFVPX PDM. r=kentuckyfriedtakahe
This allows support for linking to two different version of libavcodec: our own and the system one if found.
ffvpx symbols are loaded within the namespace mozilla::ffvpx.
2016-01-20 23:55:35 +11:00
Jean-Yves Avenard f8293234b1 Bug 1232268: [ffmpeg] P4. Add support for libavcodec 57. r=kentuckyfriedtakahe
At this stage only the original FFmpeg project is supported.
2016-01-11 17:52:44 +11:00
Jean-Yves Avenard 1be723bd5d Bug 1237210: [ffmpeg] P1. Have specialized AVCodecContext initialization. r=gerald
A common initialization procedure is too restrictive, and we end up setting up audio configuration for video decoding and vice-versa
2016-01-06 23:03:49 +11:00
Nathan Froyd c4013082d6 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
Nathan Froyd 4e6d8f6705 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
2015-10-18 01:24:48 -04:00
Jean-Yves Avenard 05956b459d Bug 1206568: P1. Ensure FFmpeg decoder is only accessed through the decoder's task queue. r=cpearce
Add strong assertion that it is indeed the case.
2015-09-23 12:59:25 +10:00
Alfredo Yang 8c72dda1e5 Bug 1146086: use promise to Init() in PlatformDecoderModule. r=jya,r=cpearce 2015-08-11 14:09:12 +10:00
Jean-Yves Avenard 9a36f20191 Bug 1190258: P1. Use getter to access MediaRawData mData and mSize member. r=cpearce 2015-08-06 18:48:44 +10:00
Bobby Holley 0d7ca19bc1 Bug 1184634 - Move various includes into the mozilla namespace. r=gerald
I did my a quick best-effort pass to fix up the most egregious ordering
problems. I left some big pre-existing messes alone.
2015-07-16 22:23:18 -07:00
Bobby Holley 8fcb9d8c7b Bug 1184634 - Rename MediaTaskQueue to TaskQueue. r=gerald 2015-07-16 22:23:06 -07:00
Jean-Yves Avenard f12f1d4d95 Bug 1179094: Use TimeUnit in PlatformDecoderModule. r=cpearce 2015-07-08 10:56:16 +10:00
Nathan Froyd f3fabc2d6c Bug 1116905 - part 1 - remove dependence on implicit conversion from T* to TemporaryRef<T>, non-gfx changes; r=ehsan 2015-04-30 15:17:08 -04:00