OLD | NEW |
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/video/capture/file_video_capture_device.h" | 5 #include "media/video/capture/file_video_capture_device.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
13 #include "media/video/capture/video_capture_types.h" | 13 #include "media/base/video_capture_types.h" |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 static const int kY4MHeaderMaxSize = 200; | 16 static const int kY4MHeaderMaxSize = 200; |
17 static const char kY4MSimpleFrameDelimiter[] = "FRAME"; | 17 static const char kY4MSimpleFrameDelimiter[] = "FRAME"; |
18 static const int kY4MSimpleFrameDelimiterSize = 6; | 18 static const int kY4MSimpleFrameDelimiterSize = 6; |
19 | 19 |
20 int ParseY4MInt(const base::StringPiece& token) { | 20 int ParseY4MInt(const base::StringPiece& token) { |
21 int temp_int; | 21 int temp_int; |
22 CHECK(base::StringToInt(token, &temp_int)) << token; | 22 CHECK(base::StringToInt(token, &temp_int)) << token; |
23 return temp_int; | 23 return temp_int; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 next_on_capture_timedelta = frame_interval; | 249 next_on_capture_timedelta = frame_interval; |
250 } | 250 } |
251 base::MessageLoop::current()->PostDelayedTask( | 251 base::MessageLoop::current()->PostDelayedTask( |
252 FROM_HERE, | 252 FROM_HERE, |
253 base::Bind(&FileVideoCaptureDevice::OnCaptureTask, | 253 base::Bind(&FileVideoCaptureDevice::OnCaptureTask, |
254 base::Unretained(this)), | 254 base::Unretained(this)), |
255 next_on_capture_timedelta); | 255 next_on_capture_timedelta); |
256 } | 256 } |
257 | 257 |
258 } // namespace media | 258 } // namespace media |
OLD | NEW |