Index: media/mpeg2/mpeg2ts_psi.h |
diff --git a/media/mpeg2/mpeg2ts_psi.h b/media/mpeg2/mpeg2ts_psi.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6c7238679a9921aeb2f4fc24c01ea795a970b5c0 |
--- /dev/null |
+++ b/media/mpeg2/mpeg2ts_psi.h |
@@ -0,0 +1,59 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef MEDIA_MPEG2_MPEG2TS_PSI_PARSER_H_ |
+#define MEDIA_MPEG2_MPEG2TS_PSI_PARSER_H_ |
+ |
+#include <vector> |
damienv1
2013/09/10 04:57:01
Not needed anymore.
damienv1
2013/09/10 21:03:48
Done.
|
+ |
+#include "base/callback.h" |
damienv1
2013/09/10 04:57:01
callback.h not needed.
damienv1
2013/09/10 21:03:48
Done.
|
+#include "base/compiler_specific.h" |
+#include "media/base/byte_queue.h" |
+#include "media/mpeg2/mpeg2ts_section_parser.h" |
+ |
+namespace media { |
+ |
+class BitReader; |
+ |
+namespace mpeg2ts { |
+ |
+class Mpeg2TsPsiParser : public Mpeg2TsSectionParser { |
+ public: |
+ Mpeg2TsPsiParser(); |
+ virtual ~Mpeg2TsPsiParser(); |
+ |
+ // Mpeg2TsSectionParser implementation. |
+ virtual bool Parse(bool payload_unit_start_indicator, |
+ const uint8* buf, int size) OVERRIDE; |
+ virtual void Flush() OVERRIDE; |
+ virtual void Reset() OVERRIDE; |
+ |
+ // Parse the content of the PSI section. |
+ virtual bool ParsePsiSection(BitReader* bit_reader) = 0; |
+ |
+ // Reset the state of the PSI section. |
+ virtual void ResetPsiSection() = 0; |
+ |
+ private: |
+ bool ParseInternal(bool payload_unit_start_indicator, |
+ const uint8* buf, int size); |
+ void ResetPsiState(); |
+ |
+ // Bytes of the current PSI. |
+ ByteQueue psi_byte_queue_; |
+ |
+ // Do not start parsing before getting a unit start indicator. |
+ bool wait_for_pusi_; |
+ |
+ // Number of leading bytes to discard (pointer field). |
+ int leading_bytes_to_discard_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(Mpeg2TsPsiParser); |
+}; |
+ |
+} // namespace mpeg2ts |
+} // namespace media |
+ |
+#endif |
+ |