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