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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 | 98 |
99 // VideoDecodeAcceleratorImpl implementation. | 99 // VideoDecodeAcceleratorImpl implementation. |
100 virtual bool CanDecodeOnIOThread() OVERRIDE; | 100 virtual bool CanDecodeOnIOThread() OVERRIDE; |
101 | 101 |
102 private: | 102 private: |
103 // These are rather subjectively tuned. | 103 // These are rather subjectively tuned. |
104 enum { | 104 enum { |
105 kInputBufferCount = 8, | 105 kInputBufferCount = 8, |
106 // TODO(posciak): determine input buffer size based on level limits. | 106 // TODO(posciak): determine input buffer size based on level limits. |
107 // See http://crbug.com/255116. | 107 // See http://crbug.com/255116. |
108 kInputBufferMaxSize = 1024 * 1024, | 108 kInputBufferMaxSize = 4 * 1024 * 1024, |
Ami GONE FROM CHROMIUM
2014/05/15 16:00:42
CL description made me expect this to be condition
Pawel Osciak
2014/05/16 03:53:01
I'm uncomfortable making this remote relationship
Ami GONE FROM CHROMIUM
2014/05/16 16:49:59
...as opposed to the current "remote relationship"
| |
109 // Number of output buffers to use for each VDA stage above what's required | 109 // Number of output buffers to use for each VDA stage above what's required |
110 // by the decoder (e.g. DPB size, in H264). We need | 110 // by the decoder (e.g. DPB size, in H264). We need |
111 // media::limits::kMaxVideoFrames to fill up the GpuVideoDecode pipeline, | 111 // media::limits::kMaxVideoFrames to fill up the GpuVideoDecode pipeline, |
112 // and +1 for a frame in transit. | 112 // and +1 for a frame in transit. |
113 kDpbOutputBufferExtraCount = media::limits::kMaxVideoFrames + 1, | 113 kDpbOutputBufferExtraCount = media::limits::kMaxVideoFrames + 1, |
114 }; | 114 }; |
115 | 115 |
116 // Internal state of the decoder. | 116 // Internal state of the decoder. |
117 enum State { | 117 enum State { |
118 kUninitialized, // Initialize() not yet called. | 118 kUninitialized, // Initialize() not yet called. |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
436 | 436 |
437 // The WeakPtrFactory for |weak_this_|. | 437 // The WeakPtrFactory for |weak_this_|. |
438 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; | 438 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; |
439 | 439 |
440 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); | 440 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); |
441 }; | 441 }; |
442 | 442 |
443 } // namespace content | 443 } // namespace content |
444 | 444 |
445 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 445 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |