videditor/ManualVideoEditor/inc/VeiEditVideoView.h
changeset 9 d87d32eab1a9
parent 0 951a5db380a0
equal deleted inserted replaced
0:951a5db380a0 9:d87d32eab1a9
     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 
       
    21 #ifndef VEDEDITVIDEOVIEW_H
       
    22 #define VEDEDITVIDEOVIEW_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <aknview.h>
       
    26 #include <maknfilefilter.h> 
       
    27 #include <aknprogressdialog.h> 
       
    28 #include <VedMovie.h>
       
    29 #include <utility.h>
       
    30 #include <caknmemoryselectiondialog.h> 
       
    31 #include "VeiAddQueue.h"
       
    32 #include "VeiTitleClipGenerator.h"
       
    33 #include "VeiImageClipGenerator.h"
       
    34 #include "VeiPopup.h"
       
    35 
       
    36 #include "veisettingsview.h"
       
    37 
       
    38 #include <AknQueryDialog.h> 
       
    39 
       
    40 //  CONSTANTS
       
    41 const TUid KView4Id = {4};
       
    42 const TInt KMinVolume = 1;
       
    43 const TInt KMaxVolume = 10;
       
    44 
       
    45 //  FORWARD DECLARATIONS
       
    46 class CVeiEditVideoContainer;
       
    47 class CVeiCutVideoView;
       
    48 class CVeiCutAudioView;
       
    49 class CAknNaviLabel;
       
    50 class CVeiEditVideoLabelNavi;
       
    51 class CAknNavigationControlContainer;
       
    52 class CAknNavigationDecorator;
       
    53 class MGFetch;
       
    54 class CAknProgressDialog;
       
    55 class CSendUi;
       
    56 class CVedMovie;
       
    57 class CMdaAudioConvertUtility;
       
    58 class MAknsDataContext;
       
    59 class CMdaAudioRecorderUtility;
       
    60 class CVeiErrorUI;
       
    61 class CVeiTempMaker;
       
    62 class CAknMemorySelectionDialog;
       
    63 class CAknWaitDialog;
       
    64 
       
    65 class CVeiAddQueue;
       
    66 
       
    67 class CVeiTextDisplay;
       
    68 class CVeiPopup;
       
    69 
       
    70 
       
    71 
       
    72 //  CLASS DECLARATION
       
    73 
       
    74 /**
       
    75  *  CVeiEditVideoView view class.
       
    76  */
       
    77 class CVeiEditVideoView: public CAknView, 
       
    78                          public MProgressDialogCallback, 
       
    79                          public MVedMovieObserver, 
       
    80                          public MVedMovieProcessingObserver,
       
    81                          public MVedAudioClipInfoObserver, 
       
    82                          public MMdaObjectStateChangeObserver,
       
    83                          public MVeiImageClipGeneratorObserver,
       
    84                          public MVeiTitleClipGeneratorObserver,
       
    85                          public MVeiQueueObserver
       
    86 
       
    87 {
       
    88 
       
    89 public:
       
    90     //Constructors and destructor
       
    91 
       
    92     /**
       
    93      * Static factory constructor.
       
    94      *
       
    95      * @param aCutView Instance of cut video view.
       
    96      * @param aCutAudioView No description.
       
    97      * @param aSendAppUi No description.
       
    98      * @return Created <code>CVeiEditVideoView</code> instance.
       
    99      */
       
   100     static CVeiEditVideoView* NewL( CVeiCutVideoView& aCutView, 
       
   101                                     CVeiCutAudioView& aCutAudioView, 
       
   102                                     CSendUi& aSendAppUi );
       
   103 
       
   104     /**
       
   105      * Static factory constructor. Leaves the created object in the
       
   106      * cleanup stack.
       
   107      *
       
   108      * @param aCutView Instance of cut video view.
       
   109      * @param aCutAudioView No description.
       
   110      * @param aSendAppUi No description.
       
   111      * @return Created <code>CVeiEditVideoView</code> instance.
       
   112      */
       
   113     static CVeiEditVideoView* NewLC( CVeiCutVideoView& aCutView,
       
   114                                      CVeiCutAudioView& aCutAudioView, 
       
   115                                      CSendUi& aSendAppUi );
       
   116 
       
   117     /**
       
   118      * Destructor.
       
   119      */
       
   120     virtual ~CVeiEditVideoView();
       
   121 
       
   122     TUid Id()const;
       
   123 
       
   124 public:
       
   125     // New functions
       
   126 
       
   127     void CancelWaitDialog( TInt aError = 0 );
       
   128     /**
       
   129      * Inserts video clip to movie
       
   130      *
       
   131      * @param aFilename Video clip to insert.
       
   132      * @param aStartNow No description.
       
   133      * @return <code>KErrNone</code> if process was started,
       
   134      *		   <code>KErrNotReady</code> if movie was not ready.
       
   135      */
       
   136     TInt AddClipL( const TDesC& aFilename, TBool aStartNow );
       
   137 
       
   138     /**
       
   139      * Shows error note with given message.
       
   140      * 
       
   141      * @param aResourceId No description.
       
   142      * @param aError No description.
       
   143      */
       
   144     void ShowErrorNote( const TInt aResourceId, TInt aError = 0 )const;
       
   145 
       
   146     /**
       
   147      * Shows global error note for given error.
       
   148      * There are empirically tested error codes for which platform shows something
       
   149      * For other ones platform does not show anything and for them default string is showed.
       
   150      * These error codes must be individually tested for every phone model.
       
   151      *
       
   152      * @param aError standard error code
       
   153      */
       
   154     void ShowGlobalErrorNote( TInt aError = 0 )const;
       
   155 
       
   156     /**
       
   157      * Returns audio duration of the movie.
       
   158      * 
       
   159      * @return  movie audio duration in microseconds
       
   160      */
       
   161     TTimeIntervalMicroSeconds OriginalAudioDuration()const;
       
   162 
       
   163     /**
       
   164      * Inserts next video clip to movie from videoclip array.
       
   165      */
       
   166     void AddNext();
       
   167 
       
   168     /**
       
   169      * Processing wait modes
       
   170      */
       
   171     enum TWaitMode
       
   172     {
       
   173         ENotWaiting = 0x6300,  // 25344
       
   174         EProcessingMovieSave,
       
   175         EProcessingMovieSaveThenQuit,
       
   176         EOpeningAudioInfo,
       
   177         EConvertingAudio,
       
   178         EProcessingMovieForCutting,
       
   179         EProcessingMoviePreview,
       
   180         EProcessingMovieSend,
       
   181         EProcessingError,
       
   182         ECuttingAudio,
       
   183         EDuplicating,
       
   184         EProcessingMovieTrimMms,
       
   185         ESlowMotion,
       
   186         EProcessingAudioError
       
   187     };
       
   188 
       
   189     /**
       
   190      * Editor states
       
   191      */
       
   192     enum TEditorState
       
   193     {
       
   194         EPreview = 0x6500,  // 25856
       
   195         EQuickPreview,
       
   196         EEdit,
       
   197         EBufferingVideo,
       
   198         EMixAudio,
       
   199         EAdjustVolume
       
   200     };
       
   201 
       
   202     void SetEditorState( TEditorState aState );
       
   203 
       
   204     void UpdateMediaGalleryL();
       
   205 
       
   206     TRect ClientOrApplicationRect( TBool aFullScreenSelected )const;
       
   207 
       
   208     /**
       
   209      * Stores App UI orientation.
       
   210      *
       
   211      * @return No description.
       
   212      */
       
   213     void StoreOrientation();
       
   214 
       
   215     /**
       
   216      * Restores the previously stored App UI orientation.
       
   217      *
       
   218      * @return No description.
       
   219      */
       
   220     void RestoreOrientation();
       
   221 
       
   222     /** 
       
   223      * Handles a change to the control's resources.
       
   224      */
       
   225     void HandleResourceChange( TInt aType );
       
   226 
       
   227 public:
       
   228     // Functions from base classes
       
   229 
       
   230     /**
       
   231      * From <code>MProgressDialogCallback</code>, callback method gets
       
   232      * called when a dialog is dismissed.
       
   233      *
       
   234      * @param aButtonId  Button id.
       
   235      */
       
   236     virtual void DialogDismissedL( TInt aButtonId );
       
   237 
       
   238     /**
       
   239      * From <code>MEikMenuObserver</code>, dynamically initialises a menu
       
   240      * pane. The Uikon framework calls this function, if it is implemented
       
   241      * in a menu’s observer, immediately before the menu pane is activated.
       
   242      *
       
   243      * @param aResourceId Resource ID identifying the menu pane to
       
   244      *        initialise.
       
   245      * @param aMenuPane The in-memory representation of the menu pane.
       
   246      */
       
   247     void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   248 
       
   249     /**
       
   250      * From <code>CAknView</code>, no description.
       
   251      *
       
   252      * @param aCommand No description.
       
   253      */
       
   254     void HandleCommandL( TInt aCommand );
       
   255 
       
   256 
       
   257     /**
       
   258      * No description.
       
   259      */
       
   260     void InsertNewAudio();
       
   261 
       
   262     /**
       
   263      * No description.
       
   264      */
       
   265     void SetFullScreenSelected( TBool aFullScreenSelected );
       
   266 
       
   267     /**
       
   268      * Starts navipane update.
       
   269      */
       
   270     void StartNaviPaneUpdateL();
       
   271 
       
   272     /**
       
   273      * Stops the navi pane update.
       
   274      */
       
   275     void StopNaviPaneUpdateL();
       
   276 
       
   277     /**
       
   278      * No description.
       
   279      */
       
   280     void ShowVolumeLabelL( TInt aVolume );
       
   281 
       
   282     /**
       
   283      * No description.
       
   284      */
       
   285     void DoUpdateEditNaviLabelL()const;
       
   286     virtual void HandleScreenDeviceChangedL();
       
   287 
       
   288     /**
       
   289      * No description.
       
   290      *
       
   291      * 
       
   292      * @return No description.
       
   293      */
       
   294     TBool IsEnoughFreeSpaceToSaveL( TInt aBytesToAdd = 0 )const;
       
   295 
       
   296     void SetCbaL( TEditorState aState );
       
   297 
       
   298 protected:
       
   299     // New functions
       
   300 
       
   301     /**
       
   302      * Callback function to be called when the 
       
   303      * <code>iAudioRecordPeriodic</code> is scheduled after a timer event.
       
   304      * 
       
   305      * @param aThis Pointer to this class.
       
   306      * @return Always one (1); indicates that this callback function
       
   307      *         should be called again. 
       
   308      */
       
   309     static TInt UpdateAudioRecording( TAny* aThis );
       
   310 
       
   311     static TInt UpdateNaviPreviewing( TAny* aThis );
       
   312 
       
   313     /**
       
   314      * No description.
       
   315      */
       
   316     void DoUpdateAudioRecording();
       
   317 
       
   318     /**
       
   319      * No description.
       
   320      *
       
   321      * 
       
   322      * @return No description.
       
   323      */
       
   324     TBool IsEnoughFreeSpaceToSave2L( TInt aBytesToAdd = 0 )const;
       
   325 
       
   326     /**
       
   327      * Renames generated <code>iTempfile</code> and opens 
       
   328      * <code>CSendUi</code>.
       
   329      */
       
   330     void SendMovieL();
       
   331 
       
   332     /**
       
   333      * If needed, creates temporary video clip for CVeiPreviewView and 
       
   334      * activates PreviewView.
       
   335      */
       
   336     void StartTempFileProcessingL();
       
   337 
       
   338     /**
       
   339      * Shows information note with given message.
       
   340      * 
       
   341      * @param aMessage Message to show.
       
   342      */
       
   343     void ShowInformationNoteL( const TDesC& aMessage )const;
       
   344 
       
   345     /** 
       
   346      * Updates EditLabel
       
   347      */
       
   348     void UpdateEditNaviLabel()const;
       
   349 
       
   350     /**
       
   351      * Removes selected clip(audio or video) from the movie.
       
   352      * Confirmation note is shown.
       
   353      */
       
   354     void RemoveCurrentClipL();
       
   355 
       
   356     /**
       
   357      * Creates editlabel.
       
   358      *
       
   359      * @return No description.
       
   360      */
       
   361     CAknNavigationDecorator* CreateEditNaviLabelL();
       
   362 
       
   363     /**
       
   364      * Creates editlabel.
       
   365      *
       
   366      * @return No description.
       
   367      */
       
   368     CAknNavigationDecorator* CreatePreviewNaviLabelL();
       
   369 
       
   370 
       
   371     /**
       
   372      * Creates movelabel.
       
   373      *
       
   374      * @return No description.
       
   375      */
       
   376     CAknNavigationDecorator* CreateMoveNaviLabelL();
       
   377 
       
   378     /**
       
   379      * Save movie to file.
       
   380      *
       
   381      * @param aQuitAfterSaving	after saving move to VideosView
       
   382      * @return <code>ETrue if quit after saving,
       
   383      *         <code>EFalse</code> otherwise.
       
   384      */
       
   385     TBool SaveL( TWaitMode aQuitAfterSaving );
       
   386 
       
   387     /**
       
   388      *  Checks the memory card availability, if MMC is selected as save
       
   389      *  store in application settings. An information note is shown in
       
   390      *  following situations:
       
   391      *  - MMC not inserted
       
   392      *  - MMC corrupted (unformatted)
       
   393      *  [- MMC is read-only (not implemented)]
       
   394      *  
       
   395      *  If note is popped up, this function waits until it's dismissed.
       
   396      */
       
   397     void CheckMemoryCardAvailabilityL();
       
   398 
       
   399     static TInt HideVolumeCallbackL( TAny* aPtr );
       
   400 
       
   401     /**
       
   402      * Hides the volume indicator.
       
   403      */
       
   404     void HideVolume();
       
   405 
       
   406 protected:
       
   407     // Functions from base classes
       
   408 
       
   409     /**
       
   410      * From <code>CAknView</code>, activates this view.
       
   411      * 
       
   412      * @param aPrevViewId Previous view id.
       
   413      * @param aCustomMessageId Custom message id.
       
   414      * @param aCustomMessage Custom message.
       
   415      */
       
   416     void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
       
   417                      const TDesC8& aCustomMessage );
       
   418 
       
   419     /**
       
   420      * From <code>CAknView</code>, deactivates this view.
       
   421      */
       
   422     void DoDeactivate();
       
   423 
       
   424     /**
       
   425      * From <code>CAknView</code>, HandleForegroundEventL( TBool aForeground ).
       
   426      *
       
   427      * @param aForeground No description.
       
   428      */
       
   429     virtual void HandleForegroundEventL( TBool aForeground );
       
   430 
       
   431     virtual void NotifyQueueProcessingStarted( 
       
   432                         MVeiQueueObserver::TProcessing aMode = 
       
   433                         MVeiQueueObserver::ENotProcessing );
       
   434 
       
   435     virtual void NotifyQueueEmpty( TInt aInserted, TInt aFailed );
       
   436 
       
   437     virtual void NotifyQueueProcessingProgressed( TInt aProcessedCount, 
       
   438                                                   TInt aPercentage );
       
   439 
       
   440     virtual TBool NotifyQueueClipFailed( const TDesC& aFilename, TInt aError );
       
   441 
       
   442     /**
       
   443      * From <code>MMdaObjectStateChangeObserver</code>, no description.
       
   444      *
       
   445      * @param aObject No description.
       
   446      * @param aPreviousState No description.
       
   447      * @param aCurrentState No description.
       
   448      * @param aErrorCode No description.
       
   449      */
       
   450     virtual void MoscoStateChangeEvent( CBase* aObject, 
       
   451                                         TInt aPreviousState,
       
   452                                         TInt aCurrentState, 
       
   453                                         TInt aErrorCode );
       
   454 
       
   455     /**
       
   456      * From <code>MVedAudioClipInfoObserver</code>, no description.
       
   457      *
       
   458      * @param aInfo No description.
       
   459      * @param aError No description.
       
   460      */
       
   461     virtual void NotifyAudioClipInfoReady( CVedAudioClipInfo& aInfo,
       
   462                                            TInt aError );
       
   463 
       
   464     /**
       
   465      * From <code>MVedMovieProcessingObserver</code>, no description.
       
   466      *
       
   467      * @param aMovie No description.
       
   468      */
       
   469     virtual void NotifyMovieProcessingStartedL( CVedMovie& aMovie );
       
   470 
       
   471     /**
       
   472      * From <code>MVedMovieProcessingObserver</code>, no description.
       
   473      *
       
   474      * @param aMovie No description.
       
   475      * @param aPercentage No description.
       
   476      */
       
   477     virtual void NotifyMovieProcessingProgressed( CVedMovie& aMovie, 
       
   478                                                   TInt aPercentage );
       
   479 
       
   480     /**
       
   481      * From <code>MVedMovieProcessingObserver</code>, no description.
       
   482      *
       
   483      * @param aMovie No description.
       
   484      * @param aError No description.
       
   485      */
       
   486     virtual void NotifyMovieProcessingCompleted( CVedMovie& aMovie,
       
   487                                                  TInt aError );
       
   488 
       
   489     /**
       
   490      * From <code>MVedMovieObserver</code>, no description.
       
   491      *
       
   492      * @param aMovie No description.
       
   493      * @param aIndex No description.
       
   494      */
       
   495     virtual void NotifyVideoClipAdded( CVedMovie& aMovie, TInt aIndex );
       
   496 
       
   497     /**
       
   498      * From <code>MVedMovieObserver</code>, no description.
       
   499      *
       
   500      * @param aMovie No description.
       
   501      * @param aError No description.
       
   502      */
       
   503     virtual void NotifyVideoClipAddingFailed( CVedMovie& aMovie,
       
   504                                               TInt aError );
       
   505 
       
   506     /**
       
   507      * From <code>MVedMovieObserver</code>, no description.
       
   508      *
       
   509      * @param aMovie No description.
       
   510      * @param aIndex No description.
       
   511      */
       
   512     virtual void NotifyVideoClipRemoved( CVedMovie& aMovie, TInt aIndex );
       
   513 
       
   514     /**
       
   515      * From <code>MVedMovieObserver</code>, no description.
       
   516      *
       
   517      * @param aMovie No description.
       
   518      * @param aOldIndex No description.
       
   519      * @param aNewIndex No description.
       
   520      */
       
   521     virtual void NotifyVideoClipIndicesChanged( CVedMovie& aMovie,
       
   522                                                 TInt aOldIndex, 
       
   523                                                 TInt aNewIndex );
       
   524 
       
   525     /**
       
   526      * From <code>MVedMovieObserver</code>, no description.
       
   527      *
       
   528      * @param aMovie No description.
       
   529      * @param aIndex No description.
       
   530      */
       
   531     virtual void NotifyVideoClipTimingsChanged( CVedMovie& aMovie,
       
   532                                                 TInt aIndex );
       
   533 
       
   534     /**
       
   535      * From <code>MVedMovieObserver</code>, no description.
       
   536      *
       
   537      * @param aMovie No description.
       
   538      * @param aIndex No description.
       
   539      */
       
   540     virtual void NotifyVideoClipColorEffectChanged( CVedMovie& aMovie,
       
   541                                                     TInt aIndex );
       
   542 
       
   543     /**
       
   544      * From <code>MVedMovieObserver</code>, no description.
       
   545      *
       
   546      * @param aMovie No description.
       
   547      */
       
   548     virtual void NotifyStartTransitionEffectChanged( CVedMovie& aMovie );
       
   549 
       
   550     /**
       
   551      * From <code>MVedMovieObserver</code>, no description.
       
   552      *
       
   553      * @param aMovie No description.
       
   554      * @param aIndex No description.
       
   555      */
       
   556     virtual void NotifyMiddleTransitionEffectChanged( CVedMovie& aMovie,
       
   557                                                       TInt aIndex );
       
   558     /**
       
   559      * From <code>MVedMovieObserver</code>, no description.
       
   560      *
       
   561      * @param aMovie No description.
       
   562      */
       
   563     virtual void NotifyEndTransitionEffectChanged( CVedMovie& aMovie );
       
   564 
       
   565     /**
       
   566      * From <code>MVedMovieObserver</code>, no description.
       
   567      *
       
   568      * @param aMovie No description.
       
   569      * @param aIndex No description.
       
   570      */
       
   571     virtual void NotifyAudioClipAdded( CVedMovie& aMovie, TInt aIndex );
       
   572 
       
   573     /**
       
   574      * From <code>MVedMovieObserver</code>, no description.
       
   575      *
       
   576      * @param aMovie No description.
       
   577      * @param aError No description.
       
   578      */
       
   579     virtual void NotifyAudioClipAddingFailed( CVedMovie& aMovie,
       
   580                                               TInt aError );
       
   581 
       
   582     /**
       
   583      * From <code>MVedMovieObserver</code>, no description.
       
   584      *
       
   585      * @param aMovie No description.
       
   586      * @param aIndex No description.
       
   587      */
       
   588     virtual void NotifyAudioClipRemoved( CVedMovie& aMovie, TInt aIndex );
       
   589 
       
   590     /**
       
   591      * From <code>MVedMovieObserver</code>, no description.
       
   592      *
       
   593      * @param aMovie No description.
       
   594      * @param aOldIndex No description.
       
   595      * @param aNewIndex No description.
       
   596      */
       
   597     virtual void NotifyAudioClipIndicesChanged( CVedMovie& aMovie, 
       
   598                                                 TInt aOldIndex, 
       
   599                                                 TInt aNewIndex );
       
   600 
       
   601     /**
       
   602      * From <code>MVedMovieObserver</code>, no description.
       
   603      *
       
   604      * @param aMovie No description.
       
   605      * @param aIndex No description.
       
   606      */
       
   607     virtual void NotifyAudioClipTimingsChanged( CVedMovie& aMovie,
       
   608                                                 TInt aIndex );
       
   609 
       
   610     /**
       
   611      * From <code>MVedMovieObserver</code>, no description.
       
   612      *
       
   613      * @param aMovie No description.
       
   614      */
       
   615     virtual void NotifyMovieReseted( CVedMovie& aMovie );
       
   616     
       
   617     /**
       
   618      * Called to notify that the audio settings of a video clip have changed. 
       
   619      *
       
   620      * @param aMovie  movie
       
   621      * @param aClip   changed video clip
       
   622      */
       
   623     virtual void NotifyVideoClipAudioSettingsChanged( CVedMovie& aMovie,
       
   624                                                       TInt aIndex );
       
   625 
       
   626     /**
       
   627      * Called to notify that some generator-specific settings of 
       
   628      * a generated video clip have changed.
       
   629      *
       
   630      * @param aMovie  movie
       
   631      * @param aClip   changed video clip
       
   632      */
       
   633     virtual void NotifyVideoClipGeneratorSettingsChanged( CVedMovie& aMovie,
       
   634                                                           TInt aIndex );
       
   635 
       
   636     /**
       
   637      * Called to notify that the descriptive name of a clip has changed. 
       
   638      *
       
   639      * @param aMovie  movie
       
   640      * @param aIndex  changed video clip index
       
   641      */
       
   642     virtual void NotifyVideoClipDescriptiveNameChanged( CVedMovie& aMovie, 
       
   643                                                         TInt aIndex );
       
   644    
       
   645     /**
       
   646      * Called to notify that the quality setting of the movie has been
       
   647      * changed.
       
   648      *
       
   649      * @param aMovie  movie
       
   650      */
       
   651     virtual void NotifyMovieQualityChanged( CVedMovie& aMovie );
       
   652 
       
   653     /**
       
   654      * Called to notify that the output parameters have been changed
       
   655      *
       
   656      * @param aMovie  movie
       
   657      */
       
   658     virtual void NotifyMovieOutputParametersChanged( CVedMovie& aMovie );
       
   659 
       
   660     /**
       
   661      * Called to notify that a dynamic level mark has been inserted 
       
   662      * to an audio clip.
       
   663      *
       
   664      * @param aMovie       movie
       
   665      * @param aClipIndex   audio clip index
       
   666      * @param aMarkIndex   index of the inserted level mark
       
   667      */
       
   668     virtual void NotifyAudioClipDynamicLevelMarkInserted( CVedMovie& aMovie, 
       
   669                                                           TInt aClipIndex, 
       
   670                                                           TInt aMarkIndex );
       
   671 
       
   672     /**
       
   673      * Called to notify that a dynamic level mark has been inserted 
       
   674      * to an audio clip.
       
   675      *
       
   676      * @param aMovie       movie
       
   677      * @param aClipIndex   audio clip index
       
   678      * @param aMarkIndex   index of the inserted level mark
       
   679      */
       
   680     virtual void NotifyAudioClipDynamicLevelMarkRemoved( CVedMovie& aMovie, 
       
   681                                                          TInt aClipIndex, 
       
   682                                                          TInt aMarkIndex );
       
   683 
       
   684     /**
       
   685      * Called to notify that a dynamic level mark has been inserted 
       
   686      * to an audio clip.
       
   687      *
       
   688      * @param aMovie       movie
       
   689      * @param aClipIndex   audio clip index
       
   690      * @param aMarkIndex   index of the inserted level mark
       
   691      */
       
   692     virtual void NotifyVideoClipDynamicLevelMarkInserted( CVedMovie& aMovie, 
       
   693                                                           TInt aClipIndex, 
       
   694                                                           TInt aMarkIndex );
       
   695 
       
   696     /**
       
   697      * Called to notify that a dynamic level mark has been inserted 
       
   698      * to an audio clip.
       
   699      *
       
   700      * @param aMovie       movie
       
   701      * @param aClipIndex   audio clip index
       
   702      * @param aMarkIndex   index of the inserted level mark
       
   703      */
       
   704     virtual void NotifyVideoClipDynamicLevelMarkRemoved( CVedMovie& aMovie, 
       
   705                                                          TInt aClipIndex, 
       
   706                                                          TInt aMarkIndex );    
       
   707 
       
   708 
       
   709     /**
       
   710      * From MVedImageClipGeneratorObserver
       
   711      */
       
   712     virtual void NotifyImageClipGeneratorInitializationComplete(
       
   713     	                                    CVeiImageClipGenerator& aGenerator,
       
   714     	                                    TInt aError );
       
   715 
       
   716     virtual void NotifyTitleClipBackgroundImageLoadComplete(
       
   717                                             CVeiTitleClipGenerator& aGenerator,
       
   718                                             TInt aError);
       
   719 
       
   720 
       
   721 private:
       
   722 
       
   723     void UpdateInsertingProgressNoteL( TInt aProcessed );
       
   724     
       
   725     /**
       
   726      * C++ default constructor.
       
   727      *
       
   728      * @param aCutView	instance of cut video view
       
   729      * @param aVideoList instance of videolist
       
   730      */
       
   731     CVeiEditVideoView( CVeiCutVideoView& aCutView, 
       
   732                        CVeiCutAudioView& aCutAudioView,
       
   733 			           CSendUi& aSendAppUi );
       
   734 
       
   735 
       
   736     /**
       
   737      * Symbian 2nd phase constructor.
       
   738      */
       
   739     void ConstructL();
       
   740 
       
   741 
       
   742     void ShowAndHandleSendMenuCommandsL();
       
   743 
       
   744     void BrowseStartTransition( TBool aUpOrDown );
       
   745 
       
   746     /**
       
   747      * Check is videoclip mms compatible.
       
   748      *
       
   749      * @param 
       
   750      */
       
   751     void MmsSendCompatibleCheck();
       
   752 
       
   753 
       
   754     /**
       
   755      * this function decides whether audio mixing can be made		 
       
   756      */
       
   757     TBool MixingConditionsOk()const;
       
   758 
       
   759     /**
       
   760      * this function fades either the videos' audio level or the imported sounds' audio level in the movie
       
   761      *		  
       
   762      */
       
   763     void MixAudio();
       
   764 
       
   765 
       
   766     /**
       
   767      * this function removes dynamic level marks from all the video and audio clip(s) in the movie		 
       
   768      *		  
       
   769      */
       
   770     //void RemoveAudioMixingLevelMarks();
       
   771 
       
   772     /**
       
   773      * this function removes dynamic level marks from the individual video clip(s) in the movie
       
   774      * @param aIndex       index of video clip where marks are to be removed from
       
   775      * if aIndex is empty or has negative value, marks are removed from every video clip currently in the movie
       
   776      *		  
       
   777      */
       
   778     //void RemoveVideoClipVolumeLevelMarks(TInt aIndex = -1);
       
   779 
       
   780     /**
       
   781      * this function removes video dynamic level marks from the individual audio clip(s) in the movie
       
   782      * @param aIndex       index of audio clip where marks are to be removed from
       
   783      * if aIndex is empty or has negative value, marks are removed from every audio clip currently in the movie
       
   784      *		  
       
   785      */
       
   786     //void RemoveAudioClipVolumeLevelMarks(TInt aIndex = -1);
       
   787 
       
   788     /**
       
   789      * this function adjusts volume of the video's audio or the imported audio
       
   790      *		  
       
   791      */
       
   792     void AdjustVolumeL();
       
   793 
       
   794     /** Callback function */
       
   795     static TInt AsyncBackSend( TAny* aThis );
       
   796     /** Callback function */
       
   797     static TInt AsyncBackSaveThenExitL( TAny* aThis );
       
   798 
       
   799     /**
       
   800      * This function is called to tell whether the movie's state has changed so that new temporary movie 
       
   801      * file have to be processed. The file is needed in previewing for example. 
       
   802      * The processing starts when the temporary movie file is next time needed.
       
   803      * @param aUpdateNeeded tells whether new temporary movie file is needed 		 
       
   804      */
       
   805     void SetNewTempFileNeeded( const TBool aUpdateNeeded );
       
   806 
       
   807     /*
       
   808     There is an GetDurationEstimateL() method in CVedMovie that 
       
   809     estimates end cutpoint with given target size and start cutpoint for current movie.
       
   810     This method gives end cutpoint time in movie's time scale. 
       
   811 
       
   812     If end cutpoint is not in the first clip but in some subsequent clip things are not straightforward.
       
   813     The clip accomodatint the end cutpoint must be localized as well as the exact timepoint in clip's
       
   814     time scale.
       
   815 
       
   816     If clips have been edited (e.g. marks set) before call to GetDurationEstimateL(), things get
       
   817     more complicated.
       
   818 
       
   819     If slow motion is applied to clips things get even more complicated.
       
   820 
       
   821     There is no resrictions of usage presented in the documentation of CVedMovie::GetDurationEstimateL() (vedmovie.h) 
       
   822 
       
   823      */
       
   824     TBool FitsToMmsL();
       
   825 
       
   826 
       
   827 private:
       
   828     // Data
       
   829 
       
   830     /**
       
   831      * Cut video view.
       
   832      */
       
   833     CVeiCutVideoView& iCutView;
       
   834 
       
   835     /**
       
   836      * Cut audio view.
       
   837      */
       
   838     CVeiCutAudioView& iCutAudioView;
       
   839 
       
   840     /**
       
   841      * No description.
       
   842      */
       
   843     CSendUi& iSendAppUi;
       
   844 
       
   845     /**
       
   846      * No description.
       
   847      */
       
   848     CVedAudioClipInfo* iAudioClipInfo;
       
   849 
       
   850     /**
       
   851      * No description.
       
   852      */
       
   853     CAknNavigationControlContainer* iNaviPane;
       
   854 
       
   855     /**
       
   856      * Edit label.
       
   857      */
       
   858     CAknNavigationDecorator* iEditLabel;
       
   859 
       
   860     /**
       
   861      * Preview label.
       
   862      */
       
   863     CAknNavigationDecorator* iPreviewLabel;
       
   864 
       
   865     /** 
       
   866      * Move label.
       
   867      */
       
   868     CAknNavigationDecorator* iMoveLabel;
       
   869 
       
   870     /**
       
   871      * Progress info for the progress dialog.
       
   872      */
       
   873     //CEikProgressInfo*       iProgressInfo;
       
   874 
       
   875     /**
       
   876      * Progress dialog.
       
   877      */
       
   878     CAknProgressDialog* iProgressNote;
       
   879 
       
   880     /**
       
   881      * Original audio clip index.
       
   882      */
       
   883     TInt iOriginalAudioClipIndex;
       
   884 
       
   885     /**
       
   886      * Original video clip index.
       
   887      */
       
   888     TInt iOriginalVideoClipIndex;
       
   889 
       
   890     /**
       
   891      * Original audio clip starting point.
       
   892      */
       
   893     TTimeIntervalMicroSeconds iOriginalAudioStartPoint;
       
   894 
       
   895     /**
       
   896      *Original audio clip duration.
       
   897      */
       
   898     TTimeIntervalMicroSeconds iOriginalAudioDuration;
       
   899 
       
   900     /**
       
   901      * Original video clip cut in time.
       
   902      */
       
   903     TTimeIntervalMicroSeconds iOriginalCutInTime;
       
   904     TTimeIntervalMicroSeconds iOriginalCutOutTime;
       
   905 
       
   906     /**
       
   907      * Original audio clip cut in time.
       
   908      */
       
   909     TTimeIntervalMicroSeconds iOriginalAudioCutInTime;
       
   910     TTimeIntervalMicroSeconds iOriginalAudioCutOutTime;
       
   911 
       
   912     TTimeIntervalMicroSeconds iOriginalVideoStartPoint;
       
   913 
       
   914     TTimeIntervalMicroSeconds iOriginalVideoCutInTime;
       
   915 
       
   916     TTimeIntervalMicroSeconds iOriginalVideoCutOutTime;
       
   917 
       
   918     /**
       
   919      * No description.
       
   920      */
       
   921     TInt iCutVideoIndex;
       
   922 
       
   923     /**
       
   924      * No description.
       
   925      */
       
   926     TInt iCutAudioIndex;
       
   927 
       
   928     /**
       
   929      * No description.
       
   930      */
       
   931     TUid iGivenSendCommand;
       
   932 
       
   933     /**
       
   934      * Temporary file name for storing preview clip.
       
   935      */
       
   936     HBufC* iTempFile;
       
   937 
       
   938     /**
       
   939      * Temporary file name for storing preview clip. 
       
   940      */
       
   941     HBufC* iTempRecordedAudio;
       
   942 
       
   943     /**
       
   944      * Wait mode; are we waiting for progress or wait note? 
       
   945      */
       
   946     TWaitMode iWaitMode;
       
   947 
       
   948     /**
       
   949      * No description.
       
   950      */
       
   951     TBool iMovieSavedFlag;
       
   952 
       
   953     /**
       
   954      * For indicating the first movie clip adding. 
       
   955      */
       
   956     TBool iMovieFirstAddFlag;
       
   957 
       
   958     /**
       
   959      * No description.
       
   960      */
       
   961     TBool iUpdateTemp;
       
   962 
       
   963     /**
       
   964      * No description.
       
   965      */
       
   966     TBool iConverting;
       
   967 
       
   968     /**
       
   969      * No description.
       
   970      */
       
   971     CMdaAudioRecorderUtility* iRecorder;
       
   972 
       
   973     /**
       
   974      * No description.
       
   975      */
       
   976     CPeriodic* iAudioRecordPeriodic;
       
   977 
       
   978     CPeriodic* iPreviewUpdatePeriodic;
       
   979 
       
   980     /** Volume navi decorator. */
       
   981     CAknNavigationDecorator* iVolumeNavi;
       
   982 
       
   983     /**
       
   984      * No description.
       
   985      */
       
   986     TTimeIntervalMicroSeconds iRecordedAudioMaxDuration;
       
   987 
       
   988     /**
       
   989      * No description.
       
   990      */
       
   991     CVeiErrorUI* iErrorUI;
       
   992 
       
   993     /**
       
   994      * No description.
       
   995      */
       
   996     TInt iErrorNmb;
       
   997 
       
   998     /**
       
   999      * No description.
       
  1000      */
       
  1001     HBufC* iSaveToFileName;
       
  1002 
       
  1003     /**
       
  1004      * No description.
       
  1005      */
       
  1006     TBool iSendKey;
       
  1007 
       
  1008     /**
       
  1009      * No description.
       
  1010      */
       
  1011     CVeiTempMaker* iTempMaker;
       
  1012 
       
  1013     TEditorState iEditorState;
       
  1014 
       
  1015     CAknWaitDialog* iWaitDialog;
       
  1016 
       
  1017     CVedVideoClipGenerator* iGenerator;
       
  1018 
       
  1019     CVeiAddQueue* iMediaQueue;
       
  1020 
       
  1021     TBool iFullScreenSelected;
       
  1022 
       
  1023     /** Volume hiding timer. */
       
  1024     CPeriodic* iVolumeHider;
       
  1025 
       
  1026 
       
  1027     /**
       
  1028      * Indicates whether or not the memory card accessibility is checked.
       
  1029      * Usually accessibility is checked only once.
       
  1030      */
       
  1031     TBool iMemoryCardChecked;
       
  1032 
       
  1033     CVeiPopup* iPopup;
       
  1034 
       
  1035     /**
       
  1036      * No description.
       
  1037      */
       
  1038     CVedMovie* iMovie;
       
  1039 
       
  1040     /**
       
  1041      * No description.
       
  1042      */
       
  1043     CVeiEditVideoContainer* iContainer;
       
  1044 
       
  1045     TInt iOriginalVideoSpeed;
       
  1046 
       
  1047     TVeiSettings iMovieSaveSettings;
       
  1048     CAknMemorySelectionDialog::TMemory iMemoryInUse;
       
  1049 
       
  1050 
       
  1051     CVedMovie::TVedMovieQuality iBackupSaveQuality;
       
  1052 
       
  1053     TBool iChangedFromMMCToPhoneMemory;
       
  1054 
       
  1055     TInt iPercentProcessed;
       
  1056 
       
  1057     /**
       
  1058      * Store the original orientation when forcing to portrait
       
  1059      */
       
  1060     CAknAppUiBase::TAppUiOrientation iOriginalOrientation;
       
  1061 
       
  1062     /** Callback utility */
       
  1063     CAsyncCallBack* iCallBack;
       
  1064 
       
  1065 #include "veieditvideoview.inl"
       
  1066 };
       
  1067 
       
  1068 #endif // VEDEDITVIDEOVIEW_H
       
  1069 
       
  1070 // End of File