From d9541e1ea61729af3d38f2731e725a0ba6a6a952 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Thu, 11 Feb 2021 18:56:26 -0500 Subject: [PATCH] core: Fix various documentation errors in video --- core/src/backend/video.rs | 6 +++--- core/src/backend/video/software.rs | 7 ++----- core/src/display_object/video.rs | 3 ++- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/core/src/backend/video.rs b/core/src/backend/video.rs index 4f9c1bdb1..92656a367 100644 --- a/core/src/backend/video.rs +++ b/core/src/backend/video.rs @@ -111,10 +111,10 @@ pub struct NullVideoBackend { /// /// Specifically: /// -/// * Registering a video stream fails silently +/// * Registering a video stream succeeds but does nothing /// * All video frames are silently marked as keyframes -/// * Video stream decoding fails (since we can't pump arbitrary bitmaps into -/// arbitrary renderers) +/// * Video stream decoding fails with an error that video decoding is +/// unimplemented impl NullVideoBackend { pub fn new() -> Self { Self { diff --git a/core/src/backend/video/software.rs b/core/src/backend/video/software.rs index 18d01a1e9..fed00d78f 100644 --- a/core/src/backend/video/software.rs +++ b/core/src/backend/video/software.rs @@ -10,11 +10,8 @@ use swf::{VideoCodec, VideoDeblocking}; /// A single preloaded video stream. pub enum VideoStream {} -/// Desktop video backend. -/// -/// TODO: Currently, this just proxies out to `ruffle_h263`, in the future it -/// should support desktop media playback APIs so we can take advantage of -/// hardware-accelerated video decoding. +/// Software video backend that proxies to CPU-only codec implementations that +/// ship with Ruffle. pub struct SoftwareVideoBackend { streams: Arena, } diff --git a/core/src/display_object/video.rs b/core/src/display_object/video.rs index ed25c5740..2b52ce9e0 100644 --- a/core/src/display_object/video.rs +++ b/core/src/display_object/video.rs @@ -57,6 +57,7 @@ pub struct VideoData<'gc> { #[derive(Clone, Debug, Collect)] #[collect(require_static)] pub enum VideoSource { + /// A video bitstream embedded inside of a SWF movie. SWF { /// The movie that defined this video stream. movie: Arc, @@ -64,7 +65,7 @@ pub enum VideoSource { /// The video stream definition. streamdef: DefineVideoStream, - /// The H.263 bitstream indexed by video frame ID. + /// The locations of each embedded sub-bitstream for each video frame. /// /// Each frame consists of a start and end parameter which can be used /// to reconstruct a reference to the embedded bitstream.