pub struct BytesEncoder { /* private fields */ }This crate has been renamed. Please migrate to gpu-video.
Expand description
An encoder that takes input frames as Vec<u8> with raw pixel data (in NV12)
Implementations§
Source§impl BytesEncoder
impl BytesEncoder
Sourcepub fn encode(
&mut self,
frame: &InputFrame<RawFrameData>,
force_keyframe: bool,
) -> Result<EncodedOutputChunk<Vec<u8>>, VulkanEncoderError>
👎Deprecated since 0.3.1: This crate has been renamed. Please migrate to gpu-video.
pub fn encode( &mut self, frame: &InputFrame<RawFrameData>, force_keyframe: bool, ) -> Result<EncodedOutputChunk<Vec<u8>>, VulkanEncoderError>
This crate has been renamed. Please migrate to gpu-video.
The result is a chunk of H264 bytecode.
If the force_keyframe option is set to true, the encoder will encode this frame as a
keyframe.
Otherwise, the encoder will decide which frames should be coded this way.
Sourcepub fn sps(&self) -> Result<Vec<u8>, VulkanEncoderError>
👎Deprecated since 0.3.1: This crate has been renamed. Please migrate to gpu-video.
pub fn sps(&self) -> Result<Vec<u8>, VulkanEncoderError>
This crate has been renamed. Please migrate to gpu-video.
Retrieve encoded SPS NAL units from the video session parameters, in Annex B.
Useful when inline_stream_params is false and the parameters need to be
sent out-of-band (e.g. in RTMP or MP4 headers).
Sourcepub fn pps(&self) -> Result<Vec<u8>, VulkanEncoderError>
👎Deprecated since 0.3.1: This crate has been renamed. Please migrate to gpu-video.
pub fn pps(&self) -> Result<Vec<u8>, VulkanEncoderError>
This crate has been renamed. Please migrate to gpu-video.
Retrieve encoded PPS NAL units from the video session parameters, in Annex B.
Useful when inline_stream_params is false and the parameters need to be
sent out-of-band (e.g. in RTMP or MP4 headers).