Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -33,7 +33,7 @@ bool H264CMSampleBufferToAnnexBBuffer(
|
||||
CMSampleBufferRef avcc_sample_buffer,
|
||||
bool is_keyframe,
|
||||
rtc::Buffer* annexb_buffer,
|
||||
std::unique_ptr<RTPFragmentationHeader> *out_header) {
|
||||
std::unique_ptr<RTPFragmentationHeader>* out_header) {
|
||||
RTC_DCHECK(avcc_sample_buffer);
|
||||
RTC_DCHECK(out_header);
|
||||
out_header->reset(nullptr);
|
||||
|
@ -33,7 +33,7 @@ bool H264CMSampleBufferToAnnexBBuffer(
|
||||
CMSampleBufferRef avcc_sample_buffer,
|
||||
bool is_keyframe,
|
||||
rtc::Buffer* annexb_buffer,
|
||||
std::unique_ptr<RTPFragmentationHeader> *out_header);
|
||||
std::unique_ptr<RTPFragmentationHeader>* out_header);
|
||||
|
||||
// Converts a buffer received from RTP into a sample buffer suitable for the
|
||||
// VideoToolbox decoder. The RTP buffer is in annex b format whereas the sample
|
||||
|
@ -25,14 +25,11 @@ static const uint8_t NALU_TEST_DATA_1[] = {0xDE, 0xAD, 0xBE, 0xEF};
|
||||
|
||||
TEST(H264VideoToolboxNaluTest, TestCreateVideoFormatDescription) {
|
||||
const uint8_t sps_pps_buffer[] = {
|
||||
// SPS nalu.
|
||||
0x00, 0x00, 0x00, 0x01,
|
||||
0x27, 0x42, 0x00, 0x1E, 0xAB, 0x40, 0xF0, 0x28, 0xD3, 0x70, 0x20, 0x20,
|
||||
0x20, 0x20,
|
||||
// PPS nalu.
|
||||
0x00, 0x00, 0x00, 0x01,
|
||||
0x28, 0xCE, 0x3C, 0x30
|
||||
};
|
||||
// SPS nalu.
|
||||
0x00, 0x00, 0x00, 0x01, 0x27, 0x42, 0x00, 0x1E, 0xAB, 0x40, 0xF0, 0x28,
|
||||
0xD3, 0x70, 0x20, 0x20, 0x20, 0x20,
|
||||
// PPS nalu.
|
||||
0x00, 0x00, 0x00, 0x01, 0x28, 0xCE, 0x3C, 0x30};
|
||||
CMVideoFormatDescriptionRef description =
|
||||
CreateVideoFormatDescription(sps_pps_buffer, arraysize(sps_pps_buffer));
|
||||
EXPECT_TRUE(description);
|
||||
@ -59,8 +56,8 @@ TEST(H264VideoToolboxNaluTest, TestCreateVideoFormatDescription) {
|
||||
}
|
||||
|
||||
const uint8_t other_buffer[] = {0x00, 0x00, 0x00, 0x01, 0x28};
|
||||
EXPECT_FALSE(CreateVideoFormatDescription(other_buffer,
|
||||
arraysize(other_buffer)));
|
||||
EXPECT_FALSE(
|
||||
CreateVideoFormatDescription(other_buffer, arraysize(other_buffer)));
|
||||
}
|
||||
|
||||
TEST(AnnexBBufferReaderTest, TestReadEmptyInput) {
|
||||
|
Reference in New Issue
Block a user