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 TrackReferenceAtom Class                        */
     21 /*     -------------------------------------------------------------------       */
     22 /*********************************************************************************/
     23 /*
     24     This TrackReferenceAtom Class provides a reference from the containing stream
     25     to another stream in the MPEG-4 presentation.
     26 */
     27 
     28 
     29 #ifndef TRACKREFERENCEATOM_H_INCLUDED
     30 #define TRACKREFERENCEATOM_H_INCLUDED
     31 
     32 #ifndef OSCL_FILE_IO_H_INCLUDED
     33 #include "oscl_file_io.h"
     34 #endif
     35 
     36 #ifndef ATOM_H_INCLUDED
     37 #include "atom.h"
     38 #endif
     39 
     40 #ifndef TRACKREFERENCETYPEATOM_H_INCLUDED
     41 #include "trackreferencetypeatom.h"
     42 #endif
     43 
     44 class TrackReferenceAtom : public Atom
     45 {
     46 
     47     public:
     48         TrackReferenceAtom(MP4_FF_FILE *fp, uint32 size, uint32 type);
     49         virtual ~TrackReferenceAtom(); // Destructor
     50 
     51         // Member get method
     52         const TrackReferenceTypeAtom &getTrackReferenceTypeAtom() const
     53         {
     54             return *_ptrackReferenceTypeAtom;
     55         }
     56 
     57         // Assuming a hint track can reference only ONE track
     58         uint32 getTrackReference() const
     59         {
     60             if (_ptrackReferenceTypeAtom != NULL)
     61             {
     62                 return _ptrackReferenceTypeAtom->getTrackReferenceAt(0);
     63             }
     64             else
     65             {
     66                 return 0;
     67             }
     68         }
     69 
     70     private:
     71         TrackReferenceTypeAtom *_ptrackReferenceTypeAtom;
     72 
     73 };
     74 
     75 #endif  // TRACKREFERENCEATOM_H_INCLUDED
     76 
     77 
     78 
     79