Skip to content

Commit 686fda2

Browse files
Add bits per pixel fn to Descriptor struct (#125)
1 parent 94d8d4e commit 686fda2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/util/format/pixel.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ impl Descriptor {
572572
pub fn log2_chroma_h(self) -> u8 {
573573
unsafe { (*self.as_ptr()).log2_chroma_h }
574574
}
575+
576+
pub fn bits_per_pixel(&self) -> i32 {
577+
unsafe { av_get_bits_per_pixel(self.as_ptr()) }
578+
}
575579
}
576580

577581
impl From<AVPixelFormat> for Pixel {

0 commit comments

Comments
 (0)