Skip to content

Commit

Permalink
Fix frame formats
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHayton committed Jul 31, 2024
1 parent f30c6d3 commit 13dfab6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/convert_to_rgb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ use ffmpeg_next::{
frame::Video,
software::scaling::{Context, Flags},
};
use jaenokhwa_core::pixel_format::{UYVY, UYVY_APPLE, YUV420, YUV420V, YUYV};
use jaenokhwa_core::{
buffer::FrameBuffer,
pixel_format::{GRAY, MJPEG, NV12, RAWRGB},
pixel_format::{GRAY, MJPEG, NV12, RAWRGB, UYVY, UYVY_APPLE, YUV420V, YUYV},
};

pub trait ConvertToRgb {
Expand All @@ -18,7 +17,7 @@ pub trait ConvertToRgb {
impl ConvertToRgb for FrameBuffer {
fn convert_to_rgb(&self, output_format: Pixel) -> Vec<u8> {
if self.source_frame_format() == MJPEG {
panic!("MJPEG format is not supported");
panic!("MJPEG format is not supported, yet");
}

if self.source_frame_format() == RAWRGB {
Expand Down

0 comments on commit 13dfab6

Please sign in to comment.