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

Side by Side Diff: content/browser/renderer_host/media/video_capture_device_client.cc

Issue 1815563004: Remove iOS ifdefs in src/content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/browser/renderer_host/media/video_capture_device_client.h" 5 #include "content/browser/renderer_host/media/video_capture_device_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 29 matching lines...) Expand all
40 buffer_handle_(pool_->GetBufferHandle(buffer_id)) { 40 buffer_handle_(pool_->GetBufferHandle(buffer_id)) {
41 DCHECK(pool_.get()); 41 DCHECK(pool_.get());
42 } 42 }
43 int id() const override { return id_; } 43 int id() const override { return id_; }
44 gfx::Size dimensions() const override { return buffer_handle_->dimensions(); } 44 gfx::Size dimensions() const override { return buffer_handle_->dimensions(); }
45 size_t mapped_size() const override { return buffer_handle_->mapped_size(); } 45 size_t mapped_size() const override { return buffer_handle_->mapped_size(); }
46 void* data(int plane) override { return buffer_handle_->data(plane); } 46 void* data(int plane) override { return buffer_handle_->data(plane); }
47 ClientBuffer AsClientBuffer(int plane) override { 47 ClientBuffer AsClientBuffer(int plane) override {
48 return buffer_handle_->AsClientBuffer(plane); 48 return buffer_handle_->AsClientBuffer(plane);
49 } 49 }
50 #if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS)) 50 #if defined(OS_POSIX) && !defined(OS_MACOSX)
51 base::FileDescriptor AsPlatformFile() override { 51 base::FileDescriptor AsPlatformFile() override {
52 return buffer_handle_->AsPlatformFile(); 52 return buffer_handle_->AsPlatformFile();
53 } 53 }
54 #endif 54 #endif
55 55
56 private: 56 private:
57 ~AutoReleaseBuffer() override { pool_->RelinquishProducerReservation(id_); } 57 ~AutoReleaseBuffer() override { pool_->RelinquishProducerReservation(id_); }
58 58
59 const int id_; 59 const int id_;
60 const scoped_refptr<VideoCaptureBufferPool> pool_; 60 const scoped_refptr<VideoCaptureBufferPool> pool_;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 reinterpret_cast<uint8_t*>(buffer->data(VideoFrame::kUPlane)); 406 reinterpret_cast<uint8_t*>(buffer->data(VideoFrame::kUPlane));
407 *v_plane_data = 407 *v_plane_data =
408 reinterpret_cast<uint8_t*>(buffer->data(VideoFrame::kVPlane)); 408 reinterpret_cast<uint8_t*>(buffer->data(VideoFrame::kVPlane));
409 return buffer; 409 return buffer;
410 } 410 }
411 NOTREACHED(); 411 NOTREACHED();
412 return scoped_ptr<Buffer>(); 412 return scoped_ptr<Buffer>();
413 } 413 }
414 414
415 } // namespace content 415 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698