Commit Graph

340 Commits

Author SHA1 Message Date
Andreas Pehrson
b028a0b40f Bug 1301675 - Implement StreamCaptureTrackSource::Stop. r=jib
MozReview-Commit-ID: 2qwNba6bA80
2016-09-23 16:53:10 +02:00
Alastor Wu
47b76aa673 Bug 1302453 - part1 : send new gecko event when media is resumed. r=baku
We uses "media-playback" event to notify fennec media control about media start
and end. However, if we resume media which was paused by media control, it won't
send any notification to JAVA side so that the MediaControlService can't change
the correct playing icon.

Therefore, we create new event to inform this situation.

MozReview-Commit-ID: zScaHxvHXM
2016-10-27 09:59:55 +08:00
Chris Pearce
e3a94f36b3 Bug 1310548 - Delay firing of 'waitingforkey' until all decoded data has been rendered. r=jya
This means 'waitingforkey' will be fired at a predictable time.

MozReview-Commit-ID: HMt1RbgrbuR
2016-10-17 14:16:54 +13:00
Alastor Wu
68bd777317 Bug 1308119 - replace nsIAudioChannelAgent with AudioChannelAgent. r=baku
Since I want to use more agent's functions in MediaElement and I don't think these functions need to be exposed on IDL level. (for other languages binding)

Therefore, I want to use AudioChannelAgent directly in MediaElement.

MozReview-Commit-ID: 43FvDeLpZPt
2016-10-07 10:35:01 +08:00
JW Wang
19ae50ff0f Bug 1239899. Part 1 - Remove ElementInTreeState for ELEMENT_NOT_INTREE and ELEMENT_INTREE are not used at all. We can use a bool flag to do the job. r=cpearce
MozReview-Commit-ID: 4htNy1dZODF
2016-09-23 14:51:52 +08:00
James Cheng
42e8029df1 Bug 1300654 Part1-Remove MOZ_EME from code base. r=cpearce,smaug
MozReview-Commit-ID: JboGO0w4tcE
2016-09-08 18:06:20 +08:00
Chris Pearce
af78e9f93a Bug 1304604 - Use EventTarget to simplyfy HTMLMediaElement.onencrypted implementation. r=smaug
MozReview-Commit-ID: EUpZX4ODgNj
2016-09-22 16:25:38 +12:00
Chris Pearce
4f67ef3293 Bug 1304247 - Implement HTMLMediaElement.onwaitingforkeys. r=smaug
MozReview-Commit-ID: DhNV30BfksS
2016-09-21 14:10:26 +12:00
Jean-Yves Avenard
1933de1197 Bug 1302632: P3. Provide failures details to error attribute. r=jwwang
MozReview-Commit-ID: 3eIXOF96UR4
2016-09-15 16:17:10 +10:00
Phil Ringnalda
f2abe31659 Backed out 5 changesets (bug 1302632) for forthcoming failures
Backed out changeset f2ced742d6aa (bug 1302632)
Backed out changeset 55e7962d4fc0 (bug 1302632)
Backed out changeset b20f7c887e6c (bug 1302632)
Backed out changeset 22772e4a9c72 (bug 1302632)
Backed out changeset 7d7558864a66 (bug 1302632)
2016-09-15 21:39:00 -07:00
Jean-Yves Avenard
5faeec0612 Bug 1302632: P1. Set proper error code when readyState is HAVE_NOTHING. r=jwwang
MozReview-Commit-ID: CMQkW5pPDF2
2016-09-14 16:45:52 +10:00
Carsten "Tomcat" Book
8c3409a304 Merge mozilla-central to mozilla-inbound 2016-09-14 12:11:09 +02:00
Jean-Yves Avenard
a945c437e1 Bug 1299072: P10. Pass decoding error details to media element's error attribute. r=jwwang
MozReview-Commit-ID: 49DurV9WI5S
2016-09-11 00:56:09 +10:00
kaku@mozilla.com
3e4dcf7643 Bug 1299718 part 2 - implement the MarkAsContentSource() API; r=gerald,kamidphish
MozReview-Commit-ID: 1eAdcMAmXSB
2016-09-14 15:50:29 +10:00
Andreas Pehrson
f20ab4d087 Bug 1300529 - Remove default arguments from HTMLMediaElement::CaptureStreamInternal. r=padenot
MozReview-Commit-ID: IL7odCBP74
2016-09-07 15:14:15 +02:00
Jeremy Chen
c22b72adf2 Bug 1297306 - part5:create enum constructors for EnumTable. r=baku
Enable nsAttrValue::EnumTable to be initialized with enum. So, we could get rid
of the castings in EnumTable. Fix EnumTable initialization comment.

For those untyped enumerations, declare them with uint8_t, as to other typed
enumerations with type size larger than int16_t, force casting to int16_t.

Use {nullptr,0} instead of {0} to represent the last entry.

MozReview-Commit-ID: 7Dma3Apkmxj
2016-09-07 10:20:17 +08:00
Gerald Squelart
04eb9daee8 Bug 1300459 - Pass MediaInfo by const-ref to SetMediaInfo - r=jya
MozReview-Commit-ID: 5KvCBHmI1JC
2016-09-05 14:23:23 +10:00
Alastor Wu
2a26bc5f28 Bug 1262053 - part8 : remove function NotifyOwnerDocumentActivityChangedInternal. r=cpearce
MozReview-Commit-ID: DnWgQHGJLU5
2016-08-29 18:56:38 +08:00
Alastor Wu
0aa6d63f4f Bug 1262053 - part6 : don't need to capture media element without audio. r=baku,cpearce
MozReview-Commit-ID: GO6nXbzYwIy
2016-08-29 18:56:32 +08:00
Alastor Wu
8bbb47f0e2 Bug 1262053 - part3 : modify media element for blocking autoplay media. r=cpearce
MozReview-Commit-ID: 8e13lkYTN46
2016-08-29 16:34:26 +08:00
Chris Pearce
6abb31e01c Bug 1262053 - part2 : remove old media.block-play-until-visible behaviour. r=cpearce
MozReview-Commit-ID: GujLSVfu2rp
2016-08-29 10:42:10 +08:00
Jean-Yves Avenard
90c89d6302 Bug 1298594: P2. Fire waiting event when readyState move back to HAVE_CURRENT_DATA. r=jwwang
MozReview-Commit-ID: BpwYY6njXGC
2016-08-27 22:23:52 +10:00
Andreas Pehrson
71794987a5 Bug 1259788 - Ensure ready state is updated when first track added after NotifyTracksAvailable(). r=jesup
MozReview-Commit-ID: 1FwPfety82M
2016-08-19 13:41:48 +02:00
Andreas Pehrson
0ea44a1cbd Bug 1259788 - Support MediaStream sources for HTMLMediaElement.mozCaptureStream(). r=jesup
This adds support for HTMLMediaElement.mozCaptureStream() and
mozCaptureStreamUntilEnded() for a HTMLMediaElement playing a MediaStream.

This is up to spec, while capturing a HTMLMediaElement playing a file is not.
This incompatibility means we cannot mix sources for the returned MediaStream.

As such, a MediaStream returned while the HTMLMediaElement was playing a file
will only have content while the element is playing files. If the src changes
to a MediaStream, the stream will be empty.

It works the same way if a MediaStream was captured while the HTMLMediaElement
was playing another MediaStream.

This is due to TrackID management - MediaDecoder doesn't care, and creates new
tracks when you seek, so users are unable to keep track, while for MediaStream
we control everything from main thread and keep track of the TrackIDs used
previously.

This also adds a separate path from MediaElementAudioSourceNode so that we don't
forward video tracks when the returned MediaStream is only used internally for
WebAudio. We should in that case not require a DOMMediaStream but just forwarding
tracks to a TrackUnionStream should be enough, and will save us some cpu cycles.
This is however fine for now as it's simpler.

MozReview-Commit-ID: Bg8hESDISDU
2016-08-23 17:51:50 +02:00
Andreas Pehrson
e335a8c2f6 Bug 1259788 - Rename CaptureStreamTrackSource to DecoderCaptureTrackSource. r=jesup
This prepares HTMLMediaElement for having a separate MediaStreamTrackSource for
MediaStreams, StreamCaptureTrackSource.

MozReview-Commit-ID: FVrYxFgvXgA
2016-07-06 12:15:27 +02:00
Andreas Pehrson
7851818950 Bug 1259788 - Multi-track support for MediaTrackList. r=jesup
MozReview-Commit-ID: 1av5uvyCMYv
2016-08-24 10:58:04 +02:00
Bryce Van Dyk
8c84be1a8f Bug 1145011 - Implement waitingforkey event. r=jya
Bubble information from SamplesWaitingForKey to an HTMLMediaElement so that we
can emit a waitingForKey event. If we are unable to decode more samples due to
needing a key the event will be signalled. See
http://w3c.github.io/encrypted-media/#dom-evt-waitingforkey for more information
on this event.

The code in place before this patch handles updating readyState when we are
waiting for a key, this patch adds the event which should be emitted in such a
case. The spec defines certain preconditions should be the case before running
the algo to emit this event. For example, the element should potentially be
playing, and it should have at least HAVE_FUTURE_DATA ready state. This is not
strictly true for when the new code is run, due how existing code handles ready
state. We are honoring the spirit of the spec, though the letter of the spec is
lightly gone against in the handling of the preconditions.

MozReview-Commit-ID: LKlDd4wkRSE
2016-08-22 08:51:01 +12:00
bechen
e2ae2d2c33 Bug 1291629 - Remove RTSP code. r=jwwang
MozReview-Commit-ID: AxaLwO4rTuY
2016-08-10 10:32:25 +08:00
Alastor Wu
e4b9fa835e Bug 1283417 - part1 : implement function to notify cue's display states changed. r=bechen
MozReview-Commit-ID: AF2S2UOLCt1
2016-08-09 16:43:07 +08:00
Gerald Squelart
a8099eb8bb Bug 1293145 - Simulate video-decode-suspend for telemetry purposes - r=kamidphish
After a video has been playing while hidden for a certain time, count the time
until it is not hidden anymore (or it has finished playing), to test-drive how
much decoding time would have been saved by the video-decode-suspend feature.

Note that this is done inside HTMLMediaElement by simulating what should happen
in the MDSM, because instrumenting the MDSM itself and friends would have been
harder and more intrusive.

MozReview-Commit-ID: LdxhPtmoXeA
2016-08-08 10:14:39 +08:00
Iris Hsiao
4df8be5986 Backed out changeset 41138b630cdc (bug 1293145) for nsCOMPtr crash \
CLOSED TREE
2016-08-09 14:21:22 +08:00
Gerald Squelart
8ea3a2c1f5 Bug 1293145 - Simulate video-decode-suspend for telemetry purposes - r=kamidphish
After a video has been playing while hidden for a certain time, count the time
until it is not hidden anymore (or it has finished playing), to test-drive how
much decoding time would have been saved by the video-decode-suspend feature.

Note that this is done inside HTMLMediaElement by simulating what should happen
in the MDSM, because instrumenting the MDSM itself and friends would have been
harder and more intrusive.

MozReview-Commit-ID: LdxhPtmoXeA
2016-08-08 10:14:39 +08:00
Kaku Kuo
40efb11f19 Bug 1274626 part 1 - add a method to HTMLMediaElement for debugging visibilty change; r=jwwang,ehsan
MozReview-Commit-ID: B1gAc0KfmCQ
2016-07-28 16:09:02 +08:00
Carsten "Tomcat" Book
4422966ea3 Backed out changeset eb7f310f128d (bug 1274626) for breaking unified builds 2016-08-02 17:47:47 +02:00
Kaku Kuo
bc0577ca70 Bug 1274626 - Part 1 - add a method to HTMLMediaElement for debugging visibilty change; r=jwwang,ehsan
MozReview-Commit-ID: B1gAc0KfmCQ
2016-07-28 16:09:02 +08:00
Carsten "Tomcat" Book
bc6615c2f9 Merge mozilla-central to autoland 2016-07-30 16:49:41 +02:00
JW Wang
fa1920a2bb Bug 1289649 - HTMLMediaElement should clear mDecoder when XPCOM shutdown begins. r=gerald
MozReview-Commit-ID: A3ECReCgiD7
2016-07-27 10:26:21 +08:00
Alastor Wu
a73b58fc73 Bug 1282410 - part1 : open unsupported type media. r=cpearce 2016-07-29 17:02:31 -05:00
Gerald Squelart
91f1df4585 Bug 1287712 - TimeDurationAccumulator includes running timer in reports - r=cpearce
If the timer is currently running, add started time segment until now to
Total(), and add 1 to Count().
This ensures correct values are returned without having to Pause().

MozReview-Commit-ID: JSBvL93GtkE
2016-07-19 17:46:38 +10:00
Sebastian Kaspari
3aa2c7f730 Backed out 3 changesets (bug 1282410)
Backed out changeset 39c367ecc144 (bug 1282410)
Backed out changeset 577309fc4bbb (bug 1282410)
Backed out changeset 339b5c5d3595 (bug 1282410)

MozReview-Commit-ID: 17IgTjbib20
2016-07-18 17:26:25 +02:00
Gerald Squelart
0a0dc33291 Bug 1285419 - Record mediasource hidden play time - r=kamidphish
Note that this is a simple duration counter based on the existing (non-hidden)
play-time, but it only counts when video is playing while hidden.
There is no bucketing yet, future probes may add finer-grained information.

MozReview-Commit-ID: DUfryXjGBAN
2016-07-08 16:40:31 +10:00
Gregory Szorc
7243daa74f Merge mozilla-central to mozilla-inbound 2016-07-06 18:26:17 -07:00
Alastor Wu
ba50c27fb3 Bug 1282410 - part3 : add log. r=cpearce
MozReview-Commit-ID: KWf3uya31zv
2016-07-06 10:54:11 +08:00
Alastor Wu
cc0ca552cb Bug 1282410 - part1 : open unsupported type media. r=cpearce
MozReview-Commit-ID: 4fjkDlRgdt7
2016-07-06 10:34:29 +08:00
ctai
6ca94c56cb Bug 1266646 - Change HTMLMediaElement::StreamSizeListerner to inherit MediaStreamTrackDirectListener. r=pehrsons
MozReview-Commit-ID: HnNv9BnlbDy
2016-05-10 17:02:15 +08:00
Andreas Pehrson
cb934180a4 Bug 1280445 - Remove wrapper from MediaStream. r=jesup, r=padenot
MozReview-Commit-ID: CTCFloIUXKa
2016-06-29 12:27:13 +02:00
bechen
a475af3cfd Bug 1279865 - Don't run TimeMarchesOn if the MediaElement is not played. r=rillian
1. If mHasUserInteraction MediaElement is false, don't run the TimeMarchesOn because the element is not played. 2. Update the activeCueList only in TimeMarchesOn(). 3. Run TimeMarchesOn() at the beginning of play. r=rillian

MozReview-Commit-ID: BhwsIfRm3B2
2016-06-30 13:31:56 +08:00
Chris Pearce
4d492d6997 Bug 1267918 - Add GMPCrashHelper for HTMLMediaElement. r=gerald
This ensures that unencrypted GMP decoding crash reporting works.

MozReview-Commit-ID: 84TAV5F9Ie0
2016-06-29 11:42:07 +12:00
JW Wang
f053fac711 Bug 1235183. Part 3 - move mChannel to ChannelLoader so it will be easier to create the channel asynchronously. r=cpearce
MozReview-Commit-ID: 5n8P0L7m0Iw
2016-06-24 10:41:43 +08:00
JW Wang
8050804572 Bug 1274030 - clean VideoFrameContainer when "xpcom-shutdown" event received. r=cpearce
MozReview-Commit-ID: 92zeiNXSkjf
2016-05-22 21:39:55 +08:00