Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: media/mp2t/ts_section_psi.h

Issue 23566013: Mpeg2 TS stream parser for media source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clang warning fix Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/mp2t/ts_section_pmt.cc ('k') | media/mp2t/ts_section_psi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mp2t/ts_section_psi.h
diff --git a/media/mp2t/ts_section_psi.h b/media/mp2t/ts_section_psi.h
new file mode 100644
index 0000000000000000000000000000000000000000..93fb0a4ab007c62f701abd292a5bb51b9d79e543
--- /dev/null
+++ b/media/mp2t/ts_section_psi.h
@@ -0,0 +1,54 @@
+// 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_MP2T_TS_SECTION_PSI_H_
+#define MEDIA_MP2T_TS_SECTION_PSI_H_
+
+#include "base/compiler_specific.h"
+#include "media/base/byte_queue.h"
+#include "media/mp2t/ts_section.h"
+
+namespace media {
+
+class BitReader;
+
+namespace mp2t {
+
+class TsSectionPsi : public TsSection {
+ public:
+ TsSectionPsi();
+ virtual ~TsSectionPsi();
+
+ // TsSection 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:
+ 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(TsSectionPsi);
+};
+
+} // namespace mp2t
+} // namespace media
+
+#endif
+
« no previous file with comments | « media/mp2t/ts_section_pmt.cc ('k') | media/mp2t/ts_section_psi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698