videditor/ManualVideoEditor/inc/VeiEditVideoContainer.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 VEDEDITVIDEOCONTAINER_H
       
    21 #define VEDEDITVIDEOCONTAINER_H
       
    22 
       
    23 #include <coecntrl.h>
       
    24 #include <eiksbobs.h> 
       
    25 #include <VedMovie.h>
       
    26 #include <VedVideoClipInfo.h>
       
    27 #include <aknprogressdialog.h> 
       
    28 #include <aknutils.h>
       
    29 #include <aknlayoutdef.h> 
       
    30 
       
    31 #include "veivideodisplay.h"
       
    32 #include "veiframetaker.h"
       
    33 #include "veicutterbar.h"
       
    34 #include "VeiDisplayLighter.h"
       
    35 #include "VeiImageClipGenerator.h"
       
    36 #include "VeiTitleClipGenerator.h"
       
    37 #include "VeiImageConverter.h"
       
    38 #include "VeiRemConTarget.h"
       
    39 #include "VideoEditorCommon.h"
       
    40 
       
    41 const TInt KMaxZoomFactorX = 4;
       
    42 const TInt KMaxZoomFactorY = 2;
       
    43 
       
    44 const TInt KVolumeSliderMin = -10;
       
    45 const TInt KVolumeSliderMax = 10;
       
    46 const TInt KVolumeSliderStep = 1;
       
    47 
       
    48 class CVedMovie;
       
    49 class CVeiEditVideoView;
       
    50 class CAknProgressDialog;
       
    51 class CEikProgressInfo;
       
    52 class CAknsBasicBackgroundControlContext;
       
    53 class CVeiVideoDisplay;
       
    54 class CVeiTextDisplay;
       
    55 class CVeiCutterBar;
       
    56 class CPeriodic;
       
    57 class CVeiIconBox;
       
    58 class CAknNavigationDecorator;
       
    59 class CVeiSlider;
       
    60 class CStoryboardVideoItem;
       
    61 class CStoryboardAudioItem;
       
    62 class CTransitionInfo;
       
    63 
       
    64 using namespace VideoEditor;
       
    65 
       
    66 
       
    67 /**
       
    68  *  CVeiEditVideoContainer  container control class.
       
    69  *  
       
    70  */
       
    71 class CVeiEditVideoContainer: public CCoeControl, 
       
    72                               public MCoeControlObserver,
       
    73                               public MVedMovieObserver,
       
    74                               public MVedVideoClipFrameObserver, 
       
    75                               public MVedVideoClipInfoObserver, 
       
    76                               public MProgressDialogCallback,
       
    77                               public MConverterController,
       
    78                               public MVeiVideoDisplayObserver,
       
    79                               public MVeiFrameTakerObserver,
       
    80                               public MVeiMediakeyObserver
       
    81 
       
    82 
       
    83 {
       
    84 public:
       
    85 
       
    86     /**
       
    87      * Creates a CVeiEditVideoContainer object, which will draw 
       
    88      * itself to aRect.
       
    89      *
       
    90      * @param aRect Frame rectangle for container.
       
    91      * @param aMovie  movie being edited
       
    92      * @param aView	owner
       
    93      *
       
    94      * @return a pointer to the created instance of CVeiEditVideoContainer
       
    95      */
       
    96     static CVeiEditVideoContainer* NewL( const TRect& aRect,
       
    97                                          CVedMovie& aMovie, 
       
    98                                          CVeiEditVideoView& aView );
       
    99 
       
   100     /**  
       
   101      * Creates a CVeiEditVideoContainer object, which will draw
       
   102      * itself to aRect.
       
   103      * Leaves the created object in the cleanup stack.
       
   104      *
       
   105      * @param aRect Frame rectangle for container.
       
   106      * @param aMovie  movie being edited
       
   107      * @param aView	owner
       
   108      *
       
   109      * @return a pointer to the created instance of CVeiEditVideoContainer
       
   110      */
       
   111     static CVeiEditVideoContainer* NewLC( const TRect& aRect, 
       
   112                                           CVedMovie& aMovie, 
       
   113                                           CVeiEditVideoView& aView );
       
   114 
       
   115     /**
       
   116      * Constructor.
       
   117      *
       
   118      * @param aMovie instance of CVedMovie
       
   119      * @param aView instance of Edit Video View
       
   120      */
       
   121     CVeiEditVideoContainer( CVedMovie& aMovie, CVeiEditVideoView& aView );
       
   122 
       
   123     /**
       
   124      * Default constructor.
       
   125      * @param aRect Frame rectangle for container.
       
   126      */
       
   127     void ConstructL( const TRect& aRect );
       
   128 
       
   129     /**
       
   130      * Destructor.
       
   131      */
       
   132     virtual ~CVeiEditVideoContainer();
       
   133 
       
   134     /**
       
   135      * Enumeration for selection mode
       
   136      */
       
   137     enum TSelectionMode
       
   138     {
       
   139         EModeNavigation = 0,
       
   140         EModeMove,
       
   141         EModeDuration,
       
   142         EModeRecordingSetStart,
       
   143         EModeRecording,
       
   144         EModeRecordingPaused,
       
   145         EModeSlowMotion,
       
   146         EModePreview,
       
   147         EModeMixingAudio,
       
   148         EModeAdjustVolume
       
   149     };
       
   150 
       
   151     /**
       
   152      * Enumeration for preview state
       
   153      */
       
   154     enum TPreviewState
       
   155     {
       
   156         EStateInitializing = 0,
       
   157         EStateOpening,
       
   158         EStateStopped,
       
   159         EStatePlaying,
       
   160         EStatePaused,
       
   161         EStateClosed,
       
   162         EStateBuffering,
       
   163         EStateGettingFrame,
       
   164         EStateTerminating
       
   165     };
       
   166 
       
   167     TBool CurrentClipIsFile();
       
   168 
       
   169     /**
       
   170      * Sets cursor position to aCurrentIndex. If cursor is on audio track,
       
   171      * audio index is set and if in video track, video cursor is set.
       
   172      *
       
   173      * @param aCurrentIndex	Cursor position
       
   174      */
       
   175     void SetCurrentIndex( TInt aCurrentIndex );
       
   176 
       
   177     /**
       
   178      * Returns the current index.
       
   179      *
       
   180      * @return  current index
       
   181      */
       
   182     TInt CurrentIndex()const;
       
   183 
       
   184     /** 
       
   185      * Updates thumbnail in video array.
       
   186      *
       
   187      * @aIndex Index in video array
       
   188      */
       
   189     void UpdateThumbnailL( TInt aIndex );
       
   190 
       
   191     /**
       
   192      * Sets the selected status.
       
   193      * 
       
   194      * @param aSelected  status
       
   195      */
       
   196     void SetSelectionMode( TSelectionMode aSelectionMode );
       
   197 
       
   198     /**
       
   199      * Control iInfoDisplay's arrows visibility .
       
   200      */
       
   201     void ArrowsControl()const;
       
   202 
       
   203     /**
       
   204      * Returns the current index and decrements index.
       
   205      *
       
   206      * @return  current index
       
   207      */
       
   208     TUint GetAndDecrementCurrentIndex();
       
   209 
       
   210     void SetCursorLocation( TCursorLocation aCursorLocation );
       
   211 
       
   212     void PlayVideoFileL( const TDesC& aFilename, const TBool& aFullScreen );
       
   213 
       
   214     void PauseVideoL();
       
   215 
       
   216     /**
       
   217      * Starts playing video		 
       
   218      */
       
   219     void PlayVideo( const TDesC& aFilename, TBool& aFullScreen );
       
   220 
       
   221     void StopVideo( TBool aCloseStream );
       
   222 
       
   223     /**
       
   224      * Set starting value of slow motion.
       
   225      *
       
   226      * @param aSlowMotionStartValue slow motion value 
       
   227      */
       
   228     void SetSlowMotionStartValueL( TInt aSlowMotionStartValue );
       
   229 
       
   230     void SetRecordedAudioDuration( const TTimeIntervalMicroSeconds& aDuration );
       
   231     void DrawTrackBoxes()const;
       
   232 
       
   233 public:
       
   234 
       
   235     /**
       
   236      * Update function that is called by the static callback method.
       
   237      */
       
   238     void DoUpdate();
       
   239     /**
       
   240      *
       
   241      */
       
   242     void SetFinishedStatus( TBool aStatus );
       
   243     /**
       
   244      *
       
   245      */
       
   246     void TakeSnapshotL();
       
   247 
       
   248     /**
       
   249      * Saves snapshot.
       
   250      */
       
   251     void SaveSnapshotL();
       
   252     /**
       
   253      * Gets intra frame bitmap from video clip.
       
   254      *
       
   255      * @param aTime	intra frame time.
       
   256      */
       
   257     void GetThumbAtL( const TTimeIntervalMicroSeconds& aTime );
       
   258 
       
   259     /**
       
   260      *
       
   261      */
       
   262     TTimeIntervalMicroSeconds TotalLength();
       
   263 
       
   264     /**
       
   265      * Returns the playback position.
       
   266      * @return  playback position
       
   267      */
       
   268     TTimeIntervalMicroSeconds PlaybackPositionL();
       
   269 
       
   270 
       
   271     /**
       
   272      *	Sets hole screen to black
       
   273      *
       
   274      *
       
   275      */
       
   276     void SetBlackScreen( TBool aBlack );
       
   277 
       
   278 
       
   279     /**
       
   280      * Returns snapshots size by bytes.
       
   281      *
       
   282      *
       
   283      */
       
   284     TInt SnapshotSize();
       
   285 
       
   286     /**
       
   287      * Returns audio mixing ratio between original and imported track.
       
   288      * Used in EModeMixAudio
       
   289      *
       
   290      */
       
   291     TInt AudioMixingRatio()const;
       
   292 
       
   293     /**
       
   294      * Returns clip volume, used in EModeAdjustVolume
       
   295      *
       
   296      */
       
   297     TInt Volume()const;
       
   298 
       
   299     /**
       
   300      * Prepares the control for termination; stops video playback
       
   301      * and set the state to EStateTerminating.
       
   302      * 
       
   303      */
       
   304     void PrepareForTerminationL();
       
   305 
       
   306 private:
       
   307 
       
   308     /**
       
   309      * Callback function for the timer.
       
   310      *
       
   311      * @param aThis  self pointer
       
   312      *
       
   313      * @return  dummy value 42
       
   314      */
       
   315     static TInt Update( TAny* aThis );
       
   316 
       
   317     void StartZooming();
       
   318 
       
   319     void ShowMiddleAnimationL( TVedMiddleTransitionEffect aMiddleEffect );
       
   320     
       
   321     void ShowEndAnimationL( TVedEndTransitionEffect aEndEffect );
       
   322     
       
   323     void ShowStartAnimationL( TVedStartTransitionEffect aStartEffect );
       
   324     
       
   325     void SetColourToningIcons( TInt aIndex );
       
   326     
       
   327      /**
       
   328     * Handles video item timeline touch events
       
   329     * @param aPointerEvent pointer event
       
   330     */
       
   331     void HandleVideoTimelineTouchL( TPointerEvent aPointerEvent );
       
   332 
       
   333      /**
       
   334     * Handles volume slider touch events
       
   335     * @param aPointerEvent pointer event
       
   336     */
       
   337     void HandleVolumeSliderTouchL( TPointerEvent aPointerEvent );
       
   338 
       
   339     /**
       
   340      * Calculates the rects for the video items in the timeline
       
   341      * and adds them to iVideoItemRectArray
       
   342      */
       
   343     void CalculateVideoClipRects();   
       
   344     
       
   345     /**
       
   346      * Goes through the table iVideoItemRectArray and 
       
   347      * finds the clip that the user has clicked.
       
   348      * @param aPressedPointX The x coordinate value that was pressed
       
   349      * 			             inside the timeline
       
   350      * @return index of the clip that the user has clicked or -1 if 
       
   351      *         the click was in the empty part of the timeline
       
   352      */    
       
   353     TInt FindClickedClip( TInt aPressedPointX );
       
   354     
       
   355 private:
       
   356 
       
   357     /**
       
   358      * Gets album from aFilename. If file belongs to album, album name is
       
   359      * returned in aAlbumName, otherwise KNullDesc.
       
   360      */
       
   361     void GetAlbumL( const TDesC& aFilename, TDes& aAlbumName )const;
       
   362 
       
   363     /**
       
   364      * Starts active object which takes thumbnails from videoclip. 
       
   365      * When completed -> NotifyFramesCompleted(...)
       
   366      */
       
   367     void StartFrameTakerL( TInt aIndex );
       
   368 
       
   369     /**
       
   370      *
       
   371      */
       
   372     void ConvertBW( CFbsBitmap& aBitmap )const;
       
   373 
       
   374     /**
       
   375      *
       
   376      */
       
   377     void ConvertToning( CFbsBitmap& aBitmap )const;
       
   378 
       
   379 
       
   380     /**
       
   381      * Gets an object whose type is encapsulated by the specified TTypeUid 
       
   382      * object.
       
   383      *
       
   384      * @param aId Encapsulates the Uid that identifies the type of object
       
   385      * required.
       
   386      *
       
   387      * @return
       
   388      */
       
   389     virtual TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
       
   390 
       
   391 
       
   392     virtual void NotifyFramesCompleted( CFbsBitmap* aFirstFrame,
       
   393                                         CFbsBitmap* aLastFrame,
       
   394                                         CFbsBitmap* aTimelineFrame, 
       
   395                                         TInt aError );
       
   396 
       
   397 
       
   398     virtual void NotifyVideoDisplayEvent( const TPlayerEvent aEvent, 
       
   399                                           const TInt& aInfo = 0 );
       
   400     /**
       
   401     * From MVedVideoClipInfoObserver
       
   402     */
       
   403     virtual void NotifyVideoClipInfoReady( CVedVideoClipInfo& aInfo,
       
   404                                            TInt aError );
       
   405     void NotifyCompletion( TInt aErr );
       
   406 
       
   407     /**
       
   408     * From MVedMovieObserver
       
   409     */
       
   410     virtual void NotifyVideoClipAdded( CVedMovie& aMovie, TInt aIndex );
       
   411     
       
   412     virtual void NotifyVideoClipAddingFailed( CVedMovie& aMovie, TInt aError );
       
   413                                               
       
   414     virtual void NotifyVideoClipRemoved( CVedMovie& aMovie, TInt aIndex );
       
   415     
       
   416     virtual void NotifyVideoClipIndicesChanged( CVedMovie& aMovie, 
       
   417                                                 TInt aOldIndex, 
       
   418                                                 TInt aNewIndex );
       
   419                                                 
       
   420     virtual void NotifyVideoClipTimingsChanged( CVedMovie& aMovie,
       
   421                                                 TInt aIndex );
       
   422                                                 
       
   423     virtual void NotifyVideoClipColorEffectChanged( CVedMovie& aMovie,
       
   424                                                     TInt aIndex );
       
   425                                                     
       
   426     virtual void NotifyVideoClipAudioSettingsChanged( CVedMovie& aMovie,
       
   427                                                       TInt aIndex );
       
   428                                                       
       
   429     virtual void NotifyStartTransitionEffectChanged( CVedMovie& aMovie );
       
   430     
       
   431     virtual void NotifyMiddleTransitionEffectChanged( CVedMovie& aMovie, 
       
   432                                                       TInt aIndex );
       
   433                                                       
       
   434     virtual void NotifyEndTransitionEffectChanged( CVedMovie& aMovie );
       
   435     
       
   436     virtual void NotifyAudioClipAdded( CVedMovie& aMovie, 
       
   437                                        TInt aIndex );
       
   438                                        
       
   439     virtual void NotifyAudioClipAddingFailed( CVedMovie& aMovie, 
       
   440                                               TInt aError );
       
   441                                               
       
   442     virtual void NotifyAudioClipRemoved( CVedMovie& aMovie, 
       
   443                                          TInt aIndex );
       
   444                                          
       
   445     virtual void NotifyAudioClipIndicesChanged( CVedMovie& aMovie, 
       
   446                                                 TInt aOldIndex, 
       
   447                                                 TInt aNewIndex );
       
   448                                                 
       
   449     virtual void NotifyAudioClipTimingsChanged( CVedMovie& aMovie,
       
   450                                                 TInt aIndex );
       
   451                                                 
       
   452     virtual void NotifyMovieReseted( CVedMovie& aMovie );
       
   453 
       
   454     virtual void NotifyVideoClipFrameCompleted( CVedVideoClipInfo& aInfo, 
       
   455                                                 TInt aError,
       
   456                                                 CFbsBitmap* aFrame );
       
   457 
       
   458     virtual void NotifyVideoClipGeneratorSettingsChanged( CVedMovie& aMovie,
       
   459                                                           TInt aIndex );
       
   460 
       
   461     virtual void NotifyVideoClipDescriptiveNameChanged( CVedMovie& aMovie, 
       
   462                                                         TInt aIndex );
       
   463 
       
   464     virtual void NotifyMovieQualityChanged( CVedMovie& aMovie );
       
   465 
       
   466     virtual void NotifyMovieOutputParametersChanged( CVedMovie& aMovie );
       
   467 
       
   468     virtual void NotifyAudioClipDynamicLevelMarkInserted( CVedMovie& aMovie, 
       
   469                                                           TInt aClipIndex,
       
   470                                                           TInt aMarkIndex );
       
   471 
       
   472     virtual void NotifyAudioClipDynamicLevelMarkRemoved( CVedMovie& aMovie, 
       
   473                                                          TInt aClipIndex,
       
   474                                                          TInt aMarkIndex );
       
   475 
       
   476     virtual void NotifyVideoClipDynamicLevelMarkInserted( CVedMovie& aMovie, 
       
   477                                                           TInt aClipIndex,
       
   478                                                           TInt aMarkIndex );
       
   479 
       
   480     virtual void NotifyVideoClipDynamicLevelMarkRemoved( CVedMovie& aMovie, 
       
   481                                                          TInt aClipIndex, 
       
   482                                                          TInt aMarkIndex );
       
   483 
       
   484     virtual void DialogDismissedL( TInt aButtonId );
       
   485 
       
   486     /**
       
   487      * Moves selected audio clip right. Only for OfferKeyEventL use.
       
   488      *
       
   489      * @return EKeyWasConsumed if key event was processed and 
       
   490      * EKeyWasNotConsumed if it was not.
       
   491      */
       
   492     TKeyResponse MoveAudioRight();
       
   493 
       
   494     /**
       
   495      * Moves selected audio clip left. Only for OfferKeyEventL use.
       
   496      *
       
   497      * @return EKeyWasConsumed if key event was processed and 
       
   498      * EKeyWasNotConsumed if it was not.
       
   499      */
       
   500     TKeyResponse MoveAudioLeft();
       
   501 
       
   502 
       
   503     /**
       
   504      * Time increment.
       
   505      *
       
   506      * @return Time in milliseconds
       
   507      */
       
   508     TInt TimeIncrement( TInt aKeyCount )const;
       
   509 
       
   510     /*
       
   511      * From CoeControl,SizeChanged.
       
   512      */
       
   513     void SizeChanged();
       
   514 
       
   515     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   516     /**
       
   517      * From CoeControl,CountComponentControls.
       
   518      */
       
   519     TInt CountComponentControls()const;
       
   520 
       
   521     /**
       
   522      * From CCoeControl,ComponentControl.
       
   523      */
       
   524     CCoeControl* ComponentControl( TInt aIndex )const;
       
   525 
       
   526     /**
       
   527      * From CCoeControl,Draw.
       
   528      */
       
   529     void Draw( const TRect& aRect )const;
       
   530 
       
   531     /**
       
   532      * From CCoeControl. Handles a change to the control's resources.  
       
   533      * @param aType A message UID value.
       
   534      */
       
   535     void HandleResourceChange( TInt aType );
       
   536 
       
   537     /**
       
   538      * From CCoeControl, gets the control's help context. Associates the
       
   539      * control with a particular Help file and topic in a context sensitive
       
   540      * application.
       
   541      *
       
   542      * @param aContext Control's help context.
       
   543      */
       
   544     void GetHelpContext( TCoeHelpContext& aContext )const;
       
   545 
       
   546     /**
       
   547      * Draws play head when previewing video
       
   548      */
       
   549     void DrawPlayHead() /*const*/;
       
   550 
       
   551     /**
       
   552      * From MCoeControlObserver, called when there is a control event
       
   553      * to handle.
       
   554      *
       
   555      * @param aControl  control originating the event
       
   556      * @param aEventType  event type
       
   557      */
       
   558     void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
       
   559 
       
   560     /**
       
   561     * From CCoeControl
       
   562     *
       
   563     * @param aPointerEvent  pointer event
       
   564     */
       
   565     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
   566 
       
   567     /**
       
   568      * Callback function for the  playhead timer.
       
   569      * @param aThis  self pointer
       
   570      * @return  dummy value 42
       
   571      */
       
   572     static TInt UpdatePosition( TAny* aThis );
       
   573 
       
   574     /**
       
   575      * Update function that is called by the static 
       
   576      * callback method - UpdatePosition.
       
   577      */
       
   578     void DoUpdatePosition();
       
   579 
       
   580     /**
       
   581      * Returns the boolean is audioclip cutted.
       
   582      *
       
   583      * @return  TBool
       
   584      */
       
   585     TBool IsAudioClipCutted();
       
   586 
       
   587     TKeyResponse HandleScrollBarL( const TKeyEvent& aKeyEvent,
       
   588                                    TEventCode aType );
       
   589 
       
   590     void CreateScrollBarL( const TRect& aRect );
       
   591 
       
   592     /**
       
   593      * Cancels saving of the snapshot.
       
   594      */
       
   595     void CancelSnapshotSave();
       
   596 
       
   597     /**
       
   598      * Starts progress dialog
       
   599      *
       
   600      * @param aDialogResId resource id of the dialog
       
   601      * @param aTextResId text of dialog
       
   602      */
       
   603     void StartProgressDialogL( const TInt aDialogResId, const TInt aTextResId );
       
   604 
       
   605     void SetPreviewState( const TPreviewState aNewState );
       
   606 
       
   607     /**	HandleVolumeUpL 
       
   608      *
       
   609      *   @see MVeiMediakeyObserver
       
   610      */
       
   611     virtual void HandleVolumeUpL();
       
   612 
       
   613     /**	HandleVolumeDownL 
       
   614      *
       
   615      *   @see MVeiMediakeyObserver
       
   616      */
       
   617     virtual void HandleVolumeDownL();
       
   618 
       
   619     /** Callback function */
       
   620     static TInt AsyncTakeSnapshot( TAny* aThis );
       
   621 
       
   622 private:
       
   623     CVeiDisplayLighter* iScreenLight;
       
   624     /** View eg.owner*/
       
   625     CVeiEditVideoView& iView;
       
   626 
       
   627     /** Movie being edited. */
       
   628     CVedMovie& iMovie;
       
   629 
       
   630     /** Currently processed thumbnail index. */
       
   631     TInt iCurrentlyProcessedIndex;
       
   632 
       
   633     /** Video cursor position. */
       
   634     TInt iVideoCursorPos;
       
   635 
       
   636     /** Audio cursor position. */
       
   637     TInt iAudioCursorPos;
       
   638 
       
   639     /** No thumbnail icon. */
       
   640     CFbsBitmap* iNoThumbnailIcon;
       
   641     CFbsBitmap* iNoThumbnailIconMask;
       
   642 
       
   643     /** Audio icon. */
       
   644     CFbsBitmap* iAudioIcon;
       
   645 
       
   646     /** Audio mixing icon. */
       
   647     CFbsBitmap* iAudioMixingIcon;
       
   648 
       
   649     CFbsBitmap* iAudioTrackIcon;
       
   650     CFbsBitmap* iAudioTrackIconMask;
       
   651     /** Video track icon. */
       
   652     CFbsBitmap* iVideoTrackIcon;
       
   653     CFbsBitmap* iVideoTrackIconMask;
       
   654 
       
   655     /** Array of video items. */
       
   656     RPointerArray < CStoryboardVideoItem > iVideoItemArray;
       
   657 
       
   658     /** Array of audio items. */
       
   659     RPointerArray < CStoryboardAudioItem > iAudioItemArray;
       
   660 
       
   661     /** Array of video item rects. */
       
   662     RArray < TRect > iVideoItemRectArray;
       
   663 
       
   664     /** The index of the clip that the user has clicked. */
       
   665     TInt iClickedClip;
       
   666     
       
   667     /** The part of the timeline that doesn't include video clips.
       
   668         If there are no video clips, the rect is the same as the
       
   669         whole timeline (=iVideoBarBox) */    
       
   670     TRect iEmptyVideoTimeLineRect;
       
   671 
       
   672     /** Cursor location. */
       
   673     TCursorLocation iCursorLocation;
       
   674 
       
   675     /** Selection mode. */
       
   676     TSelectionMode iSelectionMode;
       
   677 
       
   678     /** Transition info. */
       
   679     CTransitionInfo* iTransitionInfo;
       
   680 
       
   681     /** Previous cursor location. */
       
   682     TCursorLocation iPrevCursorLocation;
       
   683 
       
   684     /** Key repeat count. Incremented in OfferKeyEventL() */
       
   685     TInt iKeyRepeatCount;
       
   686 
       
   687     TSize iTransitionMarkerSize;
       
   688     TRect iVideoBarBox;
       
   689     TRect iAudioBarBox;
       
   690     TPoint iAudioBarIconPos;
       
   691     TRect iAudioTrackBox;
       
   692     TPoint iVideoBarIconPos;
       
   693     TRect iVideoTrackBox;
       
   694     TRect iBarArea;
       
   695     TRect iTextArea;
       
   696     TInt iTextBaseline;
       
   697     TRect iIconArea;
       
   698     TRect iIconTopEmptyArea;
       
   699     TRect iIconBottomEmptyArea;
       
   700     TInt iIconTextBaseline;
       
   701     TPoint iHorizontalSliderPoint;
       
   702     TSize iHorizontalSliderSize;
       
   703     TPoint iVerticalSliderPoint;
       
   704     TSize iVerticalSliderSize;
       
   705 
       
   706     CAknProgressDialog* iProgressDialog;
       
   707     //CEikProgressInfo*	iProgressInfo;
       
   708 
       
   709     /** Background context. Skin stuff. */
       
   710     CAknsBasicBackgroundControlContext* iBgContext;
       
   711 
       
   712     TTimeIntervalMicroSeconds iRecordedAudioStartTime;
       
   713     TTimeIntervalMicroSeconds iRecordedAudioDuration;
       
   714 
       
   715     TBool iRecordedAudio;
       
   716 
       
   717     TInt iZoomFactorX;
       
   718     TInt iZoomFactorY;
       
   719     CPeriodic* iZoomTimer;
       
   720 
       
   721     CVeiVideoDisplay* iVideoDisplay;
       
   722 
       
   723     CVeiVideoDisplay* iTransitionDisplayLeft; // left hand side
       
   724     CVeiVideoDisplay* iTransitionDisplayRight; // right hand side
       
   725     TRect iTransitionDisplayLeftBox;
       
   726     TRect iTransitionDisplayRightBox;
       
   727 
       
   728     CVeiTextDisplay* iInfoDisplay;
       
   729     CVeiTextDisplay* iArrowsDisplay;
       
   730 
       
   731     TRect iVideoDisplayBox;
       
   732     TRect iVideoDisplayBoxOnTransition;
       
   733     TRect iInfoDisplayBox;
       
   734     TRect iSlowMotionBox;
       
   735     TRect iTransitionArrowsBox;
       
   736 
       
   737     CVeiCutterBar* iDummyCutBar;
       
   738     CVeiCutterBar* iDummyCutBarLeft;
       
   739 
       
   740     /* Iconbox */
       
   741     CVeiIconBox* iEffectSymbols;
       
   742     TRect iEffectSymbolBox;
       
   743 
       
   744     TRect iDummyCutBarBox;
       
   745     TRect iDummyCutBarBoxOnTransition;
       
   746 
       
   747     CFbsBitmap* iGradientBitmap;
       
   748 
       
   749     TBool iFinished;
       
   750     TBool iTakeSnapshot;
       
   751     HBufC* iSaveToFileName;
       
   752 
       
   753     /** Seek thumbnail position in video clip. */
       
   754     TTimeIntervalMicroSeconds iSeekPos;
       
   755 
       
   756     /** Seek - flag. */
       
   757     TBool iSeeking;
       
   758 
       
   759     /** Last keycode, used in OfferKeyEventL(); */
       
   760     TUint iLastKeyCode;
       
   761 
       
   762     /** Last position. */
       
   763     TTimeIntervalMicroSeconds iLastPosition;
       
   764 
       
   765 
       
   766     /** Periodic timer used for playhead update . */
       
   767     CPeriodic* iPeriodic;
       
   768     /** Current point. This is where the horizontal bar is drawn. */
       
   769     TUint iCurrentPoint;
       
   770     CVeiImageConverter* iConverter;
       
   771 
       
   772     TInt iSlowMotionValue;
       
   773 
       
   774     //** Preview flag. */
       
   775     TBool iFullScreenSelected;
       
   776 
       
   777     CVeiFrameTaker* iFrameTaker;
       
   778 
       
   779     //** GetFrame-flag for seeking functionality. */
       
   780     TBool iSeekingFrame;
       
   781 
       
   782     HBufC* iTempFileName;
       
   783 
       
   784     CVedVideoClipInfo* iTempVideoInfo;
       
   785 
       
   786     /** Current preview state. */
       
   787     TPreviewState iPreviewState;
       
   788     /** Previous preview state. */
       
   789     TPreviewState iPreviousPreviewState;
       
   790 
       
   791     TInt iCurrentPointX;
       
   792     TBool iCloseStream;
       
   793     TBool iFrameReady;
       
   794     TBool iBackKeyPressed;
       
   795     /** Previous cursor location for preview. */
       
   796     TCursorLocation iCursorPreviousLocation;
       
   797 
       
   798     /** Flag indicating to draw the screen black. */
       
   799     TBool iBlackScreen;
       
   800 
       
   801     /** Horizontal slider component. */
       
   802     CVeiSlider* iHorizontalSlider;
       
   803     /** Vertical slider component. */
       
   804     CVeiSlider* iVerticalSlider;
       
   805 
       
   806     /** Flag telling whether video file must be reopened in preview. */
       
   807     TBool iMustBeReopened;
       
   808 
       
   809     /** Pause indicator. */
       
   810     TRect iPauseIconBox;
       
   811     CFbsBitmap* iPauseBitmap;
       
   812     CFbsBitmap* iPauseBitmapMask;
       
   813 
       
   814     /** Remote connection API used to handle the volume keys. */
       
   815     CVeiRemConTarget* iRemConTarget;
       
   816 
       
   817     TBool iTakeSnapshotWaiting;
       
   818 
       
   819     /** Callback utility */
       
   820     CAsyncCallBack* iCallBack;
       
   821 
       
   822     /** ETrue if user is dragging a video clip with touch,
       
   823     	EFalse otherwise */
       
   824     TBool iIsVideoDrag;
       
   825 
       
   826     /** ETrue if the pen goes down inside a timeline video clip
       
   827     	EFalse otherwise */		
       
   828     TBool iIsVideoTapped;
       
   829     
       
   830     /** The position where the user is dragging the clip into */    
       
   831     TInt iNewClipPosition;
       
   832 
       
   833 #include "veieditvideocontainer.inl"
       
   834 };
       
   835 
       
   836 #endif 
       
   837 // End of File