OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CAT_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_TS_SECTION_CAT_H_ |
6 #define MEDIA_FORMATS_MP2T_TS_SECTION_CAT_H_ | 6 #define MEDIA_FORMATS_MP2T_TS_SECTION_CAT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "media/formats/mp2t/ts_section_psi.h" | 10 #include "media/formats/mp2t/ts_section_psi.h" |
11 | 11 |
12 namespace media { | 12 namespace media { |
| 13 |
| 14 class EncryptionScheme; |
| 15 |
13 namespace mp2t { | 16 namespace mp2t { |
14 | 17 |
15 class TsSectionCat : public TsSectionPsi { | 18 class TsSectionCat : public TsSectionPsi { |
16 public: | 19 public: |
17 // RegisterCencPidsCb::Run(int ca_pid, int pssh_pid); | 20 // RegisterCencPidsCb::Run(int ca_pid, int pssh_pid); |
18 using RegisterCencPidsCb = base::Callback<void(int, int)>; | 21 using RegisterCencPidsCb = base::Callback<void(int, int)>; |
19 explicit TsSectionCat(const RegisterCencPidsCb& register_cenc_ids_cb); | 22 // RegisterEncryptionScheme::Run(const EncryptionScheme& scheme); |
| 23 using RegisterEncryptionSchemeCb = |
| 24 base::Callback<void(const EncryptionScheme&)>; |
| 25 TsSectionCat(const RegisterCencPidsCb& register_cenc_ids_cb, |
| 26 const RegisterEncryptionSchemeCb& register_encryption_scheme_cb); |
20 ~TsSectionCat() override; | 27 ~TsSectionCat() override; |
21 | 28 |
22 // TsSectionPsi implementation. | 29 // TsSectionPsi implementation. |
23 bool ParsePsiSection(BitReader* bit_reader) override; | 30 bool ParsePsiSection(BitReader* bit_reader) override; |
24 void ResetPsiSection() override; | 31 void ResetPsiSection() override; |
25 | 32 |
26 private: | 33 private: |
27 RegisterCencPidsCb register_cenc_ids_cb_; | 34 RegisterCencPidsCb register_cenc_ids_cb_; |
| 35 RegisterEncryptionSchemeCb register_encryption_scheme_cb_; |
28 | 36 |
29 // Parameters from the CAT. | 37 // Parameters from the CAT. |
30 int version_number_; | 38 int version_number_; |
31 | 39 |
32 DISALLOW_COPY_AND_ASSIGN(TsSectionCat); | 40 DISALLOW_COPY_AND_ASSIGN(TsSectionCat); |
33 }; | 41 }; |
34 | 42 |
35 } // namespace mp2t | 43 } // namespace mp2t |
36 } // namespace media | 44 } // namespace media |
37 | 45 |
38 #endif | 46 #endif |
OLD | NEW |