Compare commits
2 Commits
ec3633952e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f41d7f169d | |||
| 20c780e025 |
@@ -3,3 +3,10 @@ target = "x86_64-unknown-uefi"
|
||||
|
||||
[target.x86_64-unknown-uefi]
|
||||
runner = "bootuefi"
|
||||
|
||||
[unstable]
|
||||
build-std = ["core", "compiler_builtins"]
|
||||
build-std-features = ["compiler-builtins-mem"]
|
||||
|
||||
[toolchain]
|
||||
channel = "nightly"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "uefi-video"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
test = false
|
||||
|
||||
[dependencies]
|
||||
embedded-graphics-core = "0.4.0"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(dead_code)]
|
||||
pub enum MediaType {
|
||||
VideoGIF,
|
||||
ImagePNG,
|
||||
|
||||
@@ -1,34 +1,22 @@
|
||||
use alloc::sync::Arc;
|
||||
use buffer::Buffer;
|
||||
use spin::Mutex;
|
||||
use uefi::{
|
||||
Result,
|
||||
boot::{self, ScopedProtocol},
|
||||
boot::{self},
|
||||
proto::console::gop::GraphicsOutput,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
codec::{
|
||||
image::ImageData,
|
||||
transform::{Transformer, crop::CropTransformer},
|
||||
video::VideoData,
|
||||
},
|
||||
codec::{image::ImageData, transform::crop::CropTransformer, video::VideoData},
|
||||
util::time::Microseconds,
|
||||
};
|
||||
|
||||
pub mod buffer;
|
||||
|
||||
pub struct GraphicLoader {
|
||||
gop: Arc<Mutex<Option<ScopedProtocol<GraphicsOutput>>>>,
|
||||
resolution: Arc<Mutex<Option<(usize, usize)>>>,
|
||||
}
|
||||
pub struct GraphicLoader {}
|
||||
|
||||
impl GraphicLoader {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
gop: Arc::new(Mutex::new(None)),
|
||||
resolution: Arc::new(Mutex::new(None)),
|
||||
}
|
||||
Self {}
|
||||
}
|
||||
|
||||
pub fn render(&self, data: &ImageData) -> Result {
|
||||
|
||||
@@ -12,6 +12,7 @@ pub struct Buffer {
|
||||
pixels: Vec<BltPixel>,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl Buffer {
|
||||
pub fn new(width: usize, height: usize) -> Self {
|
||||
Buffer {
|
||||
|
||||
Reference in New Issue
Block a user