reapply clang-format
Change-Id: Ic04e8429b07fe9b7dc15dc836d16ba9f30317ee2
This commit is contained in:
@@ -19,8 +19,7 @@ std::int64_t NanosecondsTo90KhzTicks(std::int64_t nanoseconds) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ParseVP9SuperFrameIndex(const std::uint8_t* frame,
|
bool ParseVP9SuperFrameIndex(const std::uint8_t* frame,
|
||||||
std::size_t frame_length,
|
std::size_t frame_length, Ranges* frame_ranges) {
|
||||||
Ranges* frame_ranges) {
|
|
||||||
if (frame == nullptr || frame_length == 0 || frame_ranges == nullptr)
|
if (frame == nullptr || frame_length == 0 || frame_ranges == nullptr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -46,8 +46,7 @@ std::int64_t NanosecondsTo90KhzTicks(std::int64_t nanoseconds);
|
|||||||
// Returns true and stores frame offsets and lengths in |frame_ranges| when
|
// Returns true and stores frame offsets and lengths in |frame_ranges| when
|
||||||
// |frame| has a valid VP9 super frame index.
|
// |frame| has a valid VP9 super frame index.
|
||||||
bool ParseVP9SuperFrameIndex(const std::uint8_t* frame,
|
bool ParseVP9SuperFrameIndex(const std::uint8_t* frame,
|
||||||
std::size_t frame_length,
|
std::size_t frame_length, Ranges* frame_ranges);
|
||||||
Ranges* frame_ranges);
|
|
||||||
|
|
||||||
// Writes |val| to |fileptr| and returns true upon success.
|
// Writes |val| to |fileptr| and returns true upon success.
|
||||||
bool WriteUint8(std::uint8_t val, std::FILE* fileptr);
|
bool WriteUint8(std::uint8_t val, std::FILE* fileptr);
|
||||||
|
|||||||
@@ -25,10 +25,8 @@ namespace libwebm {
|
|||||||
// Maximum size is 64 bits. Users may call the Check() method to perform minimal
|
// Maximum size is 64 bits. Users may call the Check() method to perform minimal
|
||||||
// validation (size > 0 and <= 64).
|
// validation (size > 0 and <= 64).
|
||||||
struct PesHeaderField {
|
struct PesHeaderField {
|
||||||
PesHeaderField(std::uint64_t value,
|
PesHeaderField(std::uint64_t value, std::uint32_t size_in_bits,
|
||||||
std::uint32_t size_in_bits,
|
std::uint8_t byte_index, std::uint8_t bits_to_shift)
|
||||||
std::uint8_t byte_index,
|
|
||||||
std::uint8_t bits_to_shift)
|
|
||||||
: bits(value),
|
: bits(value),
|
||||||
num_bits(size_in_bits),
|
num_bits(size_in_bits),
|
||||||
index(byte_index),
|
index(byte_index),
|
||||||
@@ -145,7 +143,7 @@ struct BCMVHeader {
|
|||||||
struct PesHeader {
|
struct PesHeader {
|
||||||
const std::uint8_t start_code[4] = {
|
const std::uint8_t start_code[4] = {
|
||||||
0x00, 0x00,
|
0x00, 0x00,
|
||||||
0x01, // 0x000001 is the PES packet start code prefix.
|
0x01, // 0x000001 is the PES packet start code prefix.
|
||||||
0xE0}; // 0xE0 is the minimum video stream ID.
|
0xE0}; // 0xE0 is the minimum video stream ID.
|
||||||
std::uint16_t packet_length = 0; // Number of bytes _after_ this field.
|
std::uint16_t packet_length = 0; // Number of bytes _after_ this field.
|
||||||
PesOptionalHeader optional_header;
|
PesOptionalHeader optional_header;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// Disable MSVC warnings that suggest making code non-portable.
|
// Disable MSVC warnings that suggest making code non-portable.
|
||||||
#pragma warning(disable:4996)
|
#pragma warning(disable : 4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using ::mkvmuxer::AudioTrack;
|
using ::mkvmuxer::AudioTrack;
|
||||||
@@ -46,9 +46,7 @@ namespace test {
|
|||||||
// Base class containing boiler plate stuff.
|
// Base class containing boiler plate stuff.
|
||||||
class MuxerTest : public testing::Test {
|
class MuxerTest : public testing::Test {
|
||||||
public:
|
public:
|
||||||
MuxerTest() {
|
MuxerTest() { Init(); }
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
~MuxerTest() { CloseWriter(); }
|
~MuxerTest() { CloseWriter(); }
|
||||||
|
|
||||||
|
|||||||
@@ -161,15 +161,15 @@ class ParserTest : public testing::Test {
|
|||||||
cue_point = cues->GetNext(cue_point);
|
cue_point = cues->GetNext(cue_point);
|
||||||
}
|
}
|
||||||
const mkvparser::CuePoint::TrackPosition* const track_position =
|
const mkvparser::CuePoint::TrackPosition* const track_position =
|
||||||
cue_point->Find(cues_track);
|
cue_point->Find(cues_track);
|
||||||
const long long cluster_pos = track_position->m_pos + // NOLINT
|
const long long cluster_pos = track_position->m_pos + // NOLINT
|
||||||
segment_->m_start;
|
segment_->m_start;
|
||||||
|
|
||||||
// If a cluster does not begin at |cluster_pos|, then the file is
|
// If a cluster does not begin at |cluster_pos|, then the file is
|
||||||
// incorrect.
|
// incorrect.
|
||||||
long length; // NOLINT
|
long length; // NOLINT
|
||||||
const long long id = // NOLINT
|
const long long id = // NOLINT
|
||||||
mkvparser::ReadUInt(&reader_, cluster_pos, length);
|
mkvparser::ReadUInt(&reader_, cluster_pos, length);
|
||||||
if (id != 0xF43B675) { // ID of Cluster as stored in Cluster class.
|
if (id != 0xF43B675) { // ID of Cluster as stored in Cluster class.
|
||||||
fprintf(stderr, "Error: One or more Cues are invalid.\n");
|
fprintf(stderr, "Error: One or more Cues are invalid.\n");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// Disable MSVC warnings that suggest making code non-portable.
|
// Disable MSVC warnings that suggest making code non-portable.
|
||||||
#pragma warning(disable:4996)
|
#pragma warning(disable : 4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@@ -59,7 +59,5 @@ bool CompareFiles(const std::string& file1, const std::string& file2) {
|
|||||||
return std::feof(f1.get()) && std::feof(f2.get());
|
return std::feof(f1.get()) && std::feof(f2.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
} // namespace libwebm
|
} // namespace libwebm
|
||||||
|
|||||||
Reference in New Issue
Block a user