Commit Graph

609 Commits

Author SHA1 Message Date
Jean-Yves Avenard
e06e134811 Bug 1220033: Don't use fuzz arithmetic for calculating internal buffered ranges r=gerald 2015-11-04 16:52:24 +13:00
Jean-Yves Avenard
4b58755cd6 Bug 1213177: Enable WebM on machines where H264 HW decoding is disabled. r=kentuckyfriedtakahe 2015-10-29 10:18:59 +11:00
Jean-Yves Avenard
9a14016c92 Bug 1188887: P2. Add mochitest testing new seek behavior. r=jwwang 2015-10-28 10:45:59 +11:00
Jean-Yves Avenard
75880b3792 Bug 1217170: [MSE] P2. Enable WebM/MSE on systems with no MP4/H264 support. r=kentuckyfriedtakahe 2015-10-27 23:57:35 +11:00
Jean-Yves Avenard
ea7721dc38 Bug 1217170: P1. Rename functions to explicitly reflect what they are doing. r=kentuckyfriedtakahe 2015-10-27 23:57:13 +11:00
Jean-Yves Avenard
e6e8475153 Bug 1215370: Maintain coded group continuity in sequence append mode when resetting parser state. r=gerald
W3C issue 29133.
2015-10-27 23:54:47 +11:00
JW Wang
d5fd5e23b7 Bug 1218280. Part 1 - create MediaResourceCallback for MediaResource to send notifications. r=roc. 2015-10-27 10:28:26 +08:00
Guang-De Lin
c464dd5e69 Bug 1150305 - sourcebuffer.buffered returns the same object if not changed. r=roc, r=bz, r=jya 2015-10-19 14:10:47 +08:00
Nathan Froyd
e4e2da55c9 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
Nathan Froyd
5254890206 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Jean-Yves Avenard
7c80fad3c7 Bug 1213176: P1. Remove most MediaFormatReader dependencies on its MediaDecoder parent. r=jwwang
The LayersBackend can be defined at construction time, however if a parent MediaDecoder exists, the value will be overwritten by the MediaDecoderOwner value.
2015-10-15 02:04:00 +02:00
JW Wang
59f934132b Bug 1214989. Part 3 - remove MediaDecoder::Init() and its callers. r=gerald. 2015-10-15 11:39:45 +08:00
JW Wang
c8950ac644 Bug 1214989. Part 2 - add MediaDecoderOwner to Clone() and overrides. r=gerald. 2015-10-15 11:37:47 +08:00
Eric Rahm
adf388bff5 Bug 1190592 - Part 2: Add test for mediasource memory reporter. r=jya 2015-10-14 20:48:58 -07:00
Eric Rahm
b5d3058e86 Bug 1190592 - Part 1: Add mediasource memory reporter. r=jya
This adds asyncrounous reporting of MSE resources.
2015-08-20 18:10:33 -04:00
JW Wang
964a5dedb2 Bug 1214065 - Remove unused arguments from MediaDecoder::Load() and its friends. r=kinetik. 2015-10-14 11:46:27 +08:00
Eric Rahm
db99683dd4 Bug 1212681 - Enable MSE mochitests on e10s. r=jya 2015-10-08 13:38:02 -07:00
Jean-Yves Avenard
7d0beeed77 Bug 1212176: Remove arguments passed to MediaDataDemuxer::NotifyDataArrived API. r=cpearce
Be more explicit on what it does and how it should be used.
2015-10-08 20:47:21 +11:00
Jean-Yves Avenard
5403c9b61d Bug 1211652: Add sourcebuffer.mode = sequence mochitest. r=gerald 2015-10-08 00:34:40 +11:00
Nigel Babu
52bc70c35b 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
67af43c143 Bug 1211652: Add sourcebuffer.mode = sequence mochitest. r=gerald 2015-10-07 16:40:22 +11:00
Jean-Yves Avenard
e582bc111e Bug 1211328: [MSE] Fix timestampOffset attribute calculation in sequence mode. r=gerald 2015-10-05 15:45:56 +11:00
JW Wang
48b3faa969 Bug 1209890 - add main thread assertions and remove usage of decoder monitor from MediaSourceDecoder. r=jya. 2015-09-30 06:55:21 +08:00
Jean-Yves Avenard
be1620d5bf Bug 1159171: [MSE] P4. Changing waiting time value. r=edwin.
When ffmpeg is enabled, it will use the FFmpeg's VPX decoder. FFmpeg appears to always buffer 15 frames before returning one (this is the same with h264) causing the waiting event to be fired much earlier than when using libvpx
2015-10-01 19:40:21 +10:00
JW Wang
7542e6ca42 Bug 1208922. Part 4 - remove AbstractMediaDecoder::GetCDMProxy() and devirtualize MediaDecoder::SetCDMProxy(). r=cpearce. 2015-09-27 18:59:08 +08:00
Jean-Yves Avenard
b6517a8dec Bug 1207946: [MSE] P3. Reset cached demuxing index when new data overwrite the end. r=gerald
This will force an iterative search upon the next demux request.
2015-09-29 12:31:33 +10:00
Jean-Yves Avenard
383d9edca8 Bug 1207946: [MSE] P2. Fix seek when target isn't found exactly in a buffered range. r=gerald 2015-09-29 12:31:32 +10:00
Jean-Yves Avenard
8a83138942 Bug 1207946: [MSE] P1. Ensure we stop on the closest keyframe when seeking. r=gerald
Should the first frame in the trackbuffer have a time superior to the seek target, mNextSampleTime would be incorrectly set to 0.
2015-09-29 12:31:32 +10:00
Jean-Yves Avenard
3a47518da0 Bug 1205470: [MSE] Remove assertion. r=cpearce
Can also remove mInitDone member as that information is redundant with the init promise being present
2015-09-22 08:21:04 +10:00
Jean-Yves Avenard
5aa3109cd9 Bug 1204757: [MSE] P2. Remove use of MediaDecoder::NotifyWaitingForResourcesStatusChanged(). r=cpearce 2015-09-16 18:14:18 +10:00
Jean-Yves Avenard
193c1dbdb7 Bug 1204757: P1. Update MediaDataDemuxer::Init() behavior. r=cpearce
A MediaDataDemuxer is now not to resolve the init promise until it has all the metadata.
Except MediaSource, all demuxers would be doing blocking read to scan for the metadata, and having partial metadata would be an error.
For MediaSource, we pass the NotifyDataArrived message which will cause the MediaSourceDemuxer to re-attempt to search for the metadata.

When used within MediaSource's TrackBuffersManager, a demuxer will never be created until we have received a complete init segment (this task is performed by the various ContainerParsers)
2015-09-16 18:14:17 +10:00
Jean-Yves Avenard
a170acd84e Bug 1204407: P2. Remove no longer required MediaDataDemuxer APIs. r=cpearce 2015-09-16 18:14:15 +10:00
Jean-Yves Avenard
89aaeddd55 Bug 1204419: P4. Remove MediaDataDemuxer API no longer used. r=cpearce 2015-09-16 18:14:12 +10:00
Jean-Yves Avenard
4829be5e5d Bug 1204419: P2. Remove old MediaSource implementation. r=cpearce 2015-09-16 18:14:11 +10:00
Jean-Yves Avenard
2ceb2367d8 Bug 1188238: [MSE] P2. Don't assert when unable to find position in frames array. r=gerald
Instead return an error which will terminate the video element.
2015-09-12 20:53:23 +10:00
Jean-Yves Avenard
71c8c243cd Bug 1188238: [MSE] P1. Don't use Interval::Intersect to find the first frame of an interval. r=gerald
With H264, often the first frame of a media segment has no duration ; as such the time interval it represents is empty and will never intersect with anything.
2015-09-12 20:53:23 +10:00
James Cheng
efdf05c7af Bug 1203047 - Make MediaDecoderReader know less about AudioData/VideoData by using MediaData instead. r=jya 2015-09-10 03:06:00 +02:00
JW Wang
d080b4eb18 Bug 1195158. Part 4 - remove unused code. r=cpearce. 2015-09-07 11:39:16 +08:00
Jean-Yves Avenard
661217ec10 Bug 1199878: [MSE/webm] Properly calculate media segment duration. r=kinetik
We can know with certainty the duration of a block if we have a following one. We do not have to always rely on having a previous segment to estimate the duration.
2015-09-01 10:47:07 +12:00
Nicholas Nethercote
69d088e45f 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.
2015-08-27 20:44:53 -07:00
Jean-Yves Avenard
681637a427 Bug 1199879: [MSE] Use latest demux end time to detect discontinuities. r=gerald
The ContainerParser doesn't always return an accurate end time.
2015-08-30 20:48:07 +10:00
Jean-Yves Avenard
a0d7c39db3 Bug 1199573: [MSE] Properly handle partial media header received prior a discontinuity. r=gerald 2015-08-29 12:01:23 +10:00
Jan Gerber
14f2919cc1 Bug 1199531 - Disable test_BufferingWait.html on Android due to timeouts. r=rillian
CLOSED TREE
2015-08-28 08:21:00 -04:00
Jean-Yves Avenard
c746d650c6 Bug 1199032: [MSE/webm] P2. Construct WebMDemuxer with special MSE handling. r=kinetik 2015-08-28 14:06:34 +10:00
Jan Gerber
391ef0ee53 Bug 1190776 - Re-enable test_BufferingWait.html. r=rillian 2015-08-25 12:51:17 +02:00
Chris Peterson
cc68dfd296 Bug 1197563 - Polyfill __func__ for MSVC 2013 and earlier. r=froydnj 2015-08-20 23:39:18 -07:00
Jean-Yves Avenard
f8a39b0726 Bug 1197075: P2. Revert "Bug 1171257 - Add force decode ahead to MediaFormatReader r=jya,bholley". r=edwin 2015-08-26 15:36:53 +10:00
Jean-Yves Avenard
9412fd8a00 Bug 1195073: [MSE] P7. Determine a WebM Media Segment end as early as available information permits. r=kinetik
Most cluster contains information about their size. When known, we don't need to wait until the next media segment is received to determine its size.
2015-08-24 23:13:50 +10:00
Jean-Yves Avenard
98864bb30c Bug 1195073: [MSE] P5. Detect out of order appends and recreate demuxer. r=gerald
The webm demuxer will only handle data where frames's a monotonically increasing.
2015-08-24 23:13:49 +10:00
Jean-Yves Avenard
693ecb89cc Bug 1195073: [MSE/webm] P4. Limit nestegg reads to the last block's boundaries. r=kinetik
This prevent entering into an unrecoverable error state when parsing incomplete data as often seen with MSE.
2015-08-24 23:13:48 +10:00