vtprotocolplugins/VideoSource/inc/cmultiframedataao.h
changeset 18 d9b6a8729acd
parent 4 6dc066157ed4
child 23 c378a0498b84
child 27 dcbddbbaf8fd
equal deleted inserted replaced
4:6dc066157ed4 18:d9b6a8729acd
     1 /*
       
     2 * Copyright (c) 2008 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:  Video Source subsystem.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_MULTIFRAMEDATAAO_H
       
    19 #define C_MULTIFRAMEDATAAO_H
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <e32base.h>
       
    23 #include "mmultiframeprovider.h"
       
    24 // FORWARD DECLARATIONS
       
    25 class CMultiframeProvider;
       
    26 
       
    27 // MACROS
       
    28 	
       
    29 /**
       
    30 *  @lib videosource.lib
       
    31 */
       
    32 // ============================ CMultiframeDataAO ===============================
       
    33 NONSHARABLE_CLASS( CMultiframeDataAO ) : public CTimer
       
    34     {
       
    35     public: // Constructors and destructor
       
    36 
       
    37         /**
       
    38         * Constructor.
       
    39         * @param "aRequester" instance to requester
       
    40         */
       
    41         CMultiframeDataAO( CMultiframeProvider* aRequester );
       
    42 
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         ~CMultiframeDataAO();
       
    47 
       
    48     public: // New functions
       
    49 				
       
    50 				/**
       
    51         * Sets observer.
       
    52         * @param "aObserever" instance to observer
       
    53         */
       
    54 				void SetObserver( MMultiframeprovider* aObserver );
       
    55 					
       
    56         /**
       
    57         * Activates CTimer
       
    58         * @param "aUpdateTime" expiration time
       
    59         */
       
    60         void Activate( TTimeIntervalMicroSeconds aUpdateTime, TBool aInit, TBool aVFUpdate );
       
    61         
       
    62        	/**
       
    63         * Updates local buffer.
       
    64         * @param "aLocalBuffer" local buffer
       
    65         */
       
    66         void LocalBuffer( CVtImageBitmap* aLocalBuffer );
       
    67         
       
    68         /**
       
    69         * Updates remote buffer.
       
    70         * @param "aRemoteBuffer" remote buffer
       
    71         */
       
    72         void RemoteBuffer ( CVtImageBitmap* aRemoteBuffer );
       
    73         
       
    74         /**
       
    75         * Cancels looping and completes request in correct thread.
       
    76         */        
       
    77         void CancelTimeLoop();
       
    78 
       
    79     private:    // Functions from base classes
       
    80 
       
    81         /**
       
    82         * From CActive. See CActive for description.
       
    83         */
       
    84         void RunL();
       
    85 
       
    86     private:    // Data
       
    87 
       
    88         // Pointer to observer.
       
    89         MMultiframeprovider* iObserver; // not owned
       
    90         
       
    91         // Pointer to requester
       
    92         CMultiframeProvider* iRequester;
       
    93         
       
    94         // For updating ViewFinder buffer
       
    95         TImageShareDataBuffer iLocalBuffer;
       
    96         // For updating remote buffer
       
    97         TImageShareDataBuffer iRemoteBuffer;
       
    98         
       
    99         // For updating remote buffer if activated when active
       
   100         TImageShareDataBuffer iRemoteSecondBuffer;
       
   101         
       
   102         // For updating ViewFinder buffer if activated when active
       
   103         TImageShareDataBuffer iLocalSecondBuffer;
       
   104         
       
   105         // Initialization flag
       
   106         TBool iInit;
       
   107         
       
   108         // Delta calc ref point
       
   109        	TTimeIntervalMicroSeconds iTime;
       
   110         
       
   111         // VF update flag
       
   112         TBool iVFUpdate;
       
   113         
       
   114         // Id of thread whose active scheduler this instance is added into.
       
   115         TThreadId iThreadId;
       
   116         
       
   117         // A flag to indecate loop ao must be stopped
       
   118         TBool iRequireStopping;
       
   119     };
       
   120 
       
   121 #endif //C_MULTIFRAMEDATAAO_H
       
   122 
       
   123 //  End of File
       
   124 
       
   125 
       
   126 
       
   127 
       
   128