camcordermmfplugin/mediarecorder/Inc/CCMRMediaSource.h
changeset 0 9b3e960ffc8a
equal deleted inserted replaced
-1:000000000000 0:9b3e960ffc8a
       
     1 /*
       
     2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 *
       
    14 * Description:  Interface class for media source 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CCMRMEDIASOURCE_H
       
    20 #define CCMRMEDIASOURCE_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "CCMRMediaSink.h"
       
    26 
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 *  Internal media source class, a common interface from active output objects to audio & video sources
       
    32 *  
       
    33 *  @lib CAMCMEDIARECORDER.LIB
       
    34 *  @since 2.1
       
    35 */
       
    36 class MCMRMediaSource
       
    37     {
       
    38         
       
    39     public:
       
    40 
       
    41         /**
       
    42         * Sink (output active object) is ready to accept new data
       
    43         * @since 2.1
       
    44         * @param aStatus    status object for active object
       
    45         * @return void
       
    46         */
       
    47         virtual void RequestNewData(TRequestStatus& aStatus) = 0;
       
    48 
       
    49         /**
       
    50         * Cancel previous "request new data" request
       
    51         */
       
    52         virtual void RequestNewDataCancel(TRequestStatus& aStatus) = 0;
       
    53 
       
    54         /**
       
    55         * Get the next output buffer
       
    56         * @since 2.1
       
    57         * @return CCMRMediaBuffer* buffer, or NULL if doesn't exist
       
    58         */
       
    59         virtual CCMRMediaBuffer* GetNextBuffer() = 0;
       
    60 
       
    61         /**
       
    62         * Get the number of output buffers waiting in the source
       
    63         * @since 2.1
       
    64         * @return Number of buffers
       
    65         */
       
    66         virtual TInt NumBuffersWaiting() = 0;
       
    67 
       
    68         /**
       
    69         * Return the latest time stamp from the input stream
       
    70         * @since 2.1
       
    71         * @param TTimeIntervalMicroSeconds& aTimeStamp
       
    72         */
       
    73         virtual void LatestTimeStampL(TTimeIntervalMicroSeconds& aTimeStamp) const = 0;
       
    74 
       
    75         /**
       
    76         * Return the duration of the recording
       
    77         * @since 2.6
       
    78         * @param TTimeIntervalMicroSeconds& aDuration
       
    79         */
       
    80         virtual void DurationL(TTimeIntervalMicroSeconds& aDuration) const = 0;
       
    81 
       
    82         /**
       
    83         * Return a previously given buffer back to the source
       
    84         * @since 2.1
       
    85         * @param aBuffer The buffer to return
       
    86         * @return void
       
    87         */
       
    88         virtual void ReturnBuffer(CCMRMediaBuffer* aBuffer) = 0;
       
    89 
       
    90     };
       
    91 
       
    92 
       
    93 #endif // CCMRMEDIASOURCE_H
       
    94 
       
    95 
       
    96 // End of file