| OLD | NEW |
| 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_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ | 5 #ifndef MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ |
| 6 #define MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ | 6 #define MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ |
| 7 | 7 |
| 8 #include <mfapi.h> | 8 #include <mfapi.h> |
| 9 #include <mfidl.h> | 9 #include <mfidl.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void ReleaseEncoderResources(); | 108 void ReleaseEncoderResources(); |
| 109 | 109 |
| 110 // Bitstream buffers ready to be used to return encoded output as a FIFO. | 110 // Bitstream buffers ready to be used to return encoded output as a FIFO. |
| 111 std::deque<std::unique_ptr<BitstreamBufferRef>> bitstream_buffer_queue_; | 111 std::deque<std::unique_ptr<BitstreamBufferRef>> bitstream_buffer_queue_; |
| 112 | 112 |
| 113 // EncodeOutput needs to be copied into a BitstreamBufferRef as a FIFO. | 113 // EncodeOutput needs to be copied into a BitstreamBufferRef as a FIFO. |
| 114 std::deque<std::unique_ptr<EncodeOutput>> encoder_output_queue_; | 114 std::deque<std::unique_ptr<EncodeOutput>> encoder_output_queue_; |
| 115 | 115 |
| 116 gfx::Size input_visible_size_; | 116 gfx::Size input_visible_size_; |
| 117 size_t bitstream_buffer_size_; | 117 size_t bitstream_buffer_size_; |
| 118 int32_t frame_rate_; | 118 uint32_t frame_rate_; |
| 119 int32_t target_bitrate_; | 119 uint32_t target_bitrate_; |
| 120 size_t u_plane_offset_; | 120 size_t u_plane_offset_; |
| 121 size_t v_plane_offset_; | 121 size_t v_plane_offset_; |
| 122 | 122 |
| 123 base::win::ScopedComPtr<IMFTransform> encoder_; | 123 base::win::ScopedComPtr<IMFTransform> encoder_; |
| 124 base::win::ScopedComPtr<ICodecAPI> codec_api_; | 124 base::win::ScopedComPtr<ICodecAPI> codec_api_; |
| 125 | 125 |
| 126 DWORD input_stream_id_; |
| 127 DWORD output_stream_id_; |
| 128 |
| 126 base::win::ScopedComPtr<IMFMediaType> imf_input_media_type_; | 129 base::win::ScopedComPtr<IMFMediaType> imf_input_media_type_; |
| 127 base::win::ScopedComPtr<IMFMediaType> imf_output_media_type_; | 130 base::win::ScopedComPtr<IMFMediaType> imf_output_media_type_; |
| 128 | 131 |
| 129 base::win::ScopedComPtr<IMFSample> input_sample_; | 132 base::win::ScopedComPtr<IMFSample> input_sample_; |
| 130 base::win::ScopedComPtr<IMFSample> output_sample_; | 133 base::win::ScopedComPtr<IMFSample> output_sample_; |
| 131 | 134 |
| 132 // To expose client callbacks from VideoEncodeAccelerator. | 135 // To expose client callbacks from VideoEncodeAccelerator. |
| 133 // NOTE: all calls to this object *MUST* be executed on | 136 // NOTE: all calls to this object *MUST* be executed on |
| 134 // |main_client_task_runner_|. | 137 // |main_client_task_runner_|. |
| 135 base::WeakPtr<Client> main_client_; | 138 base::WeakPtr<Client> main_client_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 151 // other destructors run. | 154 // other destructors run. |
| 152 base::WeakPtrFactory<MediaFoundationVideoEncodeAccelerator> | 155 base::WeakPtrFactory<MediaFoundationVideoEncodeAccelerator> |
| 153 encoder_task_weak_factory_; | 156 encoder_task_weak_factory_; |
| 154 | 157 |
| 155 DISALLOW_COPY_AND_ASSIGN(MediaFoundationVideoEncodeAccelerator); | 158 DISALLOW_COPY_AND_ASSIGN(MediaFoundationVideoEncodeAccelerator); |
| 156 }; | 159 }; |
| 157 | 160 |
| 158 } // namespace media | 161 } // namespace media |
| 159 | 162 |
| 160 #endif // MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ | 163 #endif // MEDIA_GPU_MEDIA_FOUNDATION_VIDEO_ENCODE_ACCELERATOR_WIN_H_ |
| OLD | NEW |