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

Side by Side Diff: media/capture/video/file_video_capture_device.cc

Issue 2593673003: Support 420mpeg2 Y4M input in FileVideoCaptureDevice (Closed)
Patch Set: Created 3 years, 12 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/capture/video/file_video_capture_device.h" 5 #include "media/capture/video/file_video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 break; 84 break;
85 } 85 }
86 case 'I': 86 case 'I':
87 // Interlacing is ignored, but we don't like mixed modes. 87 // Interlacing is ignored, but we don't like mixed modes.
88 CHECK_NE(token[0], 'm'); 88 CHECK_NE(token[0], 'm');
89 break; 89 break;
90 case 'A': 90 case 'A':
91 // Pixel aspect ratio ignored. 91 // Pixel aspect ratio ignored.
92 break; 92 break;
93 case 'C': 93 case 'C':
94 CHECK(token == "420" || token == "420jpeg" || token == "420paldv") 94 CHECK(token == "420" || token == "420jpeg" || token == "420mpeg2" ||
95 token == "420paldv")
mcasas 2016/12/20 19:57:19 Funny formatting, but if git cl format media is ok
95 << token; // Only I420 is supported, and we fudge the variants. 96 << token; // Only I420 is supported, and we fudge the variants.
96 break; 97 break;
97 default: 98 default:
98 break; 99 break;
99 } 100 }
100 // We're done if we have found a newline character right after the token. 101 // We're done if we have found a newline character right after the token.
101 if (file_header[blank_position] == '\n') 102 if (file_header[blank_position] == '\n')
102 break; 103 break;
103 index = blank_position + 1; 104 index = blank_position + 1;
104 } 105 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 if (next_frame_time_ < current_time) 387 if (next_frame_time_ < current_time)
387 next_frame_time_ = current_time; 388 next_frame_time_ = current_time;
388 } 389 }
389 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 390 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
390 FROM_HERE, base::Bind(&FileVideoCaptureDevice::OnCaptureTask, 391 FROM_HERE, base::Bind(&FileVideoCaptureDevice::OnCaptureTask,
391 base::Unretained(this)), 392 base::Unretained(this)),
392 next_frame_time_ - current_time); 393 next_frame_time_ - current_time);
393 } 394 }
394 395
395 } // namespace media 396 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698