Skip to content

Commit

Permalink
Introduce a rendering plugin (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengalin committed Nov 13, 2020
1 parent cbc6283 commit b1cf67c
Show file tree
Hide file tree
Showing 40 changed files with 1,285 additions and 838 deletions.
382 changes: 149 additions & 233 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions media/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ name = "mediatocmedia"
path = "src/lib.rs"

[dependencies]
byteorder = "1"
futures = "0.3"
gettext-rs = { version = "0.5", features = ["gettext-system"] }
glib = { git = "https://github.com/gtk-rs/gtk-rs" }
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_10"] }
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_10"] }
lazy_static = "1"
log = { version = "0.4", features = ["max_level_debug", "release_max_level_warn"] }
metadata = { path = "../metadata", package = "media-toc-metadata" }
sample = "0.11"
renderers = { path = "../renderers", package = "media-toc-renderers" }

[features]
trace-playback-queues = ["default"]
Expand Down
36 changes: 8 additions & 28 deletions media/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,46 +1,26 @@
pub mod audio_channel;
pub use self::audio_channel::{AudioChannel, AudioChannelSide, INLINE_CHANNELS};

pub mod audio_buffer;
pub use self::audio_buffer::AudioBuffer;

pub mod dbl_audio_buffer;
pub use self::dbl_audio_buffer::DoubleAudioBuffer;

pub mod playback_pipeline;
pub use self::playback_pipeline::{
MissingPlugins, OpenError, PlaybackPipeline, SeekError, SelectStreamsError, StateChangeError,
QUEUE_SIZE,
};

pub mod sample_extractor;
pub use self::sample_extractor::SampleExtractor;

pub mod sample_index;
pub use self::sample_index::SampleIndex;

pub mod sample_index_range;
pub use self::sample_index_range::SampleIndexRange;

pub mod sample_value;
pub use self::sample_value::SampleValue;

pub mod splitter_pipeline;
pub use self::splitter_pipeline::SplitterPipeline;

pub mod timestamp;
pub use self::timestamp::Timestamp;

pub mod toc_setter_pipeline;
pub use self::toc_setter_pipeline::TocSetterPipeline;

use metadata::Duration;

/// Max duration that queues can hold.
pub const QUEUE_SIZE: Duration = Duration::from_secs(5);

#[derive(Clone, Debug)]
pub enum MediaEvent {
Eos,
Error(String),
ReadyToRefresh,
// FIXME remove those
AsyncDone,
MustRefresh,
FailedToExport(String),
InitDone,
SeekDone,
StateChanged,
}
Loading

0 comments on commit b1cf67c

Please sign in to comment.