|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
|
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #ifndef AMRBOX_h_ |
|
7 #define AMRBOX_h_ |
|
8 |
|
9 #include "nsTArray.h" |
|
10 #include "MuxerOperation.h" |
|
11 |
|
12 namespace mozilla { |
|
13 |
|
14 class ISOControl; |
|
15 |
|
16 // 3GPP TS 26.244 6.7 'AMRSpecificBox field for AMRSampleEntry box' |
|
17 // Box type: 'damr' |
|
18 class AMRSpecificBox : public Box { |
|
19 public: |
|
20 // 3GPP members |
|
21 nsTArray<uint8_t> amrDecSpecInfo; |
|
22 |
|
23 // MuxerOperation methods |
|
24 nsresult Generate(uint32_t* aBoxSize) MOZ_OVERRIDE; |
|
25 nsresult Write() MOZ_OVERRIDE; |
|
26 |
|
27 // AMRSpecificBox methods |
|
28 AMRSpecificBox(ISOControl* aControl); |
|
29 ~AMRSpecificBox(); |
|
30 }; |
|
31 |
|
32 // 3GPP TS 26.244 6.5 'AMRSampleEntry box' |
|
33 // Box type: 'sawb' |
|
34 class AMRSampleEntry : public AudioSampleEntry { |
|
35 public: |
|
36 // 3GPP members |
|
37 nsRefPtr<AMRSpecificBox> amr_special_box; |
|
38 |
|
39 // MuxerOperation methods |
|
40 nsresult Generate(uint32_t* aBoxSize) MOZ_OVERRIDE; |
|
41 nsresult Write() MOZ_OVERRIDE; |
|
42 |
|
43 // AMRSampleEntry methods |
|
44 AMRSampleEntry(ISOControl* aControl); |
|
45 ~AMRSampleEntry(); |
|
46 }; |
|
47 |
|
48 } |
|
49 |
|
50 #endif // AMRBOX_h_ |