videoeditorengine/audioeditorengine/codecs/AWB/inc/ProcAWBInFileHandler.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 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPROCAWBINFILEHANDLER_H__
       
    21 #define __CPROCAWBINFILEHANDLER_H__
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <f32file.h>
       
    25 #include "AudCommon.h"
       
    26 #include "ProcConstants.h"
       
    27 #include "ProcInFileHandler.h"
       
    28 
       
    29 
       
    30 class CProcAWBInFileHandler: public CProcInFileHandler 
       
    31     {
       
    32 
       
    33 public:
       
    34 
       
    35     static CProcAWBInFileHandler* NewL(const TDesC& aFileName, 
       
    36                                        RFile* aFileHandle,
       
    37                                        CAudClip* aClip, TInt aReadBufferSize,
       
    38                                        TInt aTargetSampleRate = 0, 
       
    39                                        TChannelMode aChannelMode = EAudSingleChannel);
       
    40                                        
       
    41     static CProcAWBInFileHandler* NewLC(const TDesC& aFileName, 
       
    42                                         RFile* aFileHandle,
       
    43                                         CAudClip* aClip, TInt aReadBufferSize,
       
    44                                         TInt aTargetSampleRate = 0, 
       
    45                                         TChannelMode aChannelMode = EAudSingleChannel);
       
    46 
       
    47 
       
    48     // From base class
       
    49 
       
    50     void GetPropertiesL(TAudFileProperties* aProperties);
       
    51     
       
    52     /**
       
    53     * Seeks a certain audio frame for reading
       
    54     *
       
    55     * Possible leave codes:  
       
    56     *    
       
    57     * @param aFrameIndex    frame index
       
    58     * @param aTime            time from the beginning of file in milliseconds
       
    59     *
       
    60     * @return    ETrue if successful
       
    61     *            EFalse if beyond the file
       
    62     */
       
    63     TBool SeekAudioFrame(TInt32 aTime);
       
    64 
       
    65     
       
    66     /**
       
    67     * Seeks a cut in audio frame for reading
       
    68     *
       
    69     * Possible leave codes:  
       
    70     *    
       
    71     *
       
    72     * @return    ETrue if successful
       
    73     *                
       
    74     */
       
    75     TBool SeekCutInFrame();
       
    76     
       
    77     virtual TBool SetNormalizingGainL(const CProcFrameHandler* aFrameHandler);
       
    78 
       
    79     virtual ~CProcAWBInFileHandler();
       
    80 
       
    81 
       
    82     
       
    83 
       
    84 private:
       
    85     
       
    86     void ConstructL(const TDesC& aFileName, RFile* aFileHandle, CAudClip* aClip, 
       
    87                     TInt aReadBufferSize, TInt aTargetSampleRate = 0, 
       
    88                     TChannelMode aChannelMode = EAudSingleChannel);
       
    89                     
       
    90     TBool GetEncAudioFrameL(HBufC8*& aFrame, TInt& aSize, TInt32& aTime);
       
    91     
       
    92     // durations in milliseconds
       
    93     virtual TBool GetFrameInfo(TInt& aSongDuration,
       
    94                                 TInt& aFrameAmount, 
       
    95                                 TInt& aAverageFrameDuration, 
       
    96                                 TInt& aAverageFrameSize);
       
    97 
       
    98 
       
    99 
       
   100 protected:
       
   101     
       
   102     CProcAWBInFileHandler();
       
   103     
       
   104     };
       
   105 
       
   106 #endif