diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2018-09-04 09:37:29 +0200 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2018-10-08 16:12:02 +0200 |
commit | c1bd551b111ac300f6edac91e6bf6cf3658661af (patch) | |
tree | 3891fc8850d0db43710219861d9086475eff297a /components/script/dom/htmlmediaelement.rs | |
parent | 3fbeb398d4439a83e1c4566908adfec7b42f09a8 (diff) | |
download | servo-c1bd551b111ac300f6edac91e6bf6cf3658661af.tar.gz servo-c1bd551b111ac300f6edac91e6bf6cf3658661af.zip |
Clarify some FIXMEs and bail out if we fail pushing data to player
Diffstat (limited to 'components/script/dom/htmlmediaelement.rs')
-rw-r--r-- | components/script/dom/htmlmediaelement.rs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs index 5c623044574..db4c1c43d82 100644 --- a/components/script/dom/htmlmediaelement.rs +++ b/components/script/dom/htmlmediaelement.rs @@ -602,7 +602,7 @@ impl HTMLMediaElement { }, Mode::Children(_source) => { // Step 9.children. - // FIXME(victor): seems not implemeted yet + // FIXME: https://github.com/servo/servo/issues/21481 self.queue_dedicated_media_source_failure_steps() }, } @@ -1187,9 +1187,10 @@ impl FetchResponseListener for HTMLMediaElementContext { let elem = self.elem.root(); - // push input data into the player + // Push input data into the player. if let Err(_) = elem.player.push_data(payload) { eprintln!("Couldn't push input data to player"); + return; } // https://html.spec.whatwg.org/multipage/#concept-media-load-resource step 4, @@ -1213,7 +1214,7 @@ impl FetchResponseListener for HTMLMediaElementContext { } let elem = self.elem.root(); - // signal the eos to player + // Signal the eos to player. if let Err(_) = elem.player.end_of_stream() { eprintln!("Couldn't signal EOS to player"); } @@ -1221,9 +1222,17 @@ impl FetchResponseListener for HTMLMediaElementContext { // => "If the media data can be fetched but is found by inspection to be in an unsupported // format, or can otherwise not be rendered at all" if !elem.have_metadata.get() { - // FIXME(victor): adjust player's max-size (or buffering) + // FIXME(victor): adjust player's max-size (or buffering). + // + // In short streams the EOS might arrive before extracting the stream + // metadata. This is because the internal queue in the GStreamer appsrc element, + // has a size of 200K and it pushes the data until it is reached. It would be nice + // to add a property to set the max-data in appsrc according to reported size of + // the stream. + // Until then, we comment out the failure steps. + // //elem.queue_dedicated_media_source_failure_steps(); - // => "Once the entire media resource has been fetched..." + // => "Once the entire media resource has been fetched..." } else if status.is_ok() { elem.change_ready_state(ReadyState::HaveEnoughData); |