Home | History | Annotate | Download | only in mp2t
      1 // Copyright 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_MP2T_TS_SECTION_PMT_H_
      6 #define MEDIA_MP2T_TS_SECTION_PMT_H_
      7 
      8 #include "base/callback.h"
      9 #include "base/compiler_specific.h"
     10 #include "media/mp2t/ts_section_psi.h"
     11 
     12 namespace media {
     13 namespace mp2t {
     14 
     15 class TsSectionPmt : public TsSectionPsi {
     16  public:
     17   // RegisterPesCb::Run(int pes_pid, int stream_type);
     18   // Stream type is defined in
     19   // "Table 2-34  Stream type assignments" in H.222
     20   // TODO(damienv): add the program number.
     21   typedef base::Callback<void(int, int)> RegisterPesCb;
     22 
     23   explicit TsSectionPmt(const RegisterPesCb& register_pes_cb);
     24   virtual ~TsSectionPmt();
     25 
     26   // Mpeg2TsPsiParser implementation.
     27   virtual bool ParsePsiSection(BitReader* bit_reader) OVERRIDE;
     28   virtual void ResetPsiSection() OVERRIDE;
     29 
     30  private:
     31   RegisterPesCb register_pes_cb_;
     32 
     33   DISALLOW_COPY_AND_ASSIGN(TsSectionPmt);
     34 };
     35 
     36 }  // namespace mp2t
     37 }  // namespace media
     38 
     39 #endif
     40 
     41