Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_TRACKER_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_TRACKER_H_ |
| 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_TRACKER_H_ | 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_TRACKER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 void set_storage_type(media::VideoPixelStorage storage_type) { | 43 void set_storage_type(media::VideoPixelStorage storage_type) { |
| 44 storage_type_ = storage_type; | 44 storage_type_ = storage_type; |
| 45 } | 45 } |
| 46 bool held_by_producer() const { return held_by_producer_; } | 46 bool held_by_producer() const { return held_by_producer_; } |
| 47 void set_held_by_producer(bool value) { held_by_producer_ = value; } | 47 void set_held_by_producer(bool value) { held_by_producer_ = value; } |
| 48 int consumer_hold_count() const { return consumer_hold_count_; } | 48 int consumer_hold_count() const { return consumer_hold_count_; } |
| 49 void set_consumer_hold_count(int value) { consumer_hold_count_ = value; } | 49 void set_consumer_hold_count(int value) { consumer_hold_count_ = value; } |
| 50 void set_frame_feedback_id(int value) { frame_feedback_id_ = value; } | 50 void set_frame_feedback_id(int value) { frame_feedback_id_ = value; } |
| 51 int frame_feedback_id() { return frame_feedback_id_; } | 51 int frame_feedback_id() { return frame_feedback_id_; } |
| 52 | 52 |
| 53 // Returns a scoped handle to the underlying storage. | 53 virtual std::unique_ptr<VideoCaptureBufferHandle> GetMemoryMappedAccess() = 0; |
| 54 virtual std::unique_ptr<VideoCaptureBufferHandle> GetBufferHandle() = 0; | |
| 55 | |
| 56 virtual mojo::ScopedSharedBufferHandle GetHandleForTransit() = 0; | 54 virtual mojo::ScopedSharedBufferHandle GetHandleForTransit() = 0; |
| 55 virtual base::SharedMemoryHandle | |
| 56 GetNonOwnedSharedMemoryHandleForLegacyIPC() = 0; | |
|
miu
2017/01/13 20:34:38
If you haven't, consider running `git cl format`.
chfremer
2017/01/17 23:35:58
Tried, but seems the auto-formatting tool wants it
| |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 // |dimensions_| may change as a VideoCaptureBufferTracker is re-used, but | 59 // |dimensions_| may change as a VideoCaptureBufferTracker is re-used, but |
| 60 // |max_pixel_count_|, |pixel_format_|, and |storage_type_| are set once for | 60 // |max_pixel_count_|, |pixel_format_|, and |storage_type_| are set once for |
| 61 // the lifetime of a VideoCaptureBufferTracker. | 61 // the lifetime of a VideoCaptureBufferTracker. |
| 62 gfx::Size dimensions_; | 62 gfx::Size dimensions_; |
| 63 size_t max_pixel_count_; | 63 size_t max_pixel_count_; |
| 64 media::VideoPixelFormat pixel_format_; | 64 media::VideoPixelFormat pixel_format_; |
| 65 media::VideoPixelStorage storage_type_; | 65 media::VideoPixelStorage storage_type_; |
| 66 | 66 |
| 67 // Indicates whether this VideoCaptureBufferTracker is currently referenced by | 67 // Indicates whether this VideoCaptureBufferTracker is currently referenced by |
| 68 // the producer. | 68 // the producer. |
| 69 bool held_by_producer_; | 69 bool held_by_producer_; |
| 70 | 70 |
| 71 // Number of consumer processes which hold this VideoCaptureBufferTracker. | 71 // Number of consumer processes which hold this VideoCaptureBufferTracker. |
| 72 int consumer_hold_count_; | 72 int consumer_hold_count_; |
| 73 | 73 |
| 74 int frame_feedback_id_; | 74 int frame_feedback_id_; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace content | 77 } // namespace content |
| 78 | 78 |
| 79 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_TRACKER_H_ | 79 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_TRACKER_H_ |
| OLD | NEW |