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

Unified Diff: media/mpeg2/mpeg2ts_pat.h

Issue 23566013: Mpeg2 TS stream parser for media source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add basic unit tests + Cleanup 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_pat.h
diff --git a/media/mpeg2/mpeg2ts_pat.h b/media/mpeg2/mpeg2ts_pat.h
new file mode 100644
index 0000000000000000000000000000000000000000..3fcaf7084ee964a5a6877e26796eb9a33523107b
--- /dev/null
+++ b/media/mpeg2/mpeg2ts_pat.h
@@ -0,0 +1,43 @@
+// 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_PAT_PARSER_H_
+#define MEDIA_MPEG2_MPEG2TS_PAT_PARSER_H_
+
+#include <vector>
+
+#include "base/callback.h"
+#include "base/compiler_specific.h"
+#include "media/mpeg2/mpeg2ts_psi.h"
+
+namespace media {
+namespace mpeg2ts {
+
+class Mpeg2TsPatParser : public Mpeg2TsPsiParser {
+ public:
+ // RegisterPmtCb::Run(int program_number, int pmt_pid);
+ typedef base::Callback<void(int, int)> RegisterPmtCb;
+
+ explicit Mpeg2TsPatParser(RegisterPmtCb register_pmt_cb);
+ virtual ~Mpeg2TsPatParser();
+
+ // Mpeg2TsPsiParser implementation.
+ virtual bool ParsePsiSection(BitReader* bit_reader) OVERRIDE;
+
+ private:
+ RegisterPmtCb register_pmt_cb_;
+
+ // Parameters from the PAT
+ // TODO(damienv): Verify the version number is the same
+ // or is incremented by 1.
damienv1 2013/09/05 01:58:29 Remove TODO as it's now done.
damienv1 2013/09/09 23:29:46 Done.
+ int version_number_;
+
+ DISALLOW_COPY_AND_ASSIGN(Mpeg2TsPatParser);
+};
+
+} // namespace mpeg2ts
+} // namespace media
+
+#endif
+

Powered by Google App Engine
This is Rietveld 408576698