videoeditorengine/vedengine/videoprocessor/inc/mpeg4timer.h
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 * Definition for CMPEG4Timer.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef     __MPEG4TIMER_H__
       
    24 #define     __MPEG4TIMER_H__
       
    25 
       
    26 /* 
       
    27 * Includes
       
    28 */
       
    29 
       
    30 #include <e32base.h>
       
    31 #include <gdi.h>
       
    32 #include <e32std.h>
       
    33 #include "vedcommon.h"
       
    34 #include "movieprocessorimpl.h"
       
    35 
       
    36 /* 
       
    37 *  Class Declarations
       
    38 */
       
    39 
       
    40 class CMPEG4Timer: public CBase
       
    41 {
       
    42 public:
       
    43 
       
    44 	 /**
       
    45 	 * Public member functions 
       
    46 	 */
       
    47 
       
    48 	 /**
       
    49 	 * C++ default constructor
       
    50 	 */
       
    51 	CMPEG4Timer() {};
       
    52 
       
    53 	/** 
       
    54 	 * Destructor can be called at any time (i.e., also in the middle of a processing operation)
       
    55 	 * Should release all allocated resources, including releasing all allocated memory and 
       
    56 	 * *deleting* all output files that are currently being processed but not yet completed.
       
    57 	 */
       
    58 	~CMPEG4Timer();
       
    59 
       
    60 	 /** 
       
    61 	 * Constructors for instantiating new video processors.
       
    62 	 * Should reserve as little resources as possible at this point.
       
    63 	 */
       
    64 	static CMPEG4Timer * NewL(CMovieProcessorImpl * aMovProcessor, TInt aTimeIncrementResolution);
       
    65 
       
    66 	 /** 
       
    67      * Get the frame duration in millisec from the last frame with modulo base larger than zero 
       
    68      *          
       
    69      * @return Duration in millisec
       
    70 	 *
       
    71      */
       
    72 	TInt64 GetMPEG4DurationInMsSinceLastModulo();
       
    73 
       
    74 	 /** 
       
    75      * Update the time stamp and duration of the last frame for MPEG-4 video 
       
    76      *          
       
    77 	 * @param aAbsFrameNumber        frame number in the movie
       
    78 	 * @param aFrameNumber           frame number in the current video clip
       
    79 	 * @param aTimeScale             time scale 
       
    80 	 *
       
    81      */
       
    82 	void UpdateMPEG4Time(TInt aAbsFrameNumber, TInt aFrameNumber, TInt aTimeScale);
       
    83 
       
    84 	 /** 
       
    85      * Pointer to iMPEG4TimeStamp object (contains MPEG-4 frame timing information)
       
    86      *          
       
    87      */
       
    88 	tMPEG4TimeParameter * GetMPEG4TimeStampPtr() { return &iMPEG4TimeStamp; }
       
    89 
       
    90 	 /** 
       
    91      * Pointer to iMPEG4TimeResolution object (contains MPEG-4 frame time resolution information)
       
    92      *          
       
    93      */
       
    94 	TInt * GetMPEG4TimeResolutionPtr() { return &iMPEG4TimeResolution; }
       
    95 
       
    96 
       
    97 private:
       
    98 
       
    99 	/* 
       
   100 	 * Private member functions 
       
   101 	 */
       
   102 
       
   103 	 /** 
       
   104      * Symbian OS C++ style constructor 
       
   105 	 *
       
   106      */
       
   107 	void ConstructL(CMovieProcessorImpl * aMovProcessor, TInt aTimeIncrementResolution);
       
   108 
       
   109 	/* 
       
   110 	 * Member variables 
       
   111 	 */
       
   112 	
       
   113 	/* frame duration in millisec from the last frame with modulo base larger than zero */
       
   114 	TInt iMPEG4DurationInMsSinceLastModulo;
       
   115 
       
   116 	/* structure for timing information of MPEG-4 frame */
       
   117 	tMPEG4TimeParameter iMPEG4TimeStamp;
       
   118 
       
   119 	/* time resolution of MPEG-4 video clip */
       
   120 	TInt iMPEG4TimeResolution;
       
   121 
       
   122 	/* video processor object */
       
   123 	CMovieProcessorImpl * iProcessor;	
       
   124 
       
   125 	TInt iPrevModuloTimeBaseVal;
       
   126 
       
   127 };
       
   128 
       
   129 #endif      /* __TRANSCODER_H__ */
       
   130             
       
   131 /* End of File */