Skip to content

Commit

Permalink
clang format check
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdr428 committed Aug 9, 2023
1 parent edd118f commit 300874a
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion tsMuxer/ac3Codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static constexpr uint16_t ff_ac3_freqs[3] = {48000, 44100, 32000};

// possible bitrates
static constexpr uint16_t ff_ac3_bitratetab[19] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160,
192, 224, 256, 320, 384, 448, 512, 576, 640};
192, 224, 256, 320, 384, 448, 512, 576, 640};

static constexpr uint16_t ff_ac3_frame_sizes[38][3] = {
{64, 69, 96}, {64, 70, 96}, {80, 87, 120}, {80, 88, 120}, {96, 104, 144},
Expand Down
6 changes: 3 additions & 3 deletions tsMuxer/dtsStreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <sstream>

// static const int DCA_EXT_CORE = 0x001; ///< core in core substream
static constexpr int DCA_EXT_XXCH = 0x002; ///< XXCh channels extension in core substream
static constexpr int DCA_EXT_X96 = 0x004; ///< 96/24 extension in core substream
static constexpr int DCA_EXT_XCH = 0x008; ///< XCh channel extension in core substream
static constexpr int DCA_EXT_XXCH = 0x002; ///< XXCh channels extension in core substream
static constexpr int DCA_EXT_X96 = 0x004; ///< 96/24 extension in core substream
static constexpr int DCA_EXT_XCH = 0x008; ///< XCh channel extension in core substream
// static const int DCA_EXT_EXSS_CORE = 0x010; ///< core in ExSS (extension substream)
// static const int DCA_EXT_EXSS_XBR = 0x020; ///< extended bitrate extension in ExSS
// static const int DCA_EXT_EXSS_XXCH = 0x040; ///< XXCh channels extension in ExSS
Expand Down
4 changes: 2 additions & 2 deletions tsMuxer/h264StreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ int H264StreamReader::processSPS(uint8_t *buff)
return 0; // already processed
}

auto* sps = new SPSUnit();
auto *sps = new SPSUnit();
uint8_t *nextNal = NALUnit::findNALWithStartCode(buff, m_bufEnd, true);
int oldSpsLen = (int)(nextNal - buff);
sps->decodeBuffer(buff, nextNal);
Expand Down Expand Up @@ -1406,7 +1406,7 @@ int H264StreamReader::processSPS(uint8_t *buff)

int H264StreamReader::processPPS(uint8_t *buff)
{
auto* pps = new PPSUnit();
auto *pps = new PPSUnit();
uint8_t *nextNal = NALUnit::findNALWithStartCode(buff, m_bufEnd, true);

pps->decodeBuffer(buff, nextNal);
Expand Down
3 changes: 1 addition & 2 deletions tsMuxer/ioContextDemuxer.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include "ioContextDemuxer.h"

#include <cmath>
#include <types/types.h>
#include <cmath>

#include "abstractStreamReader.h"
#include <climits>
#include "vodCoreException.h"

using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion tsMuxer/iso_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ void IsoWriter::allocateMetadata()
writer.writeLE32(0); // reserved
writer.writeLE32(0); // reserved

for (auto& mappingEntry : m_mappingEntries)
for (auto &mappingEntry : m_mappingEntries)
{
writer.writeLE32(mappingEntry.first); // unique ID
writer.writeLE32(mappingEntry.second.parentLBN);
Expand Down
3 changes: 1 addition & 2 deletions tsMuxer/main.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#include <fs/directory.h>
#include <fs/textfile.h>

#include <algorithm>
#include <iostream>
#include <vector>

#include <cmath>
#include "blank_patterns.h"
#include "blurayHelper.h"
#include "convertUTF.h"
#include "iso_writer.h"
#include <cmath>
#include "metaDemuxer.h"
#include "mpegStreamReader.h"
#include "muxerManager.h"
Expand Down
3 changes: 1 addition & 2 deletions tsMuxer/metaDemuxer.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@


#include "metaDemuxer.h"

#include <fs/directory.h>
#include <fs/textfile.h>
#include <types/types.h>
#include <climits>

#include "aacStreamReader.h"
#include "ac3StreamReader.h"
Expand All @@ -14,7 +14,6 @@
#include "dvbSubStreamReader.h"
#include "h264StreamReader.h"
#include "hevcStreamReader.h"
#include <climits>
#include "lpcmStreamReader.h"
#include "matroskaDemuxer.h"
#include "mlpStreamReader.h"
Expand Down
6 changes: 4 additions & 2 deletions tsMuxer/metaDemuxer.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ class METADemuxer : public AbstractDemuxer

friend class ContainerToReaderWrapper;

static AbstractStreamReader* createCodec(const std::string& codecName, const std::map<std::string, std::string>& addParams,
const std::string& codecStreamName, const std::vector<MPLSPlayItem>& mplsInfo);
static AbstractStreamReader* createCodec(const std::string& codecName,
const std::map<std::string, std::string>& addParams,
const std::string& codecStreamName,
const std::vector<MPLSPlayItem>& mplsInfo);
inline void updateReport(bool checkTime);
void lineBack();
static CheckStreamRez detectTrackReader(uint8_t* tmpBuffer, int len,
Expand Down
12 changes: 6 additions & 6 deletions tsMuxer/movDemuxer.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "movDemuxer.h"

#include <algorithm>
#include <climits>

#include "aac.h"
#include "abstractStreamReader.h"
#include "avPacket.h"
#include "bitStream.h"
#include "hevc.h"
#include <climits>
#include "subTrackFilter.h"
#include "vodCoreException.h"
#include "vvc.h"
Expand All @@ -33,12 +33,12 @@ static constexpr char* const mov_mdhd_language_map[] = {
"rus", "zho", "nld", "gle", "alb", "ron", "ces", "slk", "slv", "yid", "srp", "mkd", "bul", "ukr", "bel", "uzb",
"kaz", "aze", "aze", "arm", "geo", "ron", "kir", "tgk", "tuk", "mon", "mon", "pus", "kur", "kas", "snd", "tib",
"nep", "san", "mar", "ben", "asm", "guj", "pa ", "ori", "mal", "kan", "tam", "tel", "sin", "bur", "khm", "lao",
"vie", "ind", "tgl", "may", "may", "amh", "tir", "orm", "som", "swa", "kin", "run", "nya", "mlg", "epo", nullptr, nullptr,
nullptr, nullptr, nullptr,
"vie", "ind", "tgl", "may", "may", "amh", "tir", "orm", "som", "swa", "kin", "run", "nya", "mlg", "epo", nullptr,
nullptr, nullptr, nullptr, nullptr,
/* 100 */
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "cym", "eus", "cat", "lat", "que", "grn", "aym", "crh", "uig",
"dzo", "jav"};
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, "cym", "eus", "cat", "lat", "que", "grn", "aym", "crh", "uig", "dzo", "jav"};

struct MOVStts
{
Expand Down
4 changes: 1 addition & 3 deletions tsMuxer/nalUnits.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

#include "nalUnits.h"
#include <cassert>
#include <fs/systemlog.h>

#include <sstream>

#include "bitStream.h"
#include "nalUnits.h"
#include "vod_common.h"

uint8_t BDROM_METADATA_GUID[] = "\x17\xee\x8c\x60\xf8\x4d\x11\xd9\x8c\xd6\x08\x00\x20\x0c\x9a\x66";
Expand Down
2 changes: 1 addition & 1 deletion tsMuxer/nalUnits.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class NALUnit
static int encodeNAL(uint8_t* srcBuffer, uint8_t* srcEnd, uint8_t* dstBuffer, size_t dstBufferSize);
static int decodeNAL(const uint8_t* srcBuffer, const uint8_t* srcEnd, uint8_t* dstBuffer, size_t dstBufferSize);
static int decodeNAL2(uint8_t* srcBuffer, uint8_t* srcEnd, uint8_t* dstBuffer, size_t dstBufferSize,
bool* keepSrcBuffer); // do not copy buffer if nothink to decode
bool* keepSrcBuffer); // do not copy buffer if nothink to decode
int deserialize(uint8_t* buffer, uint8_t* end);
virtual int serializeBuffer(uint8_t* dstBuffer, uint8_t* dstEnd, bool writeStartCode) const;
int serialize(uint8_t* dstBuffer);
Expand Down
3 changes: 1 addition & 2 deletions tsMuxer/psgStreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
#include "psgStreamReader.h"

#include <fs/systemlog.h>

#include <cmath>
#include <sstream>
#include <string>

#include "avCodecs.h"
#include "ioContextDemuxer.h"
#include <cmath>
#include "tsMuxer.h"
#include "vodCoreException.h"
#include "vod_common.h"
Expand Down
11 changes: 8 additions & 3 deletions tsMuxer/tsPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@

#include <fs/file.h>
#include <fs/systemlog.h>

#include <cmath>
#include <string>

#include "bitStream.h"
#include "crc32.h"
#include "h264StreamReader.h"
#include <cmath>
#include "mpegStreamReader.h"
#include "simplePacketizerReader.h"
#include "tsMuxer.h"
Expand Down Expand Up @@ -2641,7 +2640,13 @@ MPLSStreamInfo::MPLSStreamInfo(const MPLSStreamInfo& other) : M2TSStreamInfo(oth
// -------------- MPLSStreamInfo -----------------------

MPLSStreamInfo::MPLSStreamInfo()
: M2TSStreamInfo(), type(0), offsetId(0xff), isSSPG(false), SS_PG_offset_sequence_id(0xff), leftEye(nullptr), rightEye(nullptr)
: M2TSStreamInfo(),
type(0),
offsetId(0xff),
isSSPG(false),
SS_PG_offset_sequence_id(0xff),
leftEye(nullptr),
rightEye(nullptr)
{
}

Expand Down
2 changes: 1 addition & 1 deletion tsMuxer/tsPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ class CLPIParser

private:
static void parseProgramInfo(uint8_t* buffer, uint8_t* end, std::vector<CLPIProgramInfo>& programInfo,
std::map<int, CLPIStreamInfo>& streamInfo);
std::map<int, CLPIStreamInfo>& streamInfo);
void parseSequenceInfo(uint8_t* buffer, uint8_t* end);
static void parseCPI(uint8_t* buffer, uint8_t* end);
static void EP_map(BitStreamReader& reader);
Expand Down
2 changes: 1 addition & 1 deletion tsMuxer/vod_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#include <fs/directory.h>

#include <cmath>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>

using namespace std;

Expand Down

0 comments on commit 300874a

Please sign in to comment.