Merge pull request #535 from jcdr428/master

Add isSecondary() Method

Methods were missing in DTS and AC3 streamreaders.
This commit is contained in:
jcdr428 2022-01-03 21:46:15 +01:00 committed by GitHub
commit b0adc81369
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,8 @@ bool AC3StreamReader::isPriorityData(AVPacket* packet)
return (packet->size >= 2 && packet->data[0] == 0x0B && packet->data[1] == 0x77 && m_bsid <= 10);
}
bool AC3StreamReader::isSecondary() { return m_secondary; };
void AC3StreamReader::writePESExtension(PESPacket* pesPacket, const AVPacket& avPacket)
{
if (m_useNewStyleAudioPES)

View File

@ -36,6 +36,7 @@ class AC3StreamReader : public SimplePacketizerReader, public AC3Codec
int getChannels() override { return AC3Codec::m_channels; }
bool isPriorityData(AVPacket* packet) override;
bool isIFrame(AVPacket* packet) override { return isPriorityData(packet); }
bool isSecondary();
protected:
int getHeaderLen() override { return AC3Codec::getHeaderLen(); }

View File

@ -425,6 +425,8 @@ bool DTSStreamReader::isPriorityData(AVPacket* packet)
(packet->data[0] == 0xfe && packet->data[1] == 0x7f));
}
bool DTSStreamReader::isSecondary() { return m_secondary; }
int DTSStreamReader::decodeFrame(uint8_t* buff, uint8_t* end, int& skipBytes, int& skipBeforeBytes)
{
uint8_t* afterFrameData = buff;

View File

@ -64,6 +64,7 @@ class DTSStreamReader : public SimplePacketizerReader
bool isPriorityData(AVPacket* packet) override;
bool isIFrame(AVPacket* packet) override { return isPriorityData(packet); }
void setTestMode(bool value) override { m_testMode = value; }
bool isSecondary();
protected:
int getHeaderLen() override { return DTS_HEADER_SIZE; };