Commit a6602715 authored by Moto Hira's avatar Moto Hira Committed by Facebook GitHub Bot
Browse files

Get rid of (pseudo) hungarian notation (#3255)

Summary:
Pull Request resolved: https://github.com/pytorch/audio/pull/3255

Prefixing what is always pointer with `p` does not improve readability...

Reviewed By: hwangjeff

Differential Revision: D44799531

fbshipit-source-id: bc2ce4e534009e2cb577719953207ddb82cf2d3d
parent 631bcc9f
...@@ -51,21 +51,21 @@ AVFormatContext* get_input_format_context( ...@@ -51,21 +51,21 @@ AVFormatContext* get_input_format_context(
} }
} // namespace } // namespace
StreamReader::StreamReader(AVFormatContext* p) : pFormatContext(p) { StreamReader::StreamReader(AVFormatContext* p) : format_ctx(p) {
C10_LOG_API_USAGE_ONCE("torchaudio.io.StreamReader"); C10_LOG_API_USAGE_ONCE("torchaudio.io.StreamReader");
int ret = avformat_find_stream_info(pFormatContext, nullptr); int ret = avformat_find_stream_info(format_ctx, nullptr);
TORCH_CHECK( TORCH_CHECK(
ret >= 0, "Failed to find stream information: ", av_err2string(ret)); ret >= 0, "Failed to find stream information: ", av_err2string(ret));
processors = processors =
std::vector<std::unique_ptr<StreamProcessor>>(pFormatContext->nb_streams); std::vector<std::unique_ptr<StreamProcessor>>(format_ctx->nb_streams);
for (int i = 0; i < pFormatContext->nb_streams; ++i) { for (int i = 0; i < format_ctx->nb_streams; ++i) {
switch (pFormatContext->streams[i]->codecpar->codec_type) { switch (format_ctx->streams[i]->codecpar->codec_type) {
case AVMEDIA_TYPE_AUDIO: case AVMEDIA_TYPE_AUDIO:
case AVMEDIA_TYPE_VIDEO: case AVMEDIA_TYPE_VIDEO:
break; break;
default: default:
pFormatContext->streams[i]->discard = AVDISCARD_ALL; format_ctx->streams[i]->discard = AVDISCARD_ALL;
} }
} }
} }
...@@ -118,7 +118,7 @@ void validate_src_stream_type( ...@@ -118,7 +118,7 @@ void validate_src_stream_type(
// Query methods // Query methods
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int64_t StreamReader::num_src_streams() const { int64_t StreamReader::num_src_streams() const {
return pFormatContext->nb_streams; return format_ctx->nb_streams;
} }
namespace { namespace {
...@@ -133,13 +133,13 @@ OptionDict parse_metadata(const AVDictionary* metadata) { ...@@ -133,13 +133,13 @@ OptionDict parse_metadata(const AVDictionary* metadata) {
} // namespace } // namespace
OptionDict StreamReader::get_metadata() const { OptionDict StreamReader::get_metadata() const {
return parse_metadata(pFormatContext->metadata); return parse_metadata(format_ctx->metadata);
} }
SrcStreamInfo StreamReader::get_src_stream_info(int i) const { SrcStreamInfo StreamReader::get_src_stream_info(int i) const {
validate_src_stream_index(pFormatContext, i); validate_src_stream_index(format_ctx, i);
AVStream* stream = pFormatContext->streams[i]; AVStream* stream = format_ctx->streams[i];
AVCodecParameters* codecpar = stream->codecpar; AVCodecParameters* codecpar = stream->codecpar;
SrcStreamInfo ret; SrcStreamInfo ret;
...@@ -188,8 +188,8 @@ AVCodecParameters* get_codecpar() { ...@@ -188,8 +188,8 @@ AVCodecParameters* get_codecpar() {
} // namespace } // namespace
StreamParams StreamReader::get_src_stream_params(int i) { StreamParams StreamReader::get_src_stream_params(int i) {
validate_src_stream_index(pFormatContext, i); validate_src_stream_index(format_ctx, i);
AVStream* stream = pFormatContext->streams[i]; AVStream* stream = format_ctx->streams[i];
AVCodecParametersPtr codec_params(get_codecpar()); AVCodecParametersPtr codec_params(get_codecpar());
int ret = avcodec_parameters_copy(codec_params, stream->codecpar); int ret = avcodec_parameters_copy(codec_params, stream->codecpar);
...@@ -235,12 +235,12 @@ OutputStreamInfo StreamReader::get_out_stream_info(int i) const { ...@@ -235,12 +235,12 @@ OutputStreamInfo StreamReader::get_out_stream_info(int i) const {
int64_t StreamReader::find_best_audio_stream() const { int64_t StreamReader::find_best_audio_stream() const {
return av_find_best_stream( return av_find_best_stream(
pFormatContext, AVMEDIA_TYPE_AUDIO, -1, -1, nullptr, 0); format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, nullptr, 0);
} }
int64_t StreamReader::find_best_video_stream() const { int64_t StreamReader::find_best_video_stream() const {
return av_find_best_stream( return av_find_best_stream(
pFormatContext, AVMEDIA_TYPE_VIDEO, -1, -1, nullptr, 0); format_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, nullptr, 0);
} }
bool StreamReader::is_buffer_ready() const { bool StreamReader::is_buffer_ready() const {
...@@ -266,7 +266,7 @@ bool StreamReader::is_buffer_ready() const { ...@@ -266,7 +266,7 @@ bool StreamReader::is_buffer_ready() const {
void StreamReader::seek(double timestamp_s, int64_t mode) { void StreamReader::seek(double timestamp_s, int64_t mode) {
TORCH_CHECK(timestamp_s >= 0, "timestamp must be non-negative."); TORCH_CHECK(timestamp_s >= 0, "timestamp must be non-negative.");
TORCH_CHECK( TORCH_CHECK(
pFormatContext->nb_streams > 0, format_ctx->nb_streams > 0,
"At least one stream must exist in this context"); "At least one stream must exist in this context");
int64_t timestamp_av_tb = static_cast<int64_t>(timestamp_s * AV_TIME_BASE); int64_t timestamp_av_tb = static_cast<int64_t>(timestamp_s * AV_TIME_BASE);
...@@ -289,7 +289,7 @@ void StreamReader::seek(double timestamp_s, int64_t mode) { ...@@ -289,7 +289,7 @@ void StreamReader::seek(double timestamp_s, int64_t mode) {
TORCH_CHECK(false, "Invalid mode value: ", mode); TORCH_CHECK(false, "Invalid mode value: ", mode);
} }
int ret = av_seek_frame(pFormatContext, -1, timestamp_av_tb, flag); int ret = av_seek_frame(format_ctx, -1, timestamp_av_tb, flag);
if (ret < 0) { if (ret < 0) {
seek_timestamp = 0; seek_timestamp = 0;
...@@ -357,7 +357,7 @@ void StreamReader::add_video_stream( ...@@ -357,7 +357,7 @@ void StreamReader::add_video_stream(
} }
void StreamReader::add_packet_stream(int i) { void StreamReader::add_packet_stream(int i) {
validate_src_stream_index(pFormatContext, i); validate_src_stream_index(format_ctx, i);
if (!packet_buffer) { if (!packet_buffer) {
packet_buffer = std::make_unique<PacketBuffer>(); packet_buffer = std::make_unique<PacketBuffer>();
} }
...@@ -373,9 +373,9 @@ void StreamReader::add_stream( ...@@ -373,9 +373,9 @@ void StreamReader::add_stream(
const c10::optional<std::string>& decoder, const c10::optional<std::string>& decoder,
const c10::optional<OptionDict>& decoder_option, const c10::optional<OptionDict>& decoder_option,
const torch::Device& device) { const torch::Device& device) {
validate_src_stream_type(pFormatContext, i, media_type); validate_src_stream_type(format_ctx, i, media_type);
AVStream* stream = pFormatContext->streams[i]; AVStream* stream = format_ctx->streams[i];
// When media source is file-like object, it is possible that source codec // When media source is file-like object, it is possible that source codec
// is not detected properly. // is not detected properly.
TORCH_CHECK( TORCH_CHECK(
...@@ -402,7 +402,7 @@ void StreamReader::add_stream( ...@@ -402,7 +402,7 @@ void StreamReader::add_stream(
case AVMEDIA_TYPE_AUDIO: case AVMEDIA_TYPE_AUDIO:
return AVRational{0, 1}; return AVRational{0, 1};
case AVMEDIA_TYPE_VIDEO: case AVMEDIA_TYPE_VIDEO:
return av_guess_frame_rate(pFormatContext, stream, nullptr); return av_guess_frame_rate(format_ctx, stream, nullptr);
default: default:
TORCH_INTERNAL_ASSERT( TORCH_INTERNAL_ASSERT(
false, false,
...@@ -446,7 +446,7 @@ void StreamReader::remove_stream(int64_t i) { ...@@ -446,7 +446,7 @@ void StreamReader::remove_stream(int64_t i) {
// 1: It's done, caller should stop calling // 1: It's done, caller should stop calling
// <0: Some error happened // <0: Some error happened
int StreamReader::process_packet() { int StreamReader::process_packet() {
int ret = av_read_frame(pFormatContext, pPacket); int ret = av_read_frame(format_ctx, packet);
if (ret == AVERROR_EOF) { if (ret == AVERROR_EOF) {
ret = drain(); ret = drain();
return (ret < 0) ? ret : 1; return (ret < 0) ? ret : 1;
...@@ -454,9 +454,9 @@ int StreamReader::process_packet() { ...@@ -454,9 +454,9 @@ int StreamReader::process_packet() {
if (ret < 0) { if (ret < 0) {
return ret; return ret;
} }
AutoPacketUnref packet{pPacket}; AutoPacketUnref auto_unref{packet};
int stream_index = pPacket->stream_index; int stream_index = packet->stream_index;
if (packet_stream_indices.count(stream_index)) { if (packet_stream_indices.count(stream_index)) {
packet_buffer->push_packet(packet); packet_buffer->push_packet(packet);
......
...@@ -12,8 +12,8 @@ namespace io { ...@@ -12,8 +12,8 @@ namespace io {
/// Fetch and decode audio/video streams chunk by chunk. /// Fetch and decode audio/video streams chunk by chunk.
/// ///
class StreamReader { class StreamReader {
AVFormatInputContextPtr pFormatContext; AVFormatInputContextPtr format_ctx;
AVPacketPtr pPacket{alloc_avpacket()}; AVPacketPtr packet{alloc_avpacket()};
std::vector<std::unique_ptr<StreamProcessor>> processors; std::vector<std::unique_ptr<StreamProcessor>> processors;
// Mapping from user-facing stream index to internal index. // Mapping from user-facing stream index to internal index.
...@@ -49,9 +49,9 @@ class StreamReader { ...@@ -49,9 +49,9 @@ class StreamReader {
/// This is a low level constructor interact with FFmpeg directly. /// This is a low level constructor interact with FFmpeg directly.
/// One can provide custom AVFormatContext in case the other constructor /// One can provide custom AVFormatContext in case the other constructor
/// does not meet a requirement. /// does not meet a requirement.
/// @param pFormatContext An initialized AVFormatContext. StreamReader will /// @param format_ctx An initialized AVFormatContext. StreamReader will
/// own the resources and release it at the end. /// own the resources and release it at the end.
explicit StreamReader(AVFormatContext* pFormatContext); explicit StreamReader(AVFormatContext* format_ctx);
/// @endcond /// @endcond
......
...@@ -38,7 +38,7 @@ AVFormatContext* get_output_format_context( ...@@ -38,7 +38,7 @@ AVFormatContext* get_output_format_context(
} }
} // namespace } // namespace
StreamWriter::StreamWriter(AVFormatContext* p) : pFormatContext(p) { StreamWriter::StreamWriter(AVFormatContext* p) : format_ctx(p) {
C10_LOG_API_USAGE_ONCE("torchaudio.io.StreamWriter"); C10_LOG_API_USAGE_ONCE("torchaudio.io.StreamWriter");
} }
...@@ -66,13 +66,13 @@ void StreamWriter::add_audio_stream( ...@@ -66,13 +66,13 @@ void StreamWriter::add_audio_stream(
const c10::optional<std::string>& filter_desc) { const c10::optional<std::string>& filter_desc) {
TORCH_CHECK(!is_open, "Output is already opened. Cannot add a new stream."); TORCH_CHECK(!is_open, "Output is already opened. Cannot add a new stream.");
TORCH_INTERNAL_ASSERT( TORCH_INTERNAL_ASSERT(
pFormatContext->nb_streams == num_output_streams(), format_ctx->nb_streams == num_output_streams(),
"The number of encode process and the number of output streams do not match."); "The number of encode process and the number of output streams do not match.");
processes.emplace( processes.emplace(
std::piecewise_construct, std::piecewise_construct,
std::forward_as_tuple(current_key), std::forward_as_tuple(current_key),
std::forward_as_tuple(get_audio_encode_process( std::forward_as_tuple(get_audio_encode_process(
pFormatContext, format_ctx,
sample_rate, sample_rate,
num_channels, num_channels,
format, format,
...@@ -102,13 +102,13 @@ void StreamWriter::add_video_stream( ...@@ -102,13 +102,13 @@ void StreamWriter::add_video_stream(
const c10::optional<std::string>& filter_desc) { const c10::optional<std::string>& filter_desc) {
TORCH_CHECK(!is_open, "Output is already opened. Cannot add a new stream."); TORCH_CHECK(!is_open, "Output is already opened. Cannot add a new stream.");
TORCH_INTERNAL_ASSERT( TORCH_INTERNAL_ASSERT(
pFormatContext->nb_streams == num_output_streams(), format_ctx->nb_streams == num_output_streams(),
"The number of encode process and the number of output streams do not match."); "The number of encode process and the number of output streams do not match.");
processes.emplace( processes.emplace(
std::piecewise_construct, std::piecewise_construct,
std::forward_as_tuple(current_key), std::forward_as_tuple(current_key),
std::forward_as_tuple(get_video_encode_process( std::forward_as_tuple(get_video_encode_process(
pFormatContext, format_ctx,
frame_rate, frame_rate,
width, width,
height, height,
...@@ -129,7 +129,7 @@ void StreamWriter::add_packet_stream(const StreamParams& stream_params) { ...@@ -129,7 +129,7 @@ void StreamWriter::add_packet_stream(const StreamParams& stream_params) {
packet_writers.emplace( packet_writers.emplace(
std::piecewise_construct, std::piecewise_construct,
std::forward_as_tuple(stream_params.stream_index), std::forward_as_tuple(stream_params.stream_index),
std::forward_as_tuple(pFormatContext, stream_params)); std::forward_as_tuple(format_ctx, stream_params));
current_key++; current_key++;
} }
...@@ -146,13 +146,13 @@ void StreamWriter::add_audio_frame_stream( ...@@ -146,13 +146,13 @@ void StreamWriter::add_audio_frame_stream(
const c10::optional<std::string>& filter_desc) { const c10::optional<std::string>& filter_desc) {
TORCH_CHECK(!is_open, "Output is already opened. Cannot add a new stream."); TORCH_CHECK(!is_open, "Output is already opened. Cannot add a new stream.");
TORCH_INTERNAL_ASSERT( TORCH_INTERNAL_ASSERT(
pFormatContext->nb_streams == num_output_streams(), format_ctx->nb_streams == num_output_streams(),
"The number of encode process and the number of output streams do not match."); "The number of encode process and the number of output streams do not match.");
processes.emplace( processes.emplace(
std::piecewise_construct, std::piecewise_construct,
std::forward_as_tuple(current_key), std::forward_as_tuple(current_key),
std::forward_as_tuple(get_audio_encode_process( std::forward_as_tuple(get_audio_encode_process(
pFormatContext, format_ctx,
sample_rate, sample_rate,
num_channels, num_channels,
format, format,
...@@ -183,13 +183,13 @@ void StreamWriter::add_video_frame_stream( ...@@ -183,13 +183,13 @@ void StreamWriter::add_video_frame_stream(
const c10::optional<std::string>& filter_desc) { const c10::optional<std::string>& filter_desc) {
TORCH_CHECK(!is_open, "Output is already opened. Cannot add a new stream."); TORCH_CHECK(!is_open, "Output is already opened. Cannot add a new stream.");
TORCH_INTERNAL_ASSERT( TORCH_INTERNAL_ASSERT(
pFormatContext->nb_streams == num_output_streams(), format_ctx->nb_streams == num_output_streams(),
"The number of encode process and the number of output streams do not match."); "The number of encode process and the number of output streams do not match.");
processes.emplace( processes.emplace(
std::piecewise_construct, std::piecewise_construct,
std::forward_as_tuple(current_key), std::forward_as_tuple(current_key),
std::forward_as_tuple(get_video_encode_process( std::forward_as_tuple(get_video_encode_process(
pFormatContext, format_ctx,
frame_rate, frame_rate,
width, width,
height, height,
...@@ -208,53 +208,49 @@ void StreamWriter::add_video_frame_stream( ...@@ -208,53 +208,49 @@ void StreamWriter::add_video_frame_stream(
} }
void StreamWriter::set_metadata(const OptionDict& metadata) { void StreamWriter::set_metadata(const OptionDict& metadata) {
av_dict_free(&pFormatContext->metadata); av_dict_free(&format_ctx->metadata);
for (auto const& [key, value] : metadata) { for (auto const& [key, value] : metadata) {
av_dict_set(&pFormatContext->metadata, key.c_str(), value.c_str(), 0); av_dict_set(&format_ctx->metadata, key.c_str(), value.c_str(), 0);
} }
} }
void StreamWriter::dump_format(int64_t i) { void StreamWriter::dump_format(int64_t i) {
av_dump_format(pFormatContext, (int)i, pFormatContext->url, 1); av_dump_format(format_ctx, (int)i, format_ctx->url, 1);
} }
void StreamWriter::open(const c10::optional<OptionDict>& option) { void StreamWriter::open(const c10::optional<OptionDict>& option) {
TORCH_INTERNAL_ASSERT( TORCH_INTERNAL_ASSERT(
pFormatContext->nb_streams == num_output_streams(), format_ctx->nb_streams == num_output_streams(),
"The number of encode process and the number of output streams do not match."); "The number of encode process and the number of output streams do not match.");
int ret = 0; int ret = 0;
// Open the file if it was not provided by client code (i.e. when not // Open the file if it was not provided by client code (i.e. when not
// file-like object) // file-like object)
AVFORMAT_CONST AVOutputFormat* fmt = pFormatContext->oformat; AVFORMAT_CONST AVOutputFormat* fmt = format_ctx->oformat;
AVDictionary* opt = get_option_dict(option); AVDictionary* opt = get_option_dict(option);
if (!(fmt->flags & AVFMT_NOFILE) && if (!(fmt->flags & AVFMT_NOFILE) &&
!(pFormatContext->flags & AVFMT_FLAG_CUSTOM_IO)) { !(format_ctx->flags & AVFMT_FLAG_CUSTOM_IO)) {
ret = avio_open2( ret = avio_open2(
&pFormatContext->pb, &format_ctx->pb, format_ctx->url, AVIO_FLAG_WRITE, nullptr, &opt);
pFormatContext->url,
AVIO_FLAG_WRITE,
nullptr,
&opt);
if (ret < 0) { if (ret < 0) {
av_dict_free(&opt); av_dict_free(&opt);
TORCH_CHECK( TORCH_CHECK(
false, false,
"Failed to open dst: ", "Failed to open dst: ",
pFormatContext->url, format_ctx->url,
" (", " (",
av_err2string(ret), av_err2string(ret),
")"); ")");
} }
} }
ret = avformat_write_header(pFormatContext, &opt); ret = avformat_write_header(format_ctx, &opt);
clean_up_dict(opt); clean_up_dict(opt);
TORCH_CHECK( TORCH_CHECK(
ret >= 0, ret >= 0,
"Failed to write header: ", "Failed to write header: ",
pFormatContext->url, format_ctx->url,
" (", " (",
av_err2string(ret), av_err2string(ret),
")"); ")");
...@@ -262,18 +258,18 @@ void StreamWriter::open(const c10::optional<OptionDict>& option) { ...@@ -262,18 +258,18 @@ void StreamWriter::open(const c10::optional<OptionDict>& option) {
} }
void StreamWriter::close() { void StreamWriter::close() {
int ret = av_write_trailer(pFormatContext); int ret = av_write_trailer(format_ctx);
if (ret < 0) { if (ret < 0) {
LOG(WARNING) << "Failed to write trailer. (" << av_err2string(ret) << ")."; LOG(WARNING) << "Failed to write trailer. (" << av_err2string(ret) << ").";
} }
// Close the file if it was not provided by client code (i.e. when not // Close the file if it was not provided by client code (i.e. when not
// file-like object) // file-like object)
AVFORMAT_CONST AVOutputFormat* fmt = pFormatContext->oformat; AVFORMAT_CONST AVOutputFormat* fmt = format_ctx->oformat;
if (!(fmt->flags & AVFMT_NOFILE) && if (!(fmt->flags & AVFMT_NOFILE) &&
!(pFormatContext->flags & AVFMT_FLAG_CUSTOM_IO)) { !(format_ctx->flags & AVFMT_FLAG_CUSTOM_IO)) {
// avio_closep can be only applied to AVIOContext opened by avio_open // avio_closep can be only applied to AVIOContext opened by avio_open
avio_closep(&(pFormatContext->pb)); avio_closep(&(format_ctx->pb));
} }
is_open = false; is_open = false;
} }
...@@ -284,13 +280,13 @@ void StreamWriter::write_audio_chunk( ...@@ -284,13 +280,13 @@ void StreamWriter::write_audio_chunk(
const c10::optional<double>& pts) { const c10::optional<double>& pts) {
TORCH_CHECK(is_open, "Output is not opened. Did you call `open` method?"); TORCH_CHECK(is_open, "Output is not opened. Did you call `open` method?");
TORCH_CHECK( TORCH_CHECK(
0 <= i && i < static_cast<int>(pFormatContext->nb_streams), 0 <= i && i < static_cast<int>(format_ctx->nb_streams),
"Invalid stream index. Index must be in range of [0, ", "Invalid stream index. Index must be in range of [0, ",
pFormatContext->nb_streams, format_ctx->nb_streams,
"). Found: ", "). Found: ",
i); i);
TORCH_CHECK( TORCH_CHECK(
pFormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO, format_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO,
"Stream ", "Stream ",
i, i,
" is not audio type."); " is not audio type.");
...@@ -303,13 +299,13 @@ void StreamWriter::write_video_chunk( ...@@ -303,13 +299,13 @@ void StreamWriter::write_video_chunk(
const c10::optional<double>& pts) { const c10::optional<double>& pts) {
TORCH_CHECK(is_open, "Output is not opened. Did you call `open` method?"); TORCH_CHECK(is_open, "Output is not opened. Did you call `open` method?");
TORCH_CHECK( TORCH_CHECK(
0 <= i && i < static_cast<int>(pFormatContext->nb_streams), 0 <= i && i < static_cast<int>(format_ctx->nb_streams),
"Invalid stream index. Index must be in range of [0, ", "Invalid stream index. Index must be in range of [0, ",
pFormatContext->nb_streams, format_ctx->nb_streams,
"). Found: ", "). Found: ",
i); i);
TORCH_CHECK( TORCH_CHECK(
pFormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO, format_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO,
"Stream ", "Stream ",
i, i,
" is not video type."); " is not video type.");
...@@ -329,9 +325,9 @@ void StreamWriter::write_packet(const AVPacketPtr& packet) { ...@@ -329,9 +325,9 @@ void StreamWriter::write_packet(const AVPacketPtr& packet) {
void StreamWriter::write_frame(int i, AVFrame* frame) { void StreamWriter::write_frame(int i, AVFrame* frame) {
TORCH_CHECK(is_open, "Output is not opened. Did you call `open` method?"); TORCH_CHECK(is_open, "Output is not opened. Did you call `open` method?");
TORCH_CHECK( TORCH_CHECK(
0 <= i && i < static_cast<int>(pFormatContext->nb_streams), 0 <= i && i < static_cast<int>(format_ctx->nb_streams),
"Invalid stream index. Index must be in range of [0, ", "Invalid stream index. Index must be in range of [0, ",
pFormatContext->nb_streams, format_ctx->nb_streams,
"). Found: ", "). Found: ",
i); i);
processes.at(i).process_frame(frame); processes.at(i).process_frame(frame);
......
...@@ -14,7 +14,7 @@ namespace io { ...@@ -14,7 +14,7 @@ namespace io {
/// Encode and write audio/video streams chunk by chunk /// Encode and write audio/video streams chunk by chunk
/// ///
class StreamWriter { class StreamWriter {
AVFormatOutputContextPtr pFormatContext; AVFormatOutputContextPtr format_ctx;
std::map<int, EncodeProcess> processes; std::map<int, EncodeProcess> processes;
std::map<int, PacketWriter> packet_writers; std::map<int, PacketWriter> packet_writers;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment