• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /*
19     This PVA_FF_DecoderSpecificInfo Class that holds the Mpeg4 VOL header for the
20     video stream
21 */
22 
23 #ifndef __AMRDecoderSpecificInfo3GPP_H__
24 #define __AMRDecoderSpecificInfo3GPP_H__
25 
26 #include "oscl_types.h"
27 #include "oscl_file_io.h"
28 
29 #include "atom.h"
30 #include "atomutils.h"
31 #include "a_atomdefs.h"
32 
33 class PVA_FF_AMRSpecificAtom : public PVA_FF_Atom
34 {
35 
36     public:
37         PVA_FF_AMRSpecificAtom(); // Default constructor
~PVA_FF_AMRSpecificAtom()38         virtual ~PVA_FF_AMRSpecificAtom() {}; // Destructor
39 
40         void setVendorcode(int32 VendorCode = PACKETVIDEO_FOURCC)
41         {
42             _VendorCode = VendorCode;
43         }
44         void setEncoderVersion(uint8 encoder_version = 0)
45         {
46             _encoder_version = encoder_version;
47         }
setModeSet(uint16 mode_set)48         void setModeSet(uint16 mode_set)
49         {
50             _mode_set = mode_set;
51         }
52         void setModeChangePeriod(uint8 mode_change_period = 0)
53         {
54             _mode_change_period = mode_change_period;
55         }
56         void setFramesPerSample(uint8 frames_per_sample = 1)
57         {
58             _frames_per_sample = frames_per_sample;
59         }
60 
getModeSet()61         uint16 getModeSet()
62         {
63             return _mode_set;
64         }
65 
66         virtual bool renderToFileStream(MP4_AUTHOR_FF_FILE_IO_WRAP *fp);
67 
68         virtual void recomputeSize();
69 
70     private:
71         int32            _VendorCode;
72         uint8            _encoder_version;
73         uint16           _mode_set;
74         uint8            _mode_change_period;
75         uint8            _frames_per_sample;
76 };
77 
78 #endif
79 
80