Commit graph

166 commits

Author SHA1 Message Date
Fernando Jiménez Moreno
aa3c911efa HTMLMediaElement.seek: clean-up and update WPTs expectations 2018-10-26 10:22:00 +02:00
Fernando Jiménez Moreno
1f182d0bbd Remove seekable flag 2018-10-26 10:21:27 +02:00
Fernando Jiménez Moreno
44133bfb3c Byte range request for HTMLMediaElement seeking 2018-10-26 10:21:26 +02:00
Fernando Jiménez Moreno
75407822bc HTMLMediaElement seeking 2018-10-26 10:19:52 +02:00
Fernando Jiménez Moreno
2db141fb8b Setter and getter for HTMLMediaElement.currentTime 2018-10-26 10:17:32 +02:00
Fernando Jiménez Moreno
21f67a99f5 Update servo-media to fix intermittent timeouts 2018-10-24 16:36:50 +02:00
Alan Jeffrey
4282141c14 Updated servo-media 2018-10-22 19:39:36 -05:00
est31
af0f7db909 Implement basic <source> support for HtmlMediaElement
The spec has a complicated algorithm for selecting a <source>
element among multiple <source> children of a HtmlMediaElement
where it loops over all of them, tries each and takes the first
where "everything works out".

This commit implements a much simpler and restricted approach by
just taking the first <source> child, and if that fails,
failing altogether, without looking at any further children.

This is an improvement over the current status and makes gifv
items on imgur playable, although it doesn't mean full <source>
support.
2018-10-12 15:29:57 +02:00
chansuke
7b3cf27c69 Add task source for media element 2018-10-10 22:15:37 +09:00
Fernando Jiménez Moreno
11ac049d27 Make sure we do not skip the HaveMetadata state. Fixes a bunch of tests 2018-10-08 16:12:04 +02:00
Fernando Jiménez Moreno
6b0acc9cd8 Handle Player errors 2018-10-08 16:12:04 +02:00
Fernando Jiménez Moreno
0db628028a Update servo-media: handle decoder errors and use safer/nicer player API 2018-10-08 16:12:04 +02:00
Fernando Jiménez Moreno
e31339245c Move player setup to common path, deal with setup error and clean debug msgs 2018-10-08 16:12:04 +02:00
Víctor Manuel Jáquez Leal
59d8c95b23 Network EOF does't imply media processing EOS
Since media processing is highly asynchronous, there is no need to
match one event with the other. Then error handling is done when
the player emits the EOS event.

The have_metadata attribute is not required anymore.
2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
1c92240310 Fix HAVE_METADATA and HAVE_CURRENT_DATA state transitions 2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
dba61ad1df Do not set metadata until we have enough data 2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
5bbd09769c Set input size 2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
50582f1548 Rustfmt and make tidy happy 2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
f4ba7e503b Media element duration param 2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
6904535865 videoWidth and videoHeight params 2018-10-08 16:12:02 +02:00
Fernando Jiménez Moreno
da0e92d7f8 Cancel fetch in some media data processing steps 2018-10-08 16:12:02 +02:00
Fernando Jiménez Moreno
b656ae195f Player pause 2018-10-08 16:12:02 +02:00
Fernando Jiménez Moreno
8fd9b72eb7 Add show poster flag 2018-10-08 16:12:02 +02:00
Fernando Jimenez Moreno
468c59a217 Abort in-progress fetching process during load algorithm 2018-10-08 16:12:02 +02:00
Fernando Jiménez Moreno
c1bd551b11 Clarify some FIXMEs and bail out if we fail pushing data to player 2018-10-08 16:12:02 +02:00
Fernando Jiménez Moreno
72b1df343e Move unsafe_no_jsmanaged_fields to trace 2018-10-08 16:12:01 +02:00
Fernando Jiménez Moreno
8c40ef459b Do not share entire FrameRenderer with layout, only current frame 2018-10-08 16:12:01 +02:00
Fernando Jiménez Moreno
1f406ef0a0 Player does not need to go inside a mutexed Arc 2018-10-08 16:12:01 +02:00
Víctor Manuel Jáquez Leal
74a9edfed3 dom: media: implement LayoutHTMLMediaElementHelpers trait for LayoutDom 2018-10-08 16:12:00 +02:00
Víctor Manuel Jáquez Leal
6e3c2fe41a dom: add mediaframewebrenderer 2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
77c7eda0bf HACK: don't call media_source_failure_steps when eos
Because gstreamer's appsrc queue might be big enough to swallow
the whole video holding the metadata extraction until EOS.
2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
ce76b5780a dom: htmlmediaelement: add initial player bits
Also removes the usage of audio-video-metadata crate (?)
2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
0ff9ecc18a add a fixme message of not implemented mode 2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
c8bc9c8740 htmlmediaelement: typo 2018-10-08 16:11:59 +02:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
Gregory Terzian
ff62ca7c01 implement window.stop, improve aborting document load 2018-07-29 16:42:54 +08:00
Gregory Terzian
671627e97e introduce "per task source" ignoring of tasks 2018-07-10 13:42:28 +08:00
Fernando Jiménez Moreno
f46fbe4599 Remove gecko-media dependency 2018-01-19 15:06:52 +01:00
Anthony Ramine
8e75c4d30e Use GeckoMedia and only that on platforms that support it 2017-11-24 10:18:36 +01:00
Philippe Normand
24454c33b2 Implement HTMLMediaElement::canPlayType using gecko-media 2017-11-23 11:27:28 +00:00
Keith Yeung
c6bb1cb9d5 Merge request type and destination 2017-10-23 11:19:35 -07:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.

This patch makes the following changes to the `malloc_size_of` crate.

- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
  (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).

- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
  support that operation.

- For `HashSet`/`HashMap`, falls back to a computed estimate when
  `enclosing_size_of_op` isn't available.

- Adds an extern "C" `malloc_size_of` function that does the actual heap
  measurement; this is based on the same functions from the `heapsize` crate.

This patch makes the following changes elsewhere.

- Converts all the uses of `heapsize` to instead use `malloc_size_of`.

- Disables the "heapsize"/"heap_size" feature for the external crates that
  provide it.

- Removes the `HeapSizeOf` implementation from `hashglobe`.

- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
  doesn't derive those types, unlike `heapsize`.
2017-10-18 22:20:37 +11:00
Matt Brubeck
efc3683cc7 Fix commonmark Markdown warnings in docs, part 1
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.

This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
2017-10-17 11:24:57 -07:00
Simon Sapin
aa15dc269f Remove use of unstable box syntax.
http://www.robohornet.org gives a score of 101.36 on master,
and 102.68 with this PR. The latter is slightly better,
but probably within noise level.
So it looks like this PR does not affect DOM performance.

This is expected since `Box::new` is defined as:

```rust
impl<T> Box<T> {
    #[inline(always)]
    pub fn new(x: T) -> Box<T> {
        box x
    }
}
```

With inlining, it should compile to the same as box syntax.
2017-10-16 17:16:20 +02:00
Anthony Ramine
c7b1d3054f Change AttrValue::Url to AttrValue::ResolvedUrl
There is actually only one attribute that can use that, the one for
<body background>.
2017-10-15 11:03:20 +02:00
Anthony Ramine
605c679fee Fix URL attributes
URL attributes should always use AttrValue::Url, and the input should be
resolved against the document's base URL at setting time always.
2017-10-11 13:56:07 +02:00
Anthony Ramine
e3fb99dd59 Implement a bit more of the "object" path when loading media 2017-10-10 11:44:29 +02:00
Anthony Ramine
b7452f37d9 Properly abort any ongoing resource selection on loading a new media 2017-10-10 10:10:39 +02:00
Anthony Ramine
b8c55e7da6 Set have_metadata for audio elements too
We don't store video-specific metadata anymore, and we don't ignore audio-specific
metadata anymore. We now just acknowledge that we received some metadata.
2017-10-04 11:28:47 +02:00
Anthony Ramine
f87c2a8d76 Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
2017-09-26 09:49:10 +02:00