Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: media/formats/mp2t/es_adapter_video_unittest.cc

Issue 1786733004: Revert of media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/filters/source_buffer_stream_unittest.cc ('k') | media/formats/mp2t/es_parser_adts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 namespace mp2t { 25 namespace mp2t {
26 26
27 namespace { 27 namespace {
28 28
29 VideoDecoderConfig CreateFakeVideoConfig() { 29 VideoDecoderConfig CreateFakeVideoConfig() {
30 gfx::Size coded_size(320, 240); 30 gfx::Size coded_size(320, 240);
31 gfx::Rect visible_rect(0, 0, 320, 240); 31 gfx::Rect visible_rect(0, 0, 320, 240);
32 gfx::Size natural_size(320, 240); 32 gfx::Size natural_size(320, 240);
33 return VideoDecoderConfig(kCodecH264, H264PROFILE_MAIN, PIXEL_FORMAT_I420, 33 return VideoDecoderConfig(kCodecH264, H264PROFILE_MAIN, PIXEL_FORMAT_I420,
34 COLOR_SPACE_UNSPECIFIED, coded_size, visible_rect, 34 COLOR_SPACE_UNSPECIFIED, coded_size, visible_rect,
35 natural_size, EmptyExtraData(), Unencrypted()); 35 natural_size, EmptyExtraData(), false);
36 } 36 }
37 37
38 StreamParserBuffer::BufferQueue 38 StreamParserBuffer::BufferQueue
39 GenerateFakeBuffers(const int* frame_pts_ms, 39 GenerateFakeBuffers(const int* frame_pts_ms,
40 const bool* is_key_frame, 40 const bool* is_key_frame,
41 size_t frame_count) { 41 size_t frame_count) {
42 uint8_t dummy_buffer[] = {0, 0, 0, 0}; 42 uint8_t dummy_buffer[] = {0, 0, 0, 0};
43 43
44 StreamParserBuffer::BufferQueue buffers(frame_count); 44 StreamParserBuffer::BufferQueue buffers(frame_count);
45 for (size_t k = 0; k < frame_count; k++) { 45 for (size_t k = 0; k < frame_count; k++) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 bool is_key_frame[] = {false, false, false, true, false, false}; 163 bool is_key_frame[] = {false, false, false, true, false, false};
164 StreamParserBuffer::BufferQueue buffer_queue = 164 StreamParserBuffer::BufferQueue buffer_queue =
165 GenerateFakeBuffers(pts_ms, is_key_frame, arraysize(pts_ms)); 165 GenerateFakeBuffers(pts_ms, is_key_frame, arraysize(pts_ms));
166 166
167 EXPECT_EQ("(70,Y) (30,Y) (30,N) (30,N)", 167 EXPECT_EQ("(70,Y) (30,Y) (30,N) (30,N)",
168 RunAdapterTest(buffer_queue)); 168 RunAdapterTest(buffer_queue));
169 } 169 }
170 170
171 } // namespace mp2t 171 } // namespace mp2t
172 } // namespace media 172 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/source_buffer_stream_unittest.cc ('k') | media/formats/mp2t/es_parser_adts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698