Commit Graph

58 Commits

Author SHA1 Message Date
David Anderson
27bfc27d62 Decouple SharedRGBImage and PlanarYCbCrImage from ImageContainer. (bug 1222910, r=mattwoodrow) 2015-11-17 00:09:01 -08: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
Jean-Yves Avenard
bd9b321d2d Bug 1219134: P4. Properly assign the decoded sample duration. r=edwin
We default to the previous logic if for some unlikely condition we couldn't find the frame's duration (using the last input frame's duration)
2015-11-02 12:18:42 +11:00
Jean-Yves Avenard
c21fe67619 Bug 1219134: P3. Properly set the keyframe flag. r=edwin
We were incorrectly setting the keyframe flag of the last input sample rather than of the decoded one.
2015-11-02 12:18:41 +11:00
Jean-Yves Avenard
3787f2d9e5 Bug 1219134: P2. Use LibAV/FFmpeg logic to detect invalid pts. r=edwin
The logic was extracted from LibAV cmdutils.c. FFmpeg provides an API for that (av_frame_get_best_effort_timestamp()) unfortunately this isn't provided by LibAV.
So copy the logic instead in order to keep compatibility with the two forks.
2015-11-02 12:18:40 +11:00
Jean-Yves Avenard
fe233d60f5 Bug 1219134: P1. Fix pts calculation in FFmpeg video decoder. r=edwin
This is the primary reason why we got no pts returned (pts were set to 0) when using early version of LibAV. Apparently you are expected to set the pts when allocating the buffer of a frame.
This is undocumented, but both LibAV and FFmpeg do so internally. So do the same.
2015-11-02 12:18:40 +11:00
Carsten "Tomcat" Book
657fae2cc0 Backed out changeset 571ec9b53caa (bug 1219134) on request from jya for problems with the FFmpeg 2015-10-30 13:51:03 +01:00
Carsten "Tomcat" Book
42a2e03f42 Backed out changeset 4953d5ffbacf (bug 1219134) 2015-10-30 13:50:30 +01:00
Carsten "Tomcat" Book
657bc370a2 Backed out changeset 68799b5ac681 (bug 1219134) 2015-10-30 13:50:29 +01:00
Carsten "Tomcat" Book
0b6f8e837a Backed out changeset 6b57ad2001ff (bug 1219134) 2015-10-30 13:50:27 +01:00
Jean-Yves Avenard
ec0cfbcf70 Bug 1219134: P4. Properly assign the decoded sample duration. r=edwin
We default to the previous logic if for some unlikely condition we couldn't find the frame's duration (using the last input frame's duration)
2015-10-30 19:11:53 +11:00
Jean-Yves Avenard
f9f672be30 Bug 1219134: P3. Properly set the keyframe flag. r=edwin
We were incorrectly setting the keyframe flag of the last input sample rather than of the decoded one.
2015-10-30 19:11:53 +11:00
Jean-Yves Avenard
12142482c6 Bug 1219134: P2. Use LibAV/FFmpeg logic to detect invalid pts. r=edwin
The logic was extracted from LibAV cmdutils.c. FFmpeg provides an API for that (av_frame_get_best_effort_timestamp()) unfortunately this isn't provided by LibAV.
So copy the logic instead in order to keep compatibility with the two forks.
2015-10-30 19:11:52 +11:00
Jean-Yves Avenard
b9466da3da Bug 1219134: P1. Fix pts calculation in FFmpeg video decoder. r=edwin
This is the primary reason why we got no pts returned (pts were set to 0) when using early version of LibAV. Apparently you are expected to set the pts when allocating the buffer of a frame.
This is undocumented, but both LibAV and FFmpeg do so internally. So do the same.
2015-10-30 19:11:52 +11: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
7d704a120e Bug 1213173: Always use FFmpeg regardless of version. r=kentuckyfriedtakahe
We don't need to prevent using FFmpegDecoderModule on older version anymore
2015-10-12 10:00:04 +11:00
Jean-Yves Avenard
9a7c13fa78 Bug 1206977: P15. Fix FFmpeg shutdown crash should decoder not be initialised. r=me 2015-10-08 00:34:49 +11:00
Jean-Yves Avenard
dd5e99c694 Bug 1206977: P2. Wrap PDM creation in a new PDMFactory class. r=cpearce
There is no change of behaviour from the original PlatformDecoderModule.
2015-10-08 00:34:42 +11:00
Jean-Yves Avenard
9861c50a98 Bug 1211335: Have FFMpegDecoderModule properly return if a codec is supported. r=cpearce 2015-10-08 00:34:41 +11:00
Nigel Babu
1a01355c4f Backed out 16 changesets (bug 1206977, bug 1211652, bug 1211335) for linux bc7 bustage ON A CLOSED TREE
Backed out changeset 51b1b076a386 (bug 1206977)
Backed out changeset dec7c35469d1 (bug 1206977)
Backed out changeset bf9ddc78b394 (bug 1206977)
Backed out changeset 08f5cff5aa12 (bug 1206977)
Backed out changeset e4e91de99867 (bug 1206977)
Backed out changeset 696ecf2e2947 (bug 1206977)
Backed out changeset ab2d524a9b35 (bug 1206977)
Backed out changeset d66be0e4547f (bug 1206977)
Backed out changeset 64c58afbd6c1 (bug 1206977)
Backed out changeset eb10d09015e1 (bug 1206977)
Backed out changeset 042959216393 (bug 1206977)
Backed out changeset 7e0de7f62202 (bug 1206977)
Backed out changeset 3d095569f6ba (bug 1206977)
Backed out changeset 041418a07ae5 (bug 1206977)
Backed out changeset 654970da23e4 (bug 1211335)
Backed out changeset 8ba8e24a84d3 (bug 1211652)
2015-10-07 13:43:39 +05:30
Jean-Yves Avenard
0256993164 Bug 1206977: P2. Wrap PDM creation in a new PDMFactory class. r=cpearce
There is no change of behaviour from the original PlatformDecoderModule.
2015-10-07 16:40:24 +11:00
Jean-Yves Avenard
89639edfde Bug 1211335: Have FFMpegDecoderModule properly return if a codec is supported. r=cpearce 2015-10-07 16:40:22 +11:00
Jean-Yves Avenard
bf482d2ca8 Bug 1207442: Disable ffvpx with libav0.8 and earlier. r=edwin 2015-10-01 19:40:20 +10:00
Jean-Yves Avenard
e00a89455b Bug 1209806: Remove dependency on libavformat. r=edwin 2015-10-01 19:05:47 +10:00
Jean-Yves Avenard
57037c7820 Bug 1208917: Fix VP9 decoding with recent version of libav. r=kentuckyfriedtakahe
Recent libav do not require a codec parser to decode VP9.
2015-09-28 10:30:03 +10:00
Jean-Yves Avenard
3f3757ce78 Bug 1207429: P2. Enable FFmpeg by default if available. r=kentuckyfriedtakahe
By default we only use libav 9 or FFmpeg 1.2 if found on the system.

If media.fragmented-mp4.ffmpeg.enabled is set, will allow use of libav 0.7 and ffmpeg 0.8 or later.
2015-09-27 15:19:28 +10:00
Jean-Yves Avenard
5d1d418de1 Bug 1206979: P3. Request S16 audio for libav 0.8 and earlier. r=edwin 2015-09-23 12:59:28 +10:00
Jean-Yves Avenard
4dd514a9b5 Bug 1206979: P2. Get around libav 0.8.5 bug. r=edwin
And probably others. When multhreading decoding is enabled ; the frames dimensions were incorrectly set.
2015-09-23 12:59:27 +10:00
Jean-Yves Avenard
71d911ed61 Bug 1206979: P1. Add method to determine which version of libavcodec is available. r=edwin 2015-09-23 12:59:27 +10:00
Jean-Yves Avenard
9a88d127d2 Bug 1206568: P2. Clean up header declarations. r=cpearce
Make it consistent across the use of virtual/override
2015-09-23 12:59:26 +10:00
Jean-Yves Avenard
8283012c2a 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
Jean-Yves Avenard
86e37be133 Bug 1204776: P3. Have FFmpeg PDM use PlatformDecoderModule log. r=cpearce 2015-09-16 12:26:04 +10:00
Jean-Yves Avenard
6f800ab99a Bug 1197319: P3. Allow VP8/VP9 decoding via FFmpeg. r=kentuckyfriedtakahe 2015-09-10 22:05:39 +10:00
Jean-Yves Avenard
13a129c06b Bug 1197319: P2. Parse raw data to identify single frames before decoding. r=kentuckyfriedtakahe
A VP9 or VP9 packet may contains alternate frames. They need to be fed separately to the ffmpeg decoder.
2015-09-10 22:05:39 +10:00
Jean-Yves Avenard
bcf327201c Bug 1197319: P1. Fix image alignment allocation. r=kentuckyfriedtakahe 2015-09-10 22:05:38 +10:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Jan Gerber
047564197e Bug 1197777 - Use libavformat-ffmpeg.so.56 if available. r=k17e
--HG--
extra : rebase_source : 54ef1b5058acc3a9b38dc5538f9a1c2592226300
2015-08-24 14:08:09 +02: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
Alfredo Yang
8393a2233e Bug 1163486 - Remove MP4Reader. r=jya 2015-07-21 02:48:00 +02:00
Carsten "Tomcat" Book
de3872af29 Backed out changeset 1704ea727e81 (bug 1163486) for at least b2g bustage 2015-07-21 08:42:54 +02:00
Alfredo Yang
23c919b20e Bug 1163486 - Remove MP4Reader. r=jya 2015-07-20 19:25:00 +02:00
Bobby Holley
04eaf4c167 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
997543e6ba Bug 1184634 - Rename MediaTaskQueue to TaskQueue. r=gerald 2015-07-16 22:23:06 -07:00
Jean-Yves Avenard
c7b6fa505d Bug 1179094: Use TimeUnit in PlatformDecoderModule. r=cpearce 2015-07-08 10:56:16 +10:00
Eric Rahm
75c4bebb79 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Carsten "Tomcat" Book
5471309381 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)

--HG--
extra : rebase_source : 6fb850d063cbabe738f97f0380302153e3eae97a
2015-06-02 13:05:56 +02:00