pub struct VideoMetaMessage {
pub codec: CodecType,
pub width: u16,
pub height: u16,
pub framerate: u8,
pub bitrate: u32,
}
Expand description
VIDEOMETA message for video stream metadata
§OpenIGTLink Specification
- Message type: “VIDEOMETA”
- Format: CODEC (uint8) + WIDTH (uint16) + HEIGHT (uint16) + FRAMERATE (uint8) + BITRATE (uint32) + Reserved (uint16)
- Size: 12 bytes
Fields§
§codec: CodecType
Video codec type
width: u16
Frame width in pixels
height: u16
Frame height in pixels
framerate: u8
Frames per second
bitrate: u32
Bitrate in kbps
Implementations§
Source§impl VideoMetaMessage
impl VideoMetaMessage
Sourcepub fn new(
codec: CodecType,
width: u16,
height: u16,
framerate: u8,
bitrate: u32,
) -> Self
pub fn new( codec: CodecType, width: u16, height: u16, framerate: u8, bitrate: u32, ) -> Self
Create a new VIDEOMETA message
Sourcepub fn hd1080(codec: CodecType, framerate: u8, bitrate: u32) -> Self
pub fn hd1080(codec: CodecType, framerate: u8, bitrate: u32) -> Self
Create with common HD 1080p settings
Sourcepub fn hd720(codec: CodecType, framerate: u8, bitrate: u32) -> Self
pub fn hd720(codec: CodecType, framerate: u8, bitrate: u32) -> Self
Create with common HD 720p settings
Sourcepub fn pixels_per_frame(&self) -> u32
pub fn pixels_per_frame(&self) -> u32
Get total pixels per frame
Sourcepub fn bandwidth_bps(&self) -> u32
pub fn bandwidth_bps(&self) -> u32
Get estimated bandwidth in bytes per second
Trait Implementations§
Source§impl Clone for VideoMetaMessage
impl Clone for VideoMetaMessage
Source§fn clone(&self) -> VideoMetaMessage
fn clone(&self) -> VideoMetaMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VideoMetaMessage
impl Debug for VideoMetaMessage
Source§impl Message for VideoMetaMessage
impl Message for VideoMetaMessage
Source§impl PartialEq for VideoMetaMessage
impl PartialEq for VideoMetaMessage
impl Copy for VideoMetaMessage
impl Eq for VideoMetaMessage
impl StructuralPartialEq for VideoMetaMessage
Auto Trait Implementations§
impl Freeze for VideoMetaMessage
impl RefUnwindSafe for VideoMetaMessage
impl Send for VideoMetaMessage
impl Sync for VideoMetaMessage
impl Unpin for VideoMetaMessage
impl UnwindSafe for VideoMetaMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more