pub fn copy_packets(
copy: &PacketCopy,
output: impl Into<OutputTarget>,
container: Container,
audio: CopyAudio<'_>,
cancel: &CancelToken,
progress: &mut dyn FnMut(u64),
) -> Result<PacketCopyReport, EncodeError>Expand description
Writes copy’s runs back to back into a new container file at output, with audio. The
runs were planned for container (PacketCopyRequest::container).
The output is transactional and renamed into place only when complete. Encoded audio is
written slightly ahead of the video so neither stream piles up in the muxer. progress
receives the video packets written.
§Errors
Returns an adapter failure for an existing output, a partial a running export holds, a read or write failure, a failed mix, audio the plan does not copy, or a cancel.