refactor: move PlayFlags defaults into Playbin3 and clean up unused prelude imports
Some checks failed
build / checks-matrix (push) Has been cancelled
build / checks-build (push) Has been cancelled
build / codecov (push) Has been cancelled
docs / docs (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-12-26 10:39:00 +05:30
parent a7ffa69326
commit fc9555873b
7 changed files with 17 additions and 21 deletions

View File

@@ -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)?;