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     This PVA_FF_MpegSampleEntry is used for hint tracks.
     20 */
     21 
     22 
     23 #ifndef __MpegSampleEntry_H__
     24 #define __MpegSampleEntry_H__
     25 
     26 #include "sampleentry.h"
     27 #include "esdatom.h"
     28 
     29 
     30 class PVA_FF_MpegSampleEntry : public PVA_FF_SampleEntry
     31 {
     32 
     33     public:
     34         PVA_FF_MpegSampleEntry(int32 mediaType); // Constructor
     35         PVA_FF_MpegSampleEntry(MP4_AUTHOR_FF_FILE_IO_WRAP *fp, int32 mediaType); // Stream-in Constructor
     36         PVA_FF_MpegSampleEntry(const PVA_FF_MpegSampleEntry &entry); // Copy Constructor
     37         virtual ~PVA_FF_MpegSampleEntry();
     38 
     39         // Member gets and sets
     40         const PVA_FF_ESDAtom &getESDAtom() const
     41         {
     42             return *_pes;
     43         }
     44         void setESDAtom(PVA_FF_ESDAtom *esd)
     45         {
     46             _pes = esd;
     47         }
     48 
     49         // Rendering the PVA_FF_Atom in proper format (bitlengths, etc.) to an ostream
     50         virtual bool renderToFileStream(MP4_AUTHOR_FF_FILE_IO_WRAP *fp);
     51 
     52         // Getting and setting the Mpeg4 VOL header
     53         virtual PVA_FF_DecoderSpecificInfo *getDecoderSpecificInfo() const
     54         {
     55             return _pes->getDecoderSpecificInfo();
     56         }
     57         virtual void addDecoderSpecificInfo(PVA_FF_DecoderSpecificInfo *pinfo)
     58         {
     59             _pes->addDecoderSpecificInfo(pinfo);
     60         }
     61 
     62         void nextSampleSize(uint32 size)
     63         {
     64             _pes->nextSampleSize(size);
     65         }
     66 
     67         void setMaxBufferSizeDB(uint32 max)
     68         {
     69             _pes->setMaxBufferSizeDB(max);
     70         }
     71 
     72         void setESID(uint16 esid)
     73         {
     74             _pes->setESID(esid);
     75         }
     76 
     77         void writeMaxSampleSize(MP4_AUTHOR_FF_FILE_IO_WRAP *_afp)
     78         {
     79             _pes->writeMaxSampleSize(_afp);
     80         }
     81 
     82     private:
     83         void init();
     84         virtual void recomputeSize();
     85 
     86         PVA_FF_ESDAtom *_pes;
     87 
     88 };
     89 
     90 
     91 #endif
     92 
     93