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

Unified Diff: media/base/video_capturer_source.h

Issue 1005583003: VideoCapturerSource: cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try again removing the .cpp file entirely, and leaving the dtor in the header file Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/video_capturer_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_capturer_source.h
diff --git a/media/base/video_capturer_source.h b/media/base/video_capturer_source.h
index dc37e96aec99f64da807aee0003b42b689d1a372..b041c6d56240136a7e381c5fa8928009347fce89 100644
--- a/media/base/video_capturer_source.h
+++ b/media/base/video_capturer_source.h
@@ -1,28 +1,29 @@
-// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_
-#define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_
+#ifndef MEDIA_BASE_VIDEO_CAPTURER_SOURCE_H_
+#define MEDIA_BASE_VIDEO_CAPTURER_SOURCE_H_
-#include <string>
-#include <vector>
-
-#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
-#include "base/single_thread_task_runner.h"
#include "media/base/media_export.h"
#include "media/base/video_capture_types.h"
-#include "media/base/video_frame.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
namespace media {
+class VideoFrame;
+
// VideoCapturerSource is an interface representing the source for
// captured video. An implementation will periodically call the frame
// callback with new video frames.
class MEDIA_EXPORT VideoCapturerSource {
public:
- virtual ~VideoCapturerSource();
+ virtual ~VideoCapturerSource() = default;
// This callback is used to deliver video frames.
//
@@ -40,14 +41,14 @@ class MEDIA_EXPORT VideoCapturerSource {
// frame relative to the first frame generated by the corresponding source.
// Because a source can start generating frames before a subscriber is added,
// the first video frame delivered may not have timestamp equal to 0.
- typedef base::Callback<void(
- const scoped_refptr<media::VideoFrame>& video_frame,
- base::TimeTicks estimated_capture_time)> VideoCaptureDeliverFrameCB;
+ using VideoCaptureDeliverFrameCB =
+ base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
+ base::TimeTicks estimated_capture_time)>;
- typedef base::Callback<void(const media::VideoCaptureFormats&)>
- VideoCaptureDeviceFormatsCB;
+ using VideoCaptureDeviceFormatsCB =
+ base::Callback<void(const VideoCaptureFormats&)>;
- typedef base::Callback<void(bool)> RunningCallback;
+ using RunningCallback = base::Callback<void(bool)>;
// Collects the formats that can currently be used.
// |max_requested_height|, |max_requested_width|, and
@@ -72,7 +73,7 @@ class MEDIA_EXPORT VideoCapturerSource {
// |running_callback| will always be called on the same thread as the
// StartCapture.
virtual void StartCapture(
- const media::VideoCaptureParams& params,
+ const VideoCaptureParams& params,
const VideoCaptureDeliverFrameCB& new_frame_callback,
scoped_refptr<base::SingleThreadTaskRunner> frame_callback_task_runner,
const RunningCallback& running_callback) = 0;
@@ -86,4 +87,4 @@ class MEDIA_EXPORT VideoCapturerSource {
} // namespace media
-#endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_
+#endif // MEDIA_BASE_VIDEO_CAPTURER_SOURCE_H_
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/video_capturer_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698