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

Side by Side Diff: media/mpeg2/mpeg2ts_psi.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_MPEG2_MPEG2TS_PSI_PARSER_H_
6 #define MEDIA_MPEG2_MPEG2TS_PSI_PARSER_H_
7
8 #include <vector>
damienv1 2013/09/10 04:57:01 Not needed anymore.
damienv1 2013/09/10 21:03:48 Done.
9
10 #include "base/callback.h"
damienv1 2013/09/10 04:57:01 callback.h not needed.
damienv1 2013/09/10 21:03:48 Done.
11 #include "base/compiler_specific.h"
12 #include "media/base/byte_queue.h"
13 #include "media/mpeg2/mpeg2ts_section_parser.h"
14
15 namespace media {
16
17 class BitReader;
18
19 namespace mpeg2ts {
20
21 class Mpeg2TsPsiParser : public Mpeg2TsSectionParser {
22 public:
23 Mpeg2TsPsiParser();
24 virtual ~Mpeg2TsPsiParser();
25
26 // Mpeg2TsSectionParser implementation.
27 virtual bool Parse(bool payload_unit_start_indicator,
28 const uint8* buf, int size) OVERRIDE;
29 virtual void Flush() OVERRIDE;
30 virtual void Reset() OVERRIDE;
31
32 // Parse the content of the PSI section.
33 virtual bool ParsePsiSection(BitReader* bit_reader) = 0;
34
35 // Reset the state of the PSI section.
36 virtual void ResetPsiSection() = 0;
37
38 private:
39 bool ParseInternal(bool payload_unit_start_indicator,
40 const uint8* buf, int size);
41 void ResetPsiState();
42
43 // Bytes of the current PSI.
44 ByteQueue psi_byte_queue_;
45
46 // Do not start parsing before getting a unit start indicator.
47 bool wait_for_pusi_;
48
49 // Number of leading bytes to discard (pointer field).
50 int leading_bytes_to_discard_;
51
52 DISALLOW_COPY_AND_ASSIGN(Mpeg2TsPsiParser);
53 };
54
55 } // namespace mpeg2ts
56 } // namespace media
57
58 #endif
59
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698