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