| 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 // This file contains an implementation of VideoDecodeAccelerator | 5 // This file contains an implementation of VideoDecodeAccelerator |
| 6 // that utilizes hardware video decoders, which expose Video4Linux 2 API | 6 // that utilizes hardware video decoders, which expose Video4Linux 2 API |
| 7 // (http://linuxtv.org/downloads/v4l-dvb-apis/). | 7 // (http://linuxtv.org/downloads/v4l-dvb-apis/). |
| 8 | 8 |
| 9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| 10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // caller can error out on resolution change. | 287 // caller can error out on resolution change. |
| 288 bool DestroyOutputBuffers(); | 288 bool DestroyOutputBuffers(); |
| 289 void ResolutionChangeDestroyBuffers(); | 289 void ResolutionChangeDestroyBuffers(); |
| 290 | 290 |
| 291 // Send decoded pictures to PictureReady. | 291 // Send decoded pictures to PictureReady. |
| 292 void SendPictureReady(); | 292 void SendPictureReady(); |
| 293 | 293 |
| 294 // Callback that indicates a picture has been cleared. | 294 // Callback that indicates a picture has been cleared. |
| 295 void PictureCleared(); | 295 void PictureCleared(); |
| 296 | 296 |
| 297 // This method determines whether a resolution change event processing |
| 298 // is indeed required by returning true if either: |
| 299 // - width or height of the new format is different than previous format. |
| 300 // - V4L2_CID_MIN_BUFFERS_FOR_CAPTURE has changed. |
| 301 // Returns false otherwise. |
| 302 bool IsResolutionChangeNecessary(); |
| 303 |
| 297 // Our original calling message loop for the child thread. | 304 // Our original calling message loop for the child thread. |
| 298 scoped_refptr<base::MessageLoopProxy> child_message_loop_proxy_; | 305 scoped_refptr<base::MessageLoopProxy> child_message_loop_proxy_; |
| 299 | 306 |
| 300 // Message loop of the IO thread. | 307 // Message loop of the IO thread. |
| 301 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 308 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 302 | 309 |
| 303 // WeakPtr<> pointing to |this| for use in posting tasks from the decoder or | 310 // WeakPtr<> pointing to |this| for use in posting tasks from the decoder or |
| 304 // device worker threads back to the child thread. Because the worker threads | 311 // device worker threads back to the child thread. Because the worker threads |
| 305 // are members of this class, any task running on those threads is guaranteed | 312 // are members of this class, any task running on those threads is guaranteed |
| 306 // that this object is still alive. As a result, tasks posted from the child | 313 // that this object is still alive. As a result, tasks posted from the child |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 432 |
| 426 // The codec we'll be decoding for. | 433 // The codec we'll be decoding for. |
| 427 media::VideoCodecProfile video_profile_; | 434 media::VideoCodecProfile video_profile_; |
| 428 | 435 |
| 429 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); | 436 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); |
| 430 }; | 437 }; |
| 431 | 438 |
| 432 } // namespace content | 439 } // namespace content |
| 433 | 440 |
| 434 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 441 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |