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

Unified Diff: content/browser/media/capture/content_video_capture_device_core.h

Issue 267813002: Revert of Use texture-backed VideoFrame pipeline for Aura desktop capturing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | content/browser/media/capture/content_video_capture_device_core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/content_video_capture_device_core.h
diff --git a/content/browser/media/capture/content_video_capture_device_core.h b/content/browser/media/capture/content_video_capture_device_core.h
index 119296cd691f0abd01e137fcf6a4ae59974a0739..992caa74b6ce360c890be5e0ec5d96226fca1918 100644
--- a/content/browser/media/capture/content_video_capture_device_core.h
+++ b/content/browser/media/capture/content_video_capture_device_core.h
@@ -13,15 +13,16 @@
#include "base/threading/thread_checker.h"
#include "content/browser/media/capture/video_capture_oracle.h"
#include "content/common/content_export.h"
-#include "media/base/video_frame.h"
#include "media/video/capture/video_capture_device.h"
namespace media {
-class VideoCaptureParams;
class VideoFrame;
} // namespace media
namespace content {
+
+const int kMinFrameWidth = 2;
+const int kMinFrameHeight = 2;
// Returns the nearest even integer closer to zero.
template<typename IntType>
@@ -51,12 +52,11 @@
const media::VideoCaptureParams& params);
// Called when a captured frame is available or an error has occurred.
- // If |success| is true then |frame| is valid and |timestamp| indicates when
- // the frame was painted.
- // If |success| is false, all other parameters are invalid.
- typedef base::Callback<void(const scoped_refptr<media::VideoFrame>& frame,
- base::TimeTicks timestamp,
- bool success)> CaptureFrameCallback;
+ // If |success| is true then the frame provided is valid and |timestamp|
+ // indicates when the frame was painted.
+ // If |success| is false, both the frame provided and |timestamp| are invalid.
+ typedef base::Callback<void(base::TimeTicks timestamp, bool success)>
+ CaptureFrameCallback;
bool ObserveEventAndDecideCapture(VideoCaptureOracle::Event event,
base::TimeTicks event_time,
@@ -86,9 +86,9 @@
// Callback invoked on completion of all captures.
void DidCaptureFrame(
- int frame_number,
const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer,
const scoped_refptr<media::VideoFrame>& frame,
+ int frame_number,
base::TimeTicks timestamp,
bool success);
@@ -102,13 +102,14 @@
const scoped_ptr<VideoCaptureOracle> oracle_;
// The video capture parameters used to construct the oracle proxy.
- media::VideoCaptureParams params_;
+ const media::VideoCaptureParams params_;
// Indicates if capture size has been updated after construction.
bool capture_size_updated_;
- // The current capturing format, as a media::VideoFrame::Format.
- media::VideoFrame::Format video_frame_format_;
+ // The current capturing resolution and frame rate.
+ gfx::Size capture_size_;
+ int frame_rate_;
};
// Keeps track of the video capture source frames and executes copying on the
@@ -123,8 +124,8 @@
// Starts capturing. Returns true if succeeded.
// Must be run on the UI BrowserThread.
- virtual bool Start(const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy,
- const media::VideoCaptureParams& params) = 0;
+ virtual bool Start(
+ const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy) = 0;
// Stops capturing. Must be run on the UI BrowserThread.
// |callback| is invoked after the capturing has stopped.
« no previous file with comments | « no previous file | content/browser/media/capture/content_video_capture_device_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698