michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef AVCBox_h_ michael@0: #define AVCBox_h_ michael@0: michael@0: #include "nsTArray.h" michael@0: #include "nsAutoPtr.h" michael@0: #include "ISOMediaBoxes.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: class ISOControl; michael@0: michael@0: // 14496-12 8.5.2.2 michael@0: #define resolution_72_dpi 0x00480000 michael@0: #define video_depth 0x0018 michael@0: michael@0: // 14496-15 5.3.4.1 'Sample description name and format' michael@0: // Box type: 'avcC' michael@0: class AVCConfigurationBox : public Box { michael@0: public: michael@0: // ISO BMFF members michael@0: michael@0: // avcConfig is CodecSpecificData from 14496-15 '5.3.4.1 Sample description michael@0: // name and format. michael@0: // These data are generated by encoder and we encapsulated the generated michael@0: // bitstream into box directly. michael@0: nsTArray avcConfig; michael@0: michael@0: // MuxerOperation methods michael@0: nsresult Generate(uint32_t* aBoxSize) MOZ_OVERRIDE; michael@0: nsresult Write() MOZ_OVERRIDE; michael@0: michael@0: // AVCConfigurationBox methods michael@0: AVCConfigurationBox(ISOControl* aControl); michael@0: ~AVCConfigurationBox(); michael@0: }; michael@0: michael@0: // 14496-15 5.3.4.1 'Sample description name and format' michael@0: // Box type: 'avc1' michael@0: class AVCSampleEntry : public VisualSampleEntry { michael@0: public: michael@0: // ISO BMFF members michael@0: nsRefPtr avcConfigBox; michael@0: michael@0: // MuxerOperation methods michael@0: nsresult Generate(uint32_t* aBoxSize) MOZ_OVERRIDE; michael@0: nsresult Write() MOZ_OVERRIDE; michael@0: michael@0: // VisualSampleEntry methods michael@0: AVCSampleEntry(ISOControl* aControl); michael@0: ~AVCSampleEntry(); michael@0: }; michael@0: michael@0: } michael@0: michael@0: #endif // AVCBox_h_