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

Side by Side Diff: media/capture/video/video_capture_buffer_pool.h

Issue 2518143004: [Mojo Video Capture] Replace RESOURCE_UTILIZATION with interface ReceiverLoadObserver (Closed)
Patch Set: Fix for android-only code Created 4 years 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
OLDNEW
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_POOL_H_ 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_POOL_H_
6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_POOL_H_ 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_POOL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "media/capture/capture_export.h" 9 #include "media/capture/capture_export.h"
10 #include "media/capture/video_capture_types.h" 10 #include "media/capture/video_capture_types.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // producer) until ownership is transferred either to the consumer via 57 // producer) until ownership is transferred either to the consumer via
58 // HoldForConsumers(), or back to the pool with 58 // HoldForConsumers(), or back to the pool with
59 // RelinquishProducerReservation(). 59 // RelinquishProducerReservation().
60 // 60 //
61 // On occasion, this call will decide to free an old buffer to make room for a 61 // On occasion, this call will decide to free an old buffer to make room for a
62 // new allocation at a larger size. If so, the ID of the destroyed buffer is 62 // new allocation at a larger size. If so, the ID of the destroyed buffer is
63 // returned via |buffer_id_to_drop|. 63 // returned via |buffer_id_to_drop|.
64 virtual int ReserveForProducer(const gfx::Size& dimensions, 64 virtual int ReserveForProducer(const gfx::Size& dimensions,
65 media::VideoPixelFormat format, 65 media::VideoPixelFormat format,
66 media::VideoPixelStorage storage, 66 media::VideoPixelStorage storage,
67 int frame_feedback_id,
67 int* buffer_id_to_drop) = 0; 68 int* buffer_id_to_drop) = 0;
68 69
69 // Indicate that a buffer held for the producer should be returned back to the 70 // Indicate that a buffer held for the producer should be returned back to the
70 // pool without passing on to the consumer. This effectively is the opposite 71 // pool without passing on to the consumer. This effectively is the opposite
71 // of ReserveForProducer(). 72 // of ReserveForProducer().
72 virtual void RelinquishProducerReservation(int buffer_id) = 0; 73 virtual void RelinquishProducerReservation(int buffer_id) = 0;
73 74
74 // Attempt to reserve the same buffer that was relinquished in the last call 75 // Attempt to reserve the same buffer that was relinquished in the last call
75 // to RelinquishProducerReservation(). If the buffer is not still being 76 // to RelinquishProducerReservation(). If the buffer is not still being
76 // consumed, and has not yet been re-used since being consumed, and the 77 // consumed, and has not yet been re-used since being consumed, and the
(...skipping 23 matching lines...) Expand all
100 protected: 101 protected:
101 virtual ~VideoCaptureBufferPool() {} 102 virtual ~VideoCaptureBufferPool() {}
102 103
103 private: 104 private:
104 friend class base::RefCountedThreadSafe<VideoCaptureBufferPool>; 105 friend class base::RefCountedThreadSafe<VideoCaptureBufferPool>;
105 }; 106 };
106 107
107 } // namespace media 108 } // namespace media
108 109
109 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_POOL_H_ 110 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_BUFFER_POOL_H_
OLDNEW
« no previous file with comments | « media/capture/video/fake_video_capture_device_unittest.cc ('k') | media/capture/video/video_capture_buffer_pool_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698