Image

Struct Image 

Source
pub struct Image { /* private fields */ }

Implementations§

Source§

impl Image

Source

pub fn get_image_width(&self, channel: i32) -> u32

Examples found in repository?
examples/demo.rs (line 68)
48fn main() {
49    let de = De265::new().unwrap();
50    println!("libde265 {}", de.get_version());
51
52    let mut decoder = Decoder::new(de.clone());
53    decoder.start_worker_threads(16).unwrap();
54
55    let h264_in = std::fs::read("/home/andrey/demo/h265/big_buck_bunney.h265").unwrap();
56
57    for packet in nal_units(&h264_in) {
58        decoder.push_data(packet, 0, None).unwrap();
59        decoder.decode().unwrap();
60
61        if let Some(img) = decoder.get_next_picture() {
62            let y = img.get_image_plane(0);
63            let u = img.get_image_plane(1);
64            let v = img.get_image_plane(2);
65
66            println!(
67                "pic {}x{} {:?} {:?} {:?} {:?} {:?} {:?} {:?}",
68                img.get_image_width(0),
69                img.get_image_height(0),
70                img.get_chroma_format(),
71                &y.0[0..20],
72                y.1,
73                &u.0[0..20],
74                u.1,
75                &v.0[0..20],
76                v.1
77            );
78        }
79    }
80}
Source

pub fn get_image_height(&self, channel: i32) -> u32

Examples found in repository?
examples/demo.rs (line 69)
48fn main() {
49    let de = De265::new().unwrap();
50    println!("libde265 {}", de.get_version());
51
52    let mut decoder = Decoder::new(de.clone());
53    decoder.start_worker_threads(16).unwrap();
54
55    let h264_in = std::fs::read("/home/andrey/demo/h265/big_buck_bunney.h265").unwrap();
56
57    for packet in nal_units(&h264_in) {
58        decoder.push_data(packet, 0, None).unwrap();
59        decoder.decode().unwrap();
60
61        if let Some(img) = decoder.get_next_picture() {
62            let y = img.get_image_plane(0);
63            let u = img.get_image_plane(1);
64            let v = img.get_image_plane(2);
65
66            println!(
67                "pic {}x{} {:?} {:?} {:?} {:?} {:?} {:?} {:?}",
68                img.get_image_width(0),
69                img.get_image_height(0),
70                img.get_chroma_format(),
71                &y.0[0..20],
72                y.1,
73                &u.0[0..20],
74                u.1,
75                &v.0[0..20],
76                v.1
77            );
78        }
79    }
80}
Source

pub fn get_chroma_format(&self) -> ChromaFormat

Examples found in repository?
examples/demo.rs (line 70)
48fn main() {
49    let de = De265::new().unwrap();
50    println!("libde265 {}", de.get_version());
51
52    let mut decoder = Decoder::new(de.clone());
53    decoder.start_worker_threads(16).unwrap();
54
55    let h264_in = std::fs::read("/home/andrey/demo/h265/big_buck_bunney.h265").unwrap();
56
57    for packet in nal_units(&h264_in) {
58        decoder.push_data(packet, 0, None).unwrap();
59        decoder.decode().unwrap();
60
61        if let Some(img) = decoder.get_next_picture() {
62            let y = img.get_image_plane(0);
63            let u = img.get_image_plane(1);
64            let v = img.get_image_plane(2);
65
66            println!(
67                "pic {}x{} {:?} {:?} {:?} {:?} {:?} {:?} {:?}",
68                img.get_image_width(0),
69                img.get_image_height(0),
70                img.get_chroma_format(),
71                &y.0[0..20],
72                y.1,
73                &u.0[0..20],
74                u.1,
75                &v.0[0..20],
76                v.1
77            );
78        }
79    }
80}
Source

pub fn get_bits_per_pixel(&self, channel: i32) -> i32

Source

pub fn get_image_plane(&self, channel: i32) -> (&[u8], usize)

Examples found in repository?
examples/demo.rs (line 62)
48fn main() {
49    let de = De265::new().unwrap();
50    println!("libde265 {}", de.get_version());
51
52    let mut decoder = Decoder::new(de.clone());
53    decoder.start_worker_threads(16).unwrap();
54
55    let h264_in = std::fs::read("/home/andrey/demo/h265/big_buck_bunney.h265").unwrap();
56
57    for packet in nal_units(&h264_in) {
58        decoder.push_data(packet, 0, None).unwrap();
59        decoder.decode().unwrap();
60
61        if let Some(img) = decoder.get_next_picture() {
62            let y = img.get_image_plane(0);
63            let u = img.get_image_plane(1);
64            let v = img.get_image_plane(2);
65
66            println!(
67                "pic {}x{} {:?} {:?} {:?} {:?} {:?} {:?} {:?}",
68                img.get_image_width(0),
69                img.get_image_height(0),
70                img.get_chroma_format(),
71                &y.0[0..20],
72                y.1,
73                &u.0[0..20],
74                u.1,
75                &v.0[0..20],
76                v.1
77            );
78        }
79    }
80}
Source

pub fn get_image_plane_user_data(&self, channel: i32) -> Option<&dyn Any>

Source

pub fn get_image_plane_user_data_mut( &mut self, channel: i32, ) -> Option<&mut dyn Any>

Source

pub fn get_image_user_data(&self) -> Option<&dyn Any>

Source

pub fn get_image_user_data_mut(&mut self) -> Option<&mut dyn Any>

Source

pub fn get_image_pts(&self) -> i64

Source

pub fn get_image_nal_header(&self)

Source

pub fn get_image_full_range_flag(&self) -> i32

Source

pub fn get_image_colour_primaries(&self) -> i32

Source

pub fn get_image_transfer_characteristics(&self) -> i32

Source

pub fn get_image_matrix_coefficients(&self) -> i32

Auto Trait Implementations§

§

impl Freeze for Image

§

impl RefUnwindSafe for Image

§

impl !Send for Image

§

impl !Sync for Image

§

impl Unpin for Image

§

impl UnwindSafe for Image

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.