OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <dlfcn.h> | 5 #include <dlfcn.h> |
6 #include <errno.h> | 6 #include <errno.h> |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <linux/videodev2.h> | 8 #include <linux/videodev2.h> |
9 #include <poll.h> | 9 #include <poll.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 if (config.is_encrypted) { | 215 if (config.is_encrypted) { |
216 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 216 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
217 return false; | 217 return false; |
218 } | 218 } |
219 | 219 |
220 if (config.output_mode != Config::OutputMode::ALLOCATE) { | 220 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
221 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 221 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
222 return false; | 222 return false; |
223 } | 223 } |
224 | 224 |
| 225 if (config.flush_mode != Config::FlushMode::KEEP_OUTPUT_BUFFERS) { |
| 226 NOTIMPLEMENTED() << "Modes other than KEEP_OUTPUT_BUFFERS not implemented"; |
| 227 return false; |
| 228 } |
| 229 |
225 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { | 230 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { |
226 NOTREACHED() << "GL callbacks are required for this VDA"; | 231 NOTREACHED() << "GL callbacks are required for this VDA"; |
227 return false; | 232 return false; |
228 } | 233 } |
229 | 234 |
230 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); | 235 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); |
231 client_ = client_ptr_factory_->GetWeakPtr(); | 236 client_ = client_ptr_factory_->GetWeakPtr(); |
232 // If we haven't been set up to decode on separate thread via | 237 // If we haven't been set up to decode on separate thread via |
233 // TryToSetupDecodeOnSeparateThread(), use the main thread/client for | 238 // TryToSetupDecodeOnSeparateThread(), use the main thread/client for |
234 // decode tasks. | 239 // decode tasks. |
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2064 | 2069 |
2065 void V4L2VideoDecodeAccelerator::PictureCleared() { | 2070 void V4L2VideoDecodeAccelerator::PictureCleared() { |
2066 DVLOG(3) << "PictureCleared(). clearing count=" << picture_clearing_count_; | 2071 DVLOG(3) << "PictureCleared(). clearing count=" << picture_clearing_count_; |
2067 DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current()); | 2072 DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current()); |
2068 DCHECK_GT(picture_clearing_count_, 0); | 2073 DCHECK_GT(picture_clearing_count_, 0); |
2069 picture_clearing_count_--; | 2074 picture_clearing_count_--; |
2070 SendPictureReady(); | 2075 SendPictureReady(); |
2071 } | 2076 } |
2072 | 2077 |
2073 } // namespace content | 2078 } // namespace content |
OLD | NEW |