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 CONTENT_COMMON_GPU_MEDIA_H264_BIT_READER_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_H264_BIT_READER_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_H264_BIT_READER_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_H264_BIT_READER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "media/base/bit_reader.h" | 9 #include "media/base/bit_reader.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 // A class to provide bit-granularity reading of H.264 streams. | 13 // A class to provide bit-granularity reading of H.264 streams. |
14 // This class takes into account H.264 stream-specific constraints, such as | 14 // This class takes into account H.264 stream-specific constraints, such as |
15 // skipping emulation-prevention bytes and stop bits. See spec for more | 15 // skipping emulation-prevention bytes and stop bits. See spec for more |
16 // details. | 16 // details. |
17 class H264BitReader : public media::BitReader { | 17 class H264BitReader : public media::BitReader { |
18 public: | 18 public: |
19 H264BitReader(); | 19 H264BitReader(); |
20 virtual ~H264BitReader(); | 20 virtual ~H264BitReader(); |
21 | 21 |
| 22 // See the definition of more_rbsp_data() in spec. |
| 23 bool HasMoreRBSPData(); |
| 24 |
22 private: | 25 private: |
23 // This function handles the H.264 escape sequence and stop bit. | 26 // This function handles the H.264 escape sequence and stop bit. |
24 virtual void UpdateCurrByte() OVERRIDE; | 27 virtual void UpdateCurrByte() OVERRIDE; |
25 | 28 |
26 DISALLOW_COPY_AND_ASSIGN(H264BitReader); | 29 DISALLOW_COPY_AND_ASSIGN(H264BitReader); |
27 }; | 30 }; |
28 | 31 |
29 } // namespace content | 32 } // namespace content |
30 | 33 |
31 #endif // CONTENT_COMMON_GPU_MEDIA_H264_BIT_READER_H_ | 34 #endif // CONTENT_COMMON_GPU_MEDIA_H264_BIT_READER_H_ |
OLD | NEW |