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

49 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 73fd84bc5d 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

--HG--
extra : rebase_source : 80bd6c6f9726d536b6f306c40d9af6df27333be9
2017-01-26 13:56:46 +01:00
Jean-Yves Avenard e73c9ba70f Bug 1320705: P6. Fix codec mimetypes. r=gerald
MozReview-Commit-ID: FozWtbvDNnA

--HG--
extra : rebase_source : b256424224a10af4957fe4b8ed73347e3608f198
2016-12-02 12:23:23 +11:00
Jean-Yves Avenard d2e820d39d Bug 1319543: Prevent overflow if sample's time is negative. r=gerald
MozReview-Commit-ID: I94vvJccOqE

--HG--
extra : rebase_source : a19e7cf192a2dabb22499bcb501ae08efdf74b9f
2016-11-23 11:21:42 +11:00
Jean-Yves Avenard 2010639f50 Bug 1304252: P3. Further error details for agnostic decoders. r=gerald
MozReview-Commit-ID: 1tb4f9xQKyr

--HG--
extra : rebase_source : 37bd772240de01d9fcb2fac765f58b27e6f86c9c
2016-09-21 13:25:00 +10:00
Jean-Yves Avenard 70ed5282de Bug 1299072: P18. Use MediaResult with InitPromise. r=gerald
MozReview-Commit-ID: JiLgiyxvfNC

--HG--
extra : rebase_source : 4cc453a5fe7b1e4f4b865c31a24a5feed64df7e4
2016-09-13 13:06:18 +10:00
Jean-Yves Avenard 829f0d44fc 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

--HG--
extra : rebase_source : 77ada9bb95ba4d44d1bca209e4a7d28369f24f6e
2016-09-13 11:15:36 +10:00
Jean-Yves Avenard f4efa8be06 Bug 1299072: P4. Return extended failure details to reader. r=gerald
We provide even further details for the GMP decoder. Other decoders to follow.

MozReview-Commit-ID: 7NxJPec8xWv

--HG--
extra : rebase_source : f44120983070e5c107ecd5cafc762da90aab44bf
2016-09-10 09:56:53 +10:00
Matt Woodrow 99bf9b18df Bug 1301294 - Remove unnecessary nsresult return value from MediaDataDecoder interface. r=jya 2016-09-09 15:50:37 +12:00
Jean-Yves Avenard b2f24696fa Bug 1297265: P9. Rework Vorbis Decoder use of InputExhausted. r=kamidphish
MozReview-Commit-ID: 58KKxY1YcpK

--HG--
extra : rebase_source : e4ebf699c7eba1c68b874d02ccde2fb8bb3c4439
2016-09-01 19:41:53 +10:00
Phil Ringnalda 9f470c98e5 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 b31a3e29a2 Bug 1297265: P9. Rework Vorbis Decoder use of InputExhausted. r=kamidphish
MozReview-Commit-ID: 58KKxY1YcpK

--HG--
extra : rebase_source : 7258069eb8ebf80b10453e9eba8d8e220647b9ec
2016-08-30 15:22:14 +10:00
Jean-Yves Avenard 5d0a764769 Bug 1288329: [ogg/vorbis] P2. Pass extra information to the decoder so that it can perform proper trimmer. r=gerald,jwwang
The OggReader always passed a complete ogg_packet to the vorbis decoder, ensuring that the right number of frames was be returned. In the conversion to the new architecture, this information got lost making the vorbis decoder always return more frames than normal on the last packet.

MozReview-Commit-ID: HYHxqXfYntJ

--HG--
extra : rebase_source : 3d2a59b011ec1e996ab7aaf29e16baa495f7d31c
2016-07-29 02:19:21 +10:00
Wes Kocher 8f0a108b9a Backed out 6 changesets (bug 1288329) for wpt failures a=backout
Backed out changeset f33cb032cc9f (bug 1288329)
Backed out changeset 49ea83d00a77 (bug 1288329)
Backed out changeset 1406c14098f1 (bug 1288329)
Backed out changeset 936b73eb37c6 (bug 1288329)
Backed out changeset a1c4d9b9de32 (bug 1288329)
Backed out changeset a76b6e559777 (bug 1288329)

--HG--
extra : amend_source : 4e054fc4af62693934a4ae450a9595443b6a961d
2016-07-29 12:36:20 -07:00
Jean-Yves Avenard eba49ebd1c Bug 1288329: [ogg/vorbis] P2. Pass extra information to the decoder so that it can perform proper trimmer. r=gerald,jwwang
The OggReader always passed a complete ogg_packet to the vorbis decoder, ensuring that the right number of frames was be returned. In the conversion to the new architecture, this information got lost making the vorbis decoder always return more frames than normal on the last packet.

MozReview-Commit-ID: HYHxqXfYntJ

--HG--
extra : rebase_source : 3aa215576fe77357dd9a484626c0e5759aeedb3c
2016-07-29 02:19:21 +10:00
Jean-Yves Avenard 17bf74890d Bug 1168674: [vorbis] P6. Do not tweak first decoded sample time. r=cpearce
r?cpearce

A hack was in place to ensure that the first returned sample would have
a time of 0 so that the media start time would be 0. This was incorrect
for two primary reasons:
- The media start time is adjusted according to the first sample anyway.
- When seeking to 0, the first sample would have a time different to the
first sample decoded (when we want them to have the same time).

MozReview-Commit-ID: IyuT9O2F4EZ

--HG--
extra : rebase_source : 74b29eb5970c67aed6ca568d1882e3b6c54a6637
2016-07-25 19:14:39 +10:00
Dan Glastonbury 1b2a65cfc3 Bug 1281632 - P1: Extract creation parameters and pass via struct. r=gerald
Extract all the parameters passed to CreateAudioDecoder/CreateVideoDecoder and
place them into a structure that is passed down to the creation of the actual
decoder, where the relevant parameters can be extracted.

This makes it easier to add more arguments to the Create*Decoder calls in future.

MozReview-Commit-ID: 9LZlcfRVz6A

--HG--
extra : rebase_source : ce3f0c7d0784b96267728697ff5d535ccb8ee7a6
2016-06-28 17:56:55 +12: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
Alfredo Yang 68adb6b579 Bug 1068151 - keep decoding a corrupted video. r=jya 2016-05-30 18:24:00 +02:00
Eric Rahm c077aa9010 Bug 1274913 - Move PDM log definition to header. r=njn 2016-05-24 14:55:53 -07:00
JW Wang 63189ff520 Bug 1273405. Part 4 - add assertions. r=jya.
MozReview-Commit-ID: 6tbA0aj5Rto

--HG--
extra : rebase_source : 6bfbe6b8fc79b38f47dd26575e5886be3946a029
2016-05-17 17:32:55 +08:00
JW Wang 4478669f13 Bug 1273405. Part 3 - remove use of FlushableTaskQueue. r=jya.
MozReview-Commit-ID: Do9REbjltEW

--HG--
extra : rebase_source : 5f3f85c59dff9de7109fa79980230300ffd8ae4b
2016-05-17 17:30:53 +08:00
JW Wang 4b0769d9df Bug 1273405. Part 2 - remove use of FlushableTaskQueue::Flush(). r=jya.
MozReview-Commit-ID: bchmGXw1fw

--HG--
extra : rebase_source : 80c1bd7e8a524035946a99b5c53bcd046326b52b
2016-05-17 17:22:45 +08:00
JW Wang c42b38bee7 Bug 1273405. Part 1 - rename some functions to be consistent with other MediaDataDecoder sub-classes. r=jya.
MozReview-Commit-ID: 1CpEZktGNia

--HG--
extra : rebase_source : f4810f323ad9e78f856d7834e9c3b8f4b8d9af3c
2016-05-17 16:05:30 +08:00
Kyle Huey 941ab1f522 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 ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e 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 0c5b54bf23 Bug 1267637: [vorbis] P4. Reject audio data with unsupported audio configuration. r=gerald
MozReview-Commit-ID: LS41MX5LwW5

--HG--
extra : rebase_source : 230307e125862a914aed93ce0ab0f8b130a28ba4
2016-04-27 17:43:49 +10:00
Jean-Yves Avenard ab5d1e11d2 Bug 1262753: P4. Add resampling capabilities to AudioConverter. r=kinetik
MozReview-Commit-ID: 93PNC5ooEPg

--HG--
extra : rebase_source : 85aff569f014833d23f23ce488bd61dee8749109
2016-04-11 21:07:11 +10:00
Jean-Yves Avenard 0a33a8a5b9 Bug 1248861: P7. Ensure vorbis decoder channel layout is always in SMPTE order. r=rillian
MozReview-Commit-ID: GAqnJbQuqQU

--HG--
extra : rebase_source : b1eb0ac7b6ec453a8e87ef584df61049482c0fdb
2016-04-05 23:14:34 +10:00
Jean-Yves Avenard 6409e5ed1a Bug 1248861: P3. Use AlignedAudioBuffer object with AudioData. r=cpearce
MozReview-Commit-ID: 7HiF4eHlRwB

--HG--
extra : rebase_source : e7fd44ced280ccc359f61b7e5668e5481bb7ecb9
2016-04-03 23:09:45 +10: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 b8299c5f79 Revert "Bug 1240201: [vorbis] P1. Properly determine sample duration and time in webm demuxer. r=kinetik"
This reverts commit c0a4a296
2016-01-23 12:42:02 +11:00
Jean-Yves Avenard 9b20eae811 Bug 1240201: [vorbis] P1. Properly determine sample duration and time in webm demuxer. r=kinetik 2016-01-23 02:50:06 +11:00
Wes Kocher 56d625df80 Backed out 2 changesets (bug 1240201) for Windows wpt bustage
Backed out changeset b06a049cafb7 (bug 1240201)
Backed out changeset 69b695ad6d43 (bug 1240201)

--HG--
extra : commitid : KSF0gTfQB2
2016-01-21 12:28:24 -08:00
Jean-Yves Avenard b20992e3b8 Bug 1240201: [vorbis] P1. Properly determine sample duration and time in webm demuxer. r=kinetik 2016-01-22 00:40:56 +11:00
Jean-Yves Avenard 3f310a591f Bug 1239223: [vorbis] P1. Properly calculate decoded audio sample timestamps. r=kinetik 2016-01-16 10:54:44 +11:00
Chris Pearce cea22429d5 Bug 1226450 - Report audio/video codecs used in HTMLMediaElement and WebAudio via telemetry. r=jya 2015-11-25 12:52:48 +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
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
Jean-Yves Avenard 5d87284234 Bug 1204776: P4. Have VPX/Opus/Vorbis decoder use PlatformDecoderModule log. r=cpearce 2015-09-16 12:26:04 +10:00
Timothy B. Terriberry e81c9798f0 Bug 1196353 - Use standard Xiph extradata format to pass headers from demuxers to decoders. r=jya 2015-08-21 10:17:00 -04:00
Alfredo Yang 8c59fda383 Bug 1146086: use promise to Init() in PlatformDecoderModule. r=jya,r=cpearce 2015-08-11 14:09:12 +10:00
Jean-Yves Avenard 8c8e3b2a70 Bug 1190258: P1. Use getter to access MediaRawData mData and mSize member. r=cpearce 2015-08-06 18:48:44 +10:00
Jan Gerber 02ddfcec8c Bug 1148102: P5. Add Opus/VPX/Vorbis MediaDataDecoder. r=jya 2015-07-20 17:27:07 +10:00