Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
getroot committed Mar 15, 2024
2 parents 9f172e7 + b57d01c commit 02e3a95
Show file tree
Hide file tree
Showing 17 changed files with 1,115 additions and 1,246 deletions.
4 changes: 4 additions & 0 deletions src/projects/base/info/audio_track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ using namespace cmn;
AudioTrack::AudioTrack()
{
_channel_layout.SetLayout(AudioChannel::Layout::LayoutUnknown);

// The default frame size of the audio frame is fixed to 1024.
// If the frame size is different, settings must be made in an audio encoder or provider.
_audio_samples_per_frame = 1024;
}

void AudioTrack::SetSampleRate(int32_t sample_rate)
Expand Down
2 changes: 1 addition & 1 deletion src/projects/base/info/record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ namespace info
info.AppendFormat(" sequence(%d)", _sequence);
info.AppendFormat(" tmp_path(%s)", _tmp_path.CStr());
info.AppendFormat(" file_path(%s)", _output_file_path.CStr());
info.AppendFormat(" info_path(%s)", _output_file_path.CStr());
info.AppendFormat(" info_path(%s)", _output_info_path.CStr());
info.AppendFormat(" bytes(%lld)", _record_bytes);
info.AppendFormat(" total_bytes(%lld)", _record_total_bytes);
info.AppendFormat(" total_time(%lld)", _record_total_time);
Expand Down
11 changes: 11 additions & 0 deletions src/projects/base/ovlibrary/byte_ordering.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ struct uint24_t
{
}

uint24_t()
{
data = 0U;
}

uint24_t(const uint24_t &value) noexcept = default;
uint24_t(uint24_t &&value) noexcept = default;

Expand All @@ -55,6 +60,12 @@ struct uint24_t
{
return data;
}

uint24_t &operator=(const uint24_t &value) noexcept
{
data = value.data;
return *this;
}
};
#pragma pack(pop)

Expand Down
4 changes: 2 additions & 2 deletions src/projects/base/ovsocket/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ namespace ov
*total_sent_bytes += sent;
}

logtp("[#%d] %zu bytes sent", total_sent_bytes);
logtp("[#%d] %zu bytes sent", socket_handle, *total_sent_bytes);

return true;
}
Expand All @@ -1406,7 +1406,7 @@ namespace ov
data_length,
remote_address.ToString().CStr(), local_address.ToString().CStr());

size_t total_sent_bytes;
size_t total_sent_bytes = 0;
bool sent = false;

switch (_family)
Expand Down
2 changes: 1 addition & 1 deletion src/projects/modules/ffmpeg/ffmpeg_conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,8 @@ namespace ffmpeg
return false;
}

av_stream->start_time = 0;
av_stream->time_base = AVRational{media_track->GetTimeBase().GetNum(), media_track->GetTimeBase().GetDen()};

AVCodecParameters* codecpar = av_stream->codecpar;
codecpar->codec_type = ToAVMediaType(media_track->GetMediaType());
codecpar->codec_id = ToAVCodecId(media_track->GetCodecId());
Expand Down
Loading

0 comments on commit 02e3a95

Please sign in to comment.