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

Unified Diff: media/mpeg2/mpeg2ts_pmt.h

Issue 23566013: Mpeg2 TS stream parser for media source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from patch set #3 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
Index: media/mpeg2/mpeg2ts_pmt.h
diff --git a/media/mpeg2/mpeg2ts_pmt.h b/media/mpeg2/mpeg2ts_pmt.h
new file mode 100644
index 0000000000000000000000000000000000000000..e82349e4a097bb50b03b1fe0a008ebd1f268e31d
--- /dev/null
+++ b/media/mpeg2/mpeg2ts_pmt.h
@@ -0,0 +1,42 @@
+// 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_PMT_PARSER_H_
+#define MEDIA_MPEG2_MPEG2TS_PMT_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"
+#include "base/compiler_specific.h"
+#include "media/mpeg2/mpeg2ts_psi.h"
+
+namespace media {
+namespace mpeg2ts {
+
+class Mpeg2TsPmtParser : public Mpeg2TsPsiParser {
+ public:
+ // RegisterPesCb::Run(int pes_pid, int stream_type);
+ // Stream type is defined in
+ // "Table 2-34 – Stream type assignments" in H.222
+ // TODO(damienv): add the program number.
+ typedef base::Callback<void(int, int)> RegisterPesCb;
+
+ explicit Mpeg2TsPmtParser(RegisterPesCb register_pes_cb);
+ virtual ~Mpeg2TsPmtParser();
+
+ // Mpeg2TsPsiParser implementation.
+ virtual bool ParsePsiSection(BitReader* bit_reader) OVERRIDE;
+ virtual void ResetPsiSection() OVERRIDE;
+
+ private:
+ RegisterPesCb register_pes_cb_;
+
+ DISALLOW_COPY_AND_ASSIGN(Mpeg2TsPmtParser);
+};
+
+} // namespace mpeg2ts
+} // namespace media
+
+#endif
+

Powered by Google App Engine
This is Rietveld 408576698