Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into rename-keyframeon…
Browse files Browse the repository at this point in the history
…lyifneed
  • Loading branch information
naanlizard committed Nov 19, 2024
2 parents 5354e2f + d12b79a commit f214627
Show file tree
Hide file tree
Showing 50 changed files with 1,552 additions and 1,085 deletions.
4 changes: 2 additions & 2 deletions misc/prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PCRE2_VERSION=10.39
OPENH264_VERSION=2.4.0
HIREDIS_VERSION=1.0.2
NVCC_HDR_VERSION=11.1.5.2
X264_VERSION=20191217-2245-stable
X264_VERSION=31e19f92

INTEL_QSV_HWACCELS=false
NETINT_LOGAN_HWACCELS=false
Expand Down Expand Up @@ -113,7 +113,7 @@ install_libx264()
(DIR=${TEMP_PATH}/x264 && \
mkdir -p ${DIR} && \
cd ${DIR} && \
curl -sLf https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264_VERSION}.tar.bz2 | tar -jx --strip-components=1 && \
curl -sLf https://code.videolan.org/videolan/x264/-/archive/master/x264-${X264_VERSION}.tar.bz2 | tar -jx --strip-components=1 && \
./configure --prefix="${PREFIX}" --enable-shared --enable-pic --disable-cli && \
make -j$(nproc) && \
sudo make install && \
Expand Down
10 changes: 0 additions & 10 deletions src/projects/base/info/audio_track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ int32_t AudioTrack::GetSampleRate() const
return (int32_t)_sample.GetRate();
}

void AudioTrack::SetAudioTimestampScale(double scale)
{
_audio_timescale = scale;
}

double AudioTrack::GetAudioTimestampScale() const
{
return _audio_timescale;
}

AudioSample &AudioTrack::GetSample()
{
return _sample;
Expand Down
3 changes: 0 additions & 3 deletions src/projects/base/info/audio_track.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class AudioTrack
void SetSampleRate(int32_t samplerate);
int32_t GetSampleRate() const;

void SetAudioTimestampScale(double scale);
double GetAudioTimestampScale() const;

cmn::AudioSample &GetSample();
const cmn::AudioSample &GetSample() const;

Expand Down
10 changes: 5 additions & 5 deletions src/projects/base/info/decoder_configuration_record.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class DecoderConfigurationRecord
{
public:
std::shared_ptr<ov::Data> GetData()
std::shared_ptr<const ov::Data> GetData()
{
if (_updated)
{
Expand All @@ -16,18 +16,18 @@ class DecoderConfigurationRecord
return _data;
}

virtual bool Parse(const std::shared_ptr<ov::Data> &data) = 0;
virtual bool Parse(const std::shared_ptr<const ov::Data> &data) = 0;
virtual bool IsValid() const = 0;
virtual bool Equals(const std::shared_ptr<DecoderConfigurationRecord> &other) = 0;

// RFC 6381
virtual ov::String GetCodecsParameter() const = 0;

protected:
virtual std::shared_ptr<ov::Data> Serialize() = 0;
virtual std::shared_ptr<const ov::Data> Serialize() = 0;

// Set serialized data
void SetData(const std::shared_ptr<ov::Data> &data)
void SetData(const std::shared_ptr<const ov::Data> &data)
{
_data = data;
_updated = false;
Expand All @@ -39,6 +39,6 @@ class DecoderConfigurationRecord
}

private:
std::shared_ptr<ov::Data> _data = nullptr;
std::shared_ptr<const ov::Data> _data = nullptr;
bool _updated = true;
};
15 changes: 15 additions & 0 deletions src/projects/base/ovlibrary/bit_reader.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "bit_reader.h"

BitReader::BitReader(const uint8_t *buffer, size_t capacity)
: _buffer(buffer),
_position(buffer),
_capacity(capacity)
{
}

BitReader::BitReader(const std::shared_ptr<const ov::Data> &data)
: _buffer(data->GetDataAs<uint8_t>()),
_position(data->GetDataAs<uint8_t>()),
_capacity(data->GetLength())
{
}
Loading

0 comments on commit f214627

Please sign in to comment.