Warning
TorchAudio’s C++ API is prototype feature. API/ABI backward compatibility is not guaranteed.
Note
The top-level namespace has been changed from torchaudio
to torio
.
StreamWriter
has been renamed to StreamingMediaEncoder
.
torio::io::StreamingMediaEncoder¶
StreamingMediaEncoder
is the implementation used by Python equivalent and provides similar interface.
When working with custom I/O, such as in-memory data, StreamingMediaEncoderCustomIO
class can be used.
Both classes have the same methods defined, so their usages are the same.
Constructors¶
StreamingMediaEncoder¶
-
class StreamingMediaEncoder¶
Encode and write audio/video streams chunk by chunk
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::StreamingMediaEncoder” in doxygen xml output for project “libtorio” from directory: cpp/xml
StreamingMediaEncoderCustomIO¶
Warning
doxygenclass: Cannot find class “torio::io::StreamingMediaEncoderCustomIO” in doxygen xml output for project “libtorio” from directory: cpp/xml
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoderCustomIO::StreamingMediaEncoderCustomIO” in doxygen xml output for project “libtorio” from directory: cpp/xml
Config methods¶
add_audio_stream¶
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::add_audio_stream” in doxygen xml output for project “libtorio” from directory: cpp/xml
add_video_stream¶
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::add_video_stream” in doxygen xml output for project “libtorio” from directory: cpp/xml
set_metadata¶
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::set_metadata” in doxygen xml output for project “libtorio” from directory: cpp/xml
Write methods¶
open¶
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::open” in doxygen xml output for project “libtorio” from directory: cpp/xml
close¶
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::close” in doxygen xml output for project “libtorio” from directory: cpp/xml
write_audio_chunk¶
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::write_audio_chunk” in doxygen xml output for project “libtorio” from directory: cpp/xml
write_video_chunk¶
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::write_video_chunk” in doxygen xml output for project “libtorio” from directory: cpp/xml
flush¶
Warning
doxygenfunction: Cannot find function “torio::io::StreamingMediaEncoder::flush” in doxygen xml output for project “libtorio” from directory: cpp/xml