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_VisualSampleEntry Class is used for visual streams.
20*/
21
22
23#ifndef __H263SampleEntry_H__
24#define __H263SampleEntry_H__
25
26#include "sampleentry.h"
27#include "decoderspecificinfo.h"
28#include "h263decoderspecificinfo3gpp.h"
29
30class PVA_FF_H263SampleEntry : public PVA_FF_SampleEntry
31{
32
33    public:
34
35        PVA_FF_H263SampleEntry(); // Constructor
36
37        virtual ~PVA_FF_H263SampleEntry();
38
39        // Rendering the PVA_FF_Atom in proper format (bitlengths, etc.) to an ostream
40        virtual bool renderToFileStream(MP4_AUTHOR_FF_FILE_IO_WRAP *fp);
41
42        // Getting and setting the Mpeg4 VOL header
43        virtual PVA_FF_DecoderSpecificInfo *getDecoderSpecificInfo() const
44        {
45            return NULL;
46        }
47        virtual PVA_FF_H263SpecficAtom *get3GPPDecoderSpecificInfo() const
48        {
49            return pH263SpecificAtom;
50        }
51
52        void setVideoParams(uint16 frame_width, uint16 frame_height)
53        {
54            _reserved2 = frame_width;
55            _reserved2 = (_reserved2 << 16);
56
57            _reserved2 |= frame_height;
58        }
59
60    private:
61        void init();
62        virtual void recomputeSize();
63
64        // Reserved constants
65        uint32 _reserved1[4]; // = { 0, 0, 0, 0 };
66        uint32 _reserved2; // = 0x014000f0;
67        uint32 _reserved3; // = 0x00480000;
68        uint32 _reserved4; // = 0x00480000;
69        uint32 _reserved5; // = 0;
70        uint16 _reserved6; // = 1;
71        uint8  _reserved7[32]; // = 0;
72        uint16 _reserved8; // = 24;
73        int16  _reserved9; // = -1; // (16) SIGNED!
74
75        PVA_FF_H263SpecficAtom *pH263SpecificAtom;
76};
77
78
79#endif
80
81