From 4109fa568626049cbf81252b9627943b1ee3317b Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Mon, 17 Sep 2018 01:18:48 -0400 Subject: [PATCH] format::context::Context: add .bit_rate() method --- src/format/context/common.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/format/context/common.rs b/src/format/context/common.rs index 4f50366..44db2d7 100644 --- a/src/format/context/common.rs +++ b/src/format/context/common.rs @@ -70,6 +70,10 @@ impl Context { StreamIterMut::new(self) } + pub fn bit_rate(&self) -> i64 { + unsafe { (*self.as_ptr()).bit_rate } + } + pub fn duration(&self) -> i64 { unsafe { (*self.as_ptr()).duration } }