Commit Graph
61 Commits
Author SHA1 Message Date
JW Wang 5f4ffc9dd2 Bug 1362910. P2 - fix callers. r=gerald
Since RefPtr<T>&& can't be converted to T* implicitly, we need to change
T* to RefPtr<T> in resolve/reject callbacks to make it compile again.

We should review the changes later to look for the opportunity to
optimize away unnecessary AddRef/Release pairs.

MozReview-Commit-ID: 22rHQ8dhxJv
2017-05-11 08:30:39 +08: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
JW Wang 3d95d557fb Bug 1356502. P1 - let MediaDatra::GetEndTime() return a TimeUnit instead of ambiguous int64_t. r=gerald
MozReview-Commit-ID: DBQELBs32Ad
2017-04-14 14:14:08 +08:00
JW Wang a71811e3c2 Bug 1355756. P3 - let CreateAndCopyData() and its friends take TimeUnit for duration. r=gerald
MozReview-Commit-ID: ES0on9VCuu3
2017-04-12 17:46:09 +08:00
JW Wang 94e922f400 Bug 1355756. P2 - let VideoData::UpdateDuration() take TimeUnit. r=gerald
MozReview-Commit-ID: BSydHhJwgup
2017-04-12 17:34:06 +08:00
JW Wang 1eab92594a Bug 1351574. P2 - let MediaDecoderReader::DecodeVideoFrame() take TimeUnit instead of int64_t. r=jya
MozReview-Commit-ID: 84z2yir8sfX
2017-03-30 18:07:53 +08:00
L. David Baron afeb8ca3c6 Bug 1348894 - Use CheckedInt more. r=jgilbert
MozReview-Commit-ID: G5edsCAvRix
2017-03-29 22:52:12 -04:00
John Lin 1a0d225d98 Bug 1344649 - part 2: let VideoData::CreateFromImage() accept only neccessary parameters. r=jya
VideoData doesn't care what's in aInfo but display size and aPicture are unused.

MozReview-Commit-ID: IBqq8Rm8dM4
2017-03-09 12:06:24 +08:00
Gerald Squelart 34b7caba8a Bug 1331770 - Rename 'MediaContentType' to 'MediaContainerType' - r=jya
MozReview-Commit-ID: F0BWai8vPyo
2017-01-18 11:59:03 +11:00
Gerald Squelart a90178599e Bug 1330284 - Use MediaContentType in AndroidMediaPluginHost::CreateDecoder, AndroidMediaDecoder, AndroidMediaReader - r=jya
MozReview-Commit-ID: JvdBe8I9A2K
2016-12-28 15:07:45 +11:00
JW Wang 0934ddbc2b Bug 1328130. Part 2 - remove MozPromiseRequestHolder::Begin(). r=gerald
MozReview-Commit-ID: JL27n0Era6E
2017-01-11 16:33:29 +08:00
Jean-Yves Avenard dede4979be Bug 1319992: P3. Remove no longer used seeking argument. r=jwwang
MozReview-Commit-ID: 9Oc0SHX0Rw2
2016-11-30 01:42:50 +11:00
Sebastian Hengst 698bc61483 Backed out changeset 3cfdc09bf851 (bug 1319992) 2016-12-19 12:38:32 +01:00
Jean-Yves Avenard c5a13b98e4 Bug 1319992: P3. Remove no longer used seeking argument. r=jwwang
MozReview-Commit-ID: 9Oc0SHX0Rw2
2016-11-30 01:42:50 +11:00
Carsten "Tomcat" Book dd03cfab2c Backed out changeset ab31c60d46d7 (bug 1319992) 2016-12-16 12:41:08 +01:00
Jean-Yves Avenard d03eeea2e9 Bug 1319992: P3. Remove no longer used seeking argument. r=jwwang
MozReview-Commit-ID: 9Oc0SHX0Rw2
2016-11-30 01:42:50 +11:00
John Lin a4a47cd4ac Bug 1323631 - update original frame timestamp or duration rather than creating shallow copy. r=jwwang
MozReview-Commit-ID: 4oSheJwFNOE
2016-12-15 17:57:21 +08:00
Gerald Squelart 3ebbf193aa Bug 1313497 - Use InvokeAsync with Storages in MediaDecoderReaderWrapper - r=jya
Thanks to this, MediaDecoderReader::Seek and overrides can take SeekTarget by
const&.

MozReview-Commit-ID: C5D26jKrW3p
2016-11-13 17:42:19 +11:00
Matt Woodrow 873d6b711f Bug 1292032 - Clean up VideoData static constructor methods. r=jya 2016-08-04 15:31:52 +12:00
ctai 56fe08b4fc Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR
2016-05-27 14:33:48 +08:00
Sebastian Hengst 3704bef2fd Backed out changeset 3851902daa94 (bug 1201363) 2016-08-03 19:33:25 +02:00
ctai 9104d064ff Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR
2016-05-27 14:33:48 +08:00
Carsten "Tomcat" Book ea106e7924 Backed out changeset b018ce9d1484 (bug 1201363) 2016-08-02 12:53:59 +02:00
ctai f94bf5cd50 Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR
2016-05-27 14:33:48 +08:00
Gerald Squelart d9701bc58b 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
2016-07-18 10:41:40 +10:00
Dan Glastonbury 6e3c41a70f Bug 1276570: Replace TargetQueues enum with bitwise-or flags. r=jwwang
MozReview-Commit-ID: 95rnjumeBf
2016-05-31 14:32:37 +10:00
Dan Glastonbury 68f152ce7e Bug 1224973 - Part 5: Implement suspend decoding for background video. r=cpearce,jwwang,jya
Implemented by short-circuiting calls to RequestVideoData in MDSM so no
frames are decoded. Resuming playback when video moves to foreground by
using the SeekTask/SeekJob/Seek in MDSM with result of GetMediaTime().

Special consideration is made to only seek the video part of Seek() to
remove an audible glitch in the audio playback when the video becomes
visible again.

MozReview-Commit-ID: 7YFDTanslXu
2016-05-12 09:54:15 +10:00
Sotaro Ikeda 97cfe9b1a4 Bug 1262278 - Rename PlanarYCbCrImage::SetData and PlanarYCbCrImage::SetDataNoCopy r=nical 2016-04-18 20:12:41 -07:00
Jean-Yves Avenard e70f02fb04 Bug 1243608: P4. Have MediaDecoderReader::SeekPromise return a TimeUnit. r=cpearce 2016-02-02 18:57:13 +11:00
Jean-Yves Avenard c9318d6fbf Bug 1243608: P3. Make SeekTarget::mTime a TimeUnit object. r=cpearce
Also makes it a private member and provide a GetTime() accessor instead.
2016-02-02 18:57:12 +11:00
Jean-Yves Avenard 9ef9b53e3b Bug 1243608: P2. Pass the full SeekTarget object to MediaDecoderReader::Seek. r=cpearce
This will allow the reader to know if we are performing a fast seek.
2016-02-02 18:57:12 +11:00
Nicholas Nethercote f16ab43ac3 Bug 1209812 (part 6) - Convert all gfxImageFormat values to SurfaceFormat equivalents. r=jrmuizel.
This patch:

- Makes the following substitutions (plus necessary namespace qualifiers:

    gfxImageFormat::ARGB32      --> SurfaceFormat::A8R8G8B8_UINT32
    gfxImageFormat::RGB24       --> SurfaceFormat::X8R8G8B8_UINT32
    gfxImageFormat::A8          --> SurfaceFormat::A8
    gfxImageFormat::RGB16_565   --> SurfaceFormat::R5G6B5_UINT16
    gfxImageFormat::Unknown     --> SurfaceFormat::UNKNOWN

- Changes gfxImageFormat to be a typedef to gfx::SurfaceFormat. This will be
  removed soon.

- Removes gfxCairoFormatToImageFormat() and gfxImageFormatToCairoFormat() and
  replace calls to them with CairoFormatToGfxFormat() and
  GfxFormatToCairoFormat().

- Removes ParamTraits<gfxImageFormat>.

- Add namespace qualifiers to SurfaceFormat instances where necessary.
2016-01-07 20:57:38 -08:00
David Anderson 5f92d035c0 Decouple SharedRGBImage and PlanarYCbCrImage from ImageContainer. (bug 1222910, r=mattwoodrow) 2015-11-17 00:09:01 -08:00
JW Wang 97a83e3d05 Bug 1216850. Part 1 - backout bug 1215003. r=me. 2015-10-21 10:59:56 +08:00
JW Wang c2d418c004 Bug 1215003. Part 1 - Move MediaDecoderReader::ReadMetadata and overrides to private sections. r=gerald. 2015-10-19 10:51:48 +08: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
JW Wang 17c6b91845 Bug 1212723. Part 2 - remove unused argument aCloneDonor from MediaDecoderReader::Init(). r=jya. 2015-10-13 15:28:57 +08:00
Nicholas Nethercote 0929981996 Bug 1207741 - Remove gfxIntSize. r=nical.
gfxIntSize is just a typedef of gfx::IntSize, so this is very mechanical. The
only tricky part is deciding for each occurrence whether to replace it with
IntSize, gfx::IntSize or mozilla::gfx::IntSize; in all cases I went with the
shortest one that worked given the existing "using namespace" declarations.
2015-09-23 11:49:05 -07:00
James Cheng 8a00cdead2 Bug 1203047 - Make MediaDecoderReader know less about AudioData/VideoData by using MediaData instead. r=jya 2015-09-10 03:06:00 +02:00
Bobby Holley 5d7e8e8407 Bug 1184634 - Rename "TaskQueue()" accessor to "OwnerThread()". r=gerald
Otherwise this name will collide with the rename of MediaTaskQueue to TaskQueue.
It's also a better naming convention, because it generalizes to things that are
owned by an AbstractThread that is not a Task Queue.

We rename to Queue() in TestMozPromise, because that's more accurate.
2015-07-16 22:22:07 -07:00
Robert O'Callahan 98d28ca128 Bug 1143575. Introduce VideoFrameContainer::ClearCurrentFrame(size), and don't increment mFrameID when clearing frames. r=cpearce 2015-03-30 17:51:32 +13:00
Bobby Holley 176c6e48a2 Bug 1178938 - Make MediaDecoderReader::DecodeToFirstVideoData async. r=jww 2015-07-02 12:38:44 -07:00
Bobby Holley 0d7715a540 Bug 1160695 - Track "metadata duration" separately and mirror it to MediaDecoderReader. r=jww 2015-06-08 09:21:22 -07:00
Jean-Yves Avenard 2cad03379f Bug 1163445: Part5. Replace dom::TimeRanges with TimeIntervals object. r=mattwoodrow 2015-05-18 16:15:47 +10:00
Nicolas Silva ea494e1155 Bug 1155621 - Remove no-op gfx2DGlue conversion helpers. r=Bas 2015-04-21 17:22:30 +02:00
Jean-Yves Avenard fa102c035f Bug 1153049: Part4. Remove redundant mHasAudio/mHasVideo member. r=cpearce 2015-04-14 15:17:51 +10:00
Bobby Holley be51626bf6 Bug 1144519 - Switch MediaDecoderReader subclasses to use OnTaskQueue(). r=jya 2015-03-27 11:50:20 -07:00
Matt Woodrow 288802e075 Bug 1138967 - Part 1: Remove ISharedImage. r=nical 2015-03-19 10:15:38 +13:00
Anthony Jones bf665307e1 Bug 1138253 - Count dropped frames directly; r=cpearce 2015-03-03 17:46:48 +13:00