Home | History | Annotate | Download | only in include
      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 /*     -------------------------------------------------------------------       */
     20 /*                        MPEG-4 H263SampleEntry Class                           */
     21 /*     -------------------------------------------------------------------       */
     22 /*********************************************************************************/
     23 
     24 
     25 #ifndef H263SAMPLEENTRY_H_INCLUDED
     26 #define H263SAMPLEENTRY_H_INCLUDED
     27 
     28 #ifndef ATOM_H_INCLUDED
     29 #include "atom.h"
     30 #endif
     31 
     32 #ifndef OSCL_FILE_IO_H_INCLUDED
     33 #include "oscl_file_io.h"
     34 #endif
     35 
     36 #ifndef GPP_H263DECODERSPECIFICINFO_H_INCLUDED
     37 #include "3gpp_h263decoderspecificinfo.h"
     38 #endif
     39 
     40 #ifndef H263DECODERSPECIFICINFO_H_INCLUDED
     41 #include "h263decoderspecificinfo.h"
     42 #endif
     43 
     44 class H263SampleEntry : public Atom
     45 {
     46 
     47     public:
     48         H263SampleEntry(MP4_FF_FILE *fp, uint32 size, uint32 type);
     49         virtual ~H263SampleEntry();
     50 
     51         // Getting and setting the Mpeg4 VOL header
     52         virtual DecoderSpecificInfo *get3GPPH263DecoderSpecificInfo()
     53         {
     54             return _pH263decSpecificInfo;
     55         }
     56 
     57         uint32 getAverageBitRate()
     58         {
     59             if (_pH263SpecificAtom != NULL)
     60             {
     61                 return (_pH263SpecificAtom->getAverageBitRate());
     62             }
     63             return 0;
     64         }
     65 
     66         uint32 getMaxBitRate()
     67         {
     68             if (_pH263SpecificAtom != NULL)
     69             {
     70                 return (_pH263SpecificAtom->getMaxBitRate());
     71             }
     72             return 0;
     73         }
     74 
     75         int16  getWidth()
     76         {
     77             return (_width);
     78         }
     79 
     80         int16  getHeight()
     81         {
     82             return (_height);
     83         }
     84 
     85     private:
     86         // Reserved constants
     87         uint8 _reserved[6];
     88         uint16 _dataReferenceIndex;
     89         uint32 _reserved1[4]; // = { 0, 0, 0, 0 };
     90         uint16 _width;
     91         uint16 _height;
     92         uint32 _reserved3; // = 0x00480000;
     93         uint32 _reserved4; // = 0x00480000;
     94         uint32 _reserved5; // = 0;
     95         uint16 _reserved6; // = 1;
     96         uint8  _reserved7[32]; // = 0;
     97         uint16 _reserved8; // = 24;
     98         uint16 _reserved9; // = -1; // (16) SIGNED!
     99 
    100         H263SpecficAtom          *_pH263SpecificAtom;
    101         H263DecoderSpecificInfo  *_pH263decSpecificInfo;
    102 };
    103 
    104 
    105 #endif // H263SAMPLEENTRY_H_INCLUDED
    106 
    107 
    108