| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_ |
| 6 #define MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_ | 6 #define MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "media/formats/mp2t/descriptors.h" |
| 11 #include "media/formats/mp2t/ts_section_psi.h" | 12 #include "media/formats/mp2t/ts_section_psi.h" |
| 12 | 13 |
| 13 namespace media { | 14 namespace media { |
| 14 namespace mp2t { | 15 namespace mp2t { |
| 15 | 16 |
| 16 class TsSectionPmt : public TsSectionPsi { | 17 class TsSectionPmt : public TsSectionPsi { |
| 17 public: | 18 public: |
| 18 // RegisterPesCb::Run(int pes_pid, int stream_type); | 19 // |stream_type| is defined in "Table 2-34 – Stream type assignments" in H.222 |
| 19 // Stream type is defined in | |
| 20 // "Table 2-34 – Stream type assignments" in H.222 | |
| 21 // TODO(damienv): add the program number. | 20 // TODO(damienv): add the program number. |
| 22 typedef base::Callback<void(int, int)> RegisterPesCb; | 21 using RegisterPesCb = base::Callback< |
| 22 void(int pes_pid, int stream_type, const Descriptors& descriptors)>; |
| 23 | 23 |
| 24 explicit TsSectionPmt(const RegisterPesCb& register_pes_cb); | 24 explicit TsSectionPmt(const RegisterPesCb& register_pes_cb); |
| 25 ~TsSectionPmt() override; | 25 ~TsSectionPmt() override; |
| 26 | 26 |
| 27 // Mpeg2TsPsiParser implementation. | 27 // Mpeg2TsPsiParser implementation. |
| 28 bool ParsePsiSection(BitReader* bit_reader) override; | 28 bool ParsePsiSection(BitReader* bit_reader) override; |
| 29 void ResetPsiSection() override; | 29 void ResetPsiSection() override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 RegisterPesCb register_pes_cb_; | 32 RegisterPesCb register_pes_cb_; |
| 33 | 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(TsSectionPmt); | 34 DISALLOW_COPY_AND_ASSIGN(TsSectionPmt); |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 } // namespace mp2t | 37 } // namespace mp2t |
| 38 } // namespace media | 38 } // namespace media |
| 39 | 39 |
| 40 #endif | 40 #endif |
| 41 | 41 |
| OLD | NEW |