| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H264_DECODER_H_ | 5 #ifndef MEDIA_GPU_H264_DECODER_H_ |
| 6 #define MEDIA_GPU_H264_DECODER_H_ | 6 #define MEDIA_GPU_H264_DECODER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "media/base/limits.h" | 16 #include "media/base/limits.h" |
| 17 #include "media/filters/h264_parser.h" | 17 #include "media/filters/h264_parser.h" |
| 18 #include "media/gpu/accelerated_video_decoder.h" | 18 #include "media/gpu/accelerated_video_decoder.h" |
| 19 #include "media/gpu/h264_dpb.h" | 19 #include "media/gpu/h264_dpb.h" |
| 20 #include "media/gpu/media_gpu_export.h" | 20 #include "media/gpu/media_gpu_export.h" |
| 21 #include "ui/gfx/geometry/rect.h" |
| 21 #include "ui/gfx/geometry/size.h" | 22 #include "ui/gfx/geometry/size.h" |
| 22 | 23 |
| 23 namespace media { | 24 namespace media { |
| 24 | 25 |
| 25 // Clients of this class are expected to pass H264 Annex-B byte stream | 26 // Clients of this class are expected to pass H264 Annex-B byte stream |
| 26 // and are expected to provide an implementation of H264Accelerator for | 27 // and are expected to provide an implementation of H264Accelerator for |
| 27 // offloading final steps of the decoding process. | 28 // offloading final steps of the decoding process. |
| 28 // | 29 // |
| 29 // This class must be created, called and destroyed on a single thread, and | 30 // This class must be created, called and destroyed on a single thread, and |
| 30 // does nothing internally on any other thread. | 31 // does nothing internally on any other thread. |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // Currently active SPS and PPS. | 260 // Currently active SPS and PPS. |
| 260 int curr_sps_id_; | 261 int curr_sps_id_; |
| 261 int curr_pps_id_; | 262 int curr_pps_id_; |
| 262 | 263 |
| 263 // Current NALU and slice header being processed. | 264 // Current NALU and slice header being processed. |
| 264 std::unique_ptr<H264NALU> curr_nalu_; | 265 std::unique_ptr<H264NALU> curr_nalu_; |
| 265 std::unique_ptr<H264SliceHeader> curr_slice_hdr_; | 266 std::unique_ptr<H264SliceHeader> curr_slice_hdr_; |
| 266 | 267 |
| 267 // Output picture size. | 268 // Output picture size. |
| 268 gfx::Size pic_size_; | 269 gfx::Size pic_size_; |
| 270 // Output visible cropping rect. |
| 271 gfx::Rect visible_rect_; |
| 269 | 272 |
| 270 // PicOrderCount of the previously outputted frame. | 273 // PicOrderCount of the previously outputted frame. |
| 271 int last_output_poc_; | 274 int last_output_poc_; |
| 272 | 275 |
| 273 H264Accelerator* accelerator_; | 276 H264Accelerator* accelerator_; |
| 274 | 277 |
| 275 DISALLOW_COPY_AND_ASSIGN(H264Decoder); | 278 DISALLOW_COPY_AND_ASSIGN(H264Decoder); |
| 276 }; | 279 }; |
| 277 | 280 |
| 278 } // namespace media | 281 } // namespace media |
| 279 | 282 |
| 280 #endif // MEDIA_GPU_H264_DECODER_H_ | 283 #endif // MEDIA_GPU_H264_DECODER_H_ |
| OLD | NEW |