content/media/encoder/fmp4_muxer/AMRBox.h

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

     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 AMRBOX_h_
     7 #define AMRBOX_h_
     9 #include "nsTArray.h"
    10 #include "MuxerOperation.h"
    12 namespace mozilla {
    14 class ISOControl;
    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;
    23   // MuxerOperation methods
    24   nsresult Generate(uint32_t* aBoxSize) MOZ_OVERRIDE;
    25   nsresult Write() MOZ_OVERRIDE;
    27   // AMRSpecificBox methods
    28   AMRSpecificBox(ISOControl* aControl);
    29   ~AMRSpecificBox();
    30 };
    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;
    39   // MuxerOperation methods
    40   nsresult Generate(uint32_t* aBoxSize) MOZ_OVERRIDE;
    41   nsresult Write() MOZ_OVERRIDE;
    43   // AMRSampleEntry methods
    44   AMRSampleEntry(ISOControl* aControl);
    45   ~AMRSampleEntry();
    46 };
    48 }
    50 #endif // AMRBOX_h_

mercurial