clang format
This commit is contained in:
parent
c906a873e0
commit
c02b8c7819
@ -112,9 +112,7 @@ void writeTimestamp(uint8_t* buffer, time_t time)
|
|||||||
bool canUse8BitUnicode(const std::string& utf8Str)
|
bool canUse8BitUnicode(const std::string& utf8Str)
|
||||||
{
|
{
|
||||||
bool rv = true;
|
bool rv = true;
|
||||||
convertUTF::IterateUTF8Chars(utf8Str,
|
convertUTF::IterateUTF8Chars(utf8Str, [&](auto c) {
|
||||||
[&](auto c)
|
|
||||||
{
|
|
||||||
rv = (c < 0x100);
|
rv = (c < 0x100);
|
||||||
return rv;
|
return rv;
|
||||||
});
|
});
|
||||||
@ -142,9 +140,7 @@ std::vector<std::uint8_t> serializeDString(const std::string& str, size_t fieldL
|
|||||||
if (canUse8BitUnicode(utf8Str))
|
if (canUse8BitUnicode(utf8Str))
|
||||||
{
|
{
|
||||||
rv.push_back(8);
|
rv.push_back(8);
|
||||||
IterateUTF8Chars(utf8Str,
|
IterateUTF8Chars(utf8Str, [&](auto c) {
|
||||||
[&](auto c)
|
|
||||||
{
|
|
||||||
rv.push_back(c);
|
rv.push_back(c);
|
||||||
return rv.size() < maxHeaderAndContentLength;
|
return rv.size() < maxHeaderAndContentLength;
|
||||||
});
|
});
|
||||||
@ -152,9 +148,7 @@ std::vector<std::uint8_t> serializeDString(const std::string& str, size_t fieldL
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
rv.push_back(16);
|
rv.push_back(16);
|
||||||
IterateUTF8Chars(utf8Str,
|
IterateUTF8Chars(utf8Str, [&](auto c) {
|
||||||
[&](auto c)
|
|
||||||
{
|
|
||||||
UTF16 high_surrogate, low_surrogate;
|
UTF16 high_surrogate, low_surrogate;
|
||||||
std::tie(high_surrogate, low_surrogate) = ConvertUTF32toUTF16(c);
|
std::tie(high_surrogate, low_surrogate) = ConvertUTF32toUTF16(c);
|
||||||
auto spaceLeft = maxHeaderAndContentLength - rv.size();
|
auto spaceLeft = maxHeaderAndContentLength - rv.size();
|
||||||
|
@ -652,7 +652,8 @@ void TsMuxerWindow::onTsMuxerCodecInfoReceived()
|
|||||||
}
|
}
|
||||||
if (fileDuration == 0 && !mplsFileList.isEmpty())
|
if (fileDuration == 0 && !mplsFileList.isEmpty())
|
||||||
{
|
{
|
||||||
foreach (const MPLSFileInfo &mplsFile, mplsFileList) fileDuration += mplsFile.duration;
|
foreach (const MPLSFileInfo &mplsFile, mplsFileList)
|
||||||
|
fileDuration += mplsFile.duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_updateMeta = true;
|
m_updateMeta = true;
|
||||||
@ -1330,7 +1331,8 @@ void TsMuxerWindow::updateCustomChapters()
|
|||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
ChapterList chapters = item->data(ChaptersRole).value<ChapterList>();
|
ChapterList chapters = item->data(ChaptersRole).value<ChapterList>();
|
||||||
foreach (double chapter, chapters) chaptersSet << qint64((chapter + offset) * 1000000);
|
foreach (double chapter, chapters)
|
||||||
|
chaptersSet << qint64((chapter + offset) * 1000000);
|
||||||
prevDuration = item->data(FileDurationRole).toDouble();
|
prevDuration = item->data(FileDurationRole).toDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user