Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
6 #ifndef AVCBox_h_
7 #define AVCBox_h_
9 #include "nsTArray.h"
10 #include "nsAutoPtr.h"
11 #include "ISOMediaBoxes.h"
13 namespace mozilla {
15 class ISOControl;
17 // 14496-12 8.5.2.2
18 #define resolution_72_dpi 0x00480000
19 #define video_depth 0x0018
21 // 14496-15 5.3.4.1 'Sample description name and format'
22 // Box type: 'avcC'
23 class AVCConfigurationBox : public Box {
24 public:
25 // ISO BMFF members
27 // avcConfig is CodecSpecificData from 14496-15 '5.3.4.1 Sample description
28 // name and format.
29 // These data are generated by encoder and we encapsulated the generated
30 // bitstream into box directly.
31 nsTArray<uint8_t> avcConfig;
33 // MuxerOperation methods
34 nsresult Generate(uint32_t* aBoxSize) MOZ_OVERRIDE;
35 nsresult Write() MOZ_OVERRIDE;
37 // AVCConfigurationBox methods
38 AVCConfigurationBox(ISOControl* aControl);
39 ~AVCConfigurationBox();
40 };
42 // 14496-15 5.3.4.1 'Sample description name and format'
43 // Box type: 'avc1'
44 class AVCSampleEntry : public VisualSampleEntry {
45 public:
46 // ISO BMFF members
47 nsRefPtr<AVCConfigurationBox> avcConfigBox;
49 // MuxerOperation methods
50 nsresult Generate(uint32_t* aBoxSize) MOZ_OVERRIDE;
51 nsresult Write() MOZ_OVERRIDE;
53 // VisualSampleEntry methods
54 AVCSampleEntry(ISOControl* aControl);
55 ~AVCSampleEntry();
56 };
58 }
60 #endif // AVCBox_h_