refactor: move PlayFlags defaults into Playbin3 and clean up unused prelude imports
This commit is contained in:
@@ -5,7 +5,7 @@ use gst::{
|
||||
caps::{Caps, CapsType},
|
||||
element::ElementExt,
|
||||
pipeline::PipelineExt,
|
||||
playback::{PlayFlags, Playbin, Playbin3},
|
||||
playback::{PlayFlags, Playbin3},
|
||||
videoconvertscale::VideoConvert,
|
||||
};
|
||||
use std::sync::{Arc, Mutex, atomic::AtomicBool};
|
||||
@@ -48,7 +48,7 @@ impl VideoSource {
|
||||
.with_buffer_duration(core::time::Duration::from_secs(2))
|
||||
.with_buffer_size(4096 * 4096 * 4 * 3)
|
||||
.with_ring_buffer_max_size(4096 * 4096 * 4 * 3)
|
||||
.with_flags(PlayFlags::default() | PlayFlags::DOWNLOAD)
|
||||
.with_flags(Playbin3::default_flags() | PlayFlags::DOWNLOAD)
|
||||
.with_video_sink(&video_sink);
|
||||
let bus = playbin.bus().change_context(Error)?;
|
||||
playbin.pause().change_context(Error)?;
|
||||
|
||||
Reference in New Issue
Block a user