videoeditor_plat/video_editor_engine_api/inc/VedMovie.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   
       
    21 
       
    22 #ifndef __VEDMOVIE_H__
       
    23 #define __VEDMOVIE_H__
       
    24 
       
    25 /*
       
    26  *  Constant definitions.
       
    27  */
       
    28 #define KVedAudioClipOriginalDuration TTimeIntervalMicroSeconds(-1)
       
    29 
       
    30 const TInt KVedClipIndexAll(-1);
       
    31 
       
    32 #include <e32base.h>
       
    33 #include <f32file.h>
       
    34 #include "VedVideoClipInfo.h"
       
    35 #include "VedAudioClipInfo.h"
       
    36 
       
    37 class CVedMovie;
       
    38 class TVedDynamicLevelMark;
       
    39 
       
    40 /**
       
    41  * Observer for movie events. 
       
    42  * <p>
       
    43  * Note that every change operation that is made to a movie or the clips it consists of 
       
    44  * results in a maximum of one notification method called (that is, more than one 
       
    45  * notification method is never called as a result of a single change). For example,
       
    46  * changing the index of a clip results in the <code>NotifyVideoClipIndicesChanged()</code>
       
    47  * method being called once. The <code>NotifyVideoClipTimingsChanged()</code> method is not 
       
    48  * called even if the timings of several clips may have changed as a result. See the
       
    49  * descriptions of the notification methods for more detailed information.
       
    50  *
       
    51  * @see  CVedMovie
       
    52  */
       
    53 class MVedMovieObserver 
       
    54     {
       
    55 public:
       
    56 
       
    57     /**
       
    58      * Called to notify that a new video clip has been successfully
       
    59      * added to the movie. Note that the indices and the start and end times
       
    60      * of the video clips after the new clip have also changed as a result.
       
    61      * Note that the transitions may also have changed. 
       
    62      *
       
    63      * @param aMovie  movie
       
    64      * @param aIndex  index of video clip in movie
       
    65      */
       
    66     virtual void NotifyVideoClipAdded(CVedMovie& aMovie, TInt aIndex) = 0;
       
    67 
       
    68     /**
       
    69      * Called to notify that adding a new video clip to the movie has failed.
       
    70      *
       
    71      * Possible error codes:
       
    72      *  - <code>KErrNotFound</code> if there is no file with the specified name
       
    73      *    in the specified directory (but the directory exists)
       
    74      *  - <code>KErrPathNotFound</code> if the specified directory
       
    75      *    does not exist
       
    76      *  - <code>KErrUnknown</code> if the specified file is of unknown format
       
    77      *  - <code>KErrNotSupported</code> if the format of the file is recognized but
       
    78      *    adding it to the movie is not supported (e.g., it is of different resolution
       
    79      *    or format than the other clips)
       
    80      *
       
    81      * @param aMovie  movie
       
    82      * @param aError  one of the system wide error codes
       
    83      */
       
    84     virtual void NotifyVideoClipAddingFailed(CVedMovie& aMovie, TInt aError) = 0;
       
    85 
       
    86     /**
       
    87      * Called to notify that a video clip has been removed from the movie.
       
    88      * Note that the indices and the start and end times of the video clips after 
       
    89      * the removed clip have also changed as a result. Note that the 
       
    90      * transitions may also have changed.
       
    91      *
       
    92      * @param aMovie  movie
       
    93      * @param aIndex  index of the removed video clip
       
    94      */
       
    95     virtual void NotifyVideoClipRemoved(CVedMovie& aMovie, TInt aIndex) = 0;
       
    96     
       
    97     /**
       
    98      * Called to notify that a video clip has moved (that is, its index and 
       
    99      * start and end times have changed). Note that the indices and the start and
       
   100      * end times of the clips between the old and new indices have also changed 
       
   101      * as a result. Note that the transitions may also have changed.
       
   102      *
       
   103      * @param aMovie     movie
       
   104      * @param aOldIndex  old index of the moved clip
       
   105      * @param aNewIndex  new index of the moved clip
       
   106      */
       
   107     virtual void NotifyVideoClipIndicesChanged(CVedMovie& aMovie, TInt aOldIndex, 
       
   108                                                TInt aNewIndex) = 0;
       
   109 
       
   110     /**
       
   111      * Called to notify that the timings (that is, the cut in or cut out time or
       
   112      * the speed and consequently the end time, edited duration, and possibly audio
       
   113      * settings) of a video clip have changed (but the index of the clip has 
       
   114      * <em>not</em> changed). Note that the start and end times of the video clips 
       
   115      * after the changed clip have also changed.
       
   116      *
       
   117      * @param aMovie  movie
       
   118      * @param aClip   changed video clip
       
   119      */
       
   120     virtual void NotifyVideoClipTimingsChanged(CVedMovie& aMovie,
       
   121                                                TInt aIndex) = 0;
       
   122 
       
   123     /**
       
   124      * Called to notify that the color effect or a color tone of the existing effect
       
   125      * of a video clip has changed.
       
   126      *
       
   127      * @param aMovie  movie
       
   128      * @param aClip   changed video clip
       
   129      */
       
   130     virtual void NotifyVideoClipColorEffectChanged(CVedMovie& aMovie,
       
   131                                                    TInt aIndex) = 0;
       
   132     
       
   133     /**
       
   134      * Called to notify that the audio settings of a video clip have changed. 
       
   135      *
       
   136      * @param aMovie  movie
       
   137      * @param aClip   changed video clip
       
   138      */
       
   139     virtual void NotifyVideoClipAudioSettingsChanged(CVedMovie& aMovie,
       
   140                                                      TInt aIndex) = 0;
       
   141 
       
   142     /**
       
   143      * Called to notify that some generator-specific settings of 
       
   144      * a generated video clip have changed.
       
   145      *
       
   146      * @param aMovie  movie
       
   147      * @param aClip   changed video clip
       
   148      */
       
   149     virtual void NotifyVideoClipGeneratorSettingsChanged(CVedMovie& aMovie,
       
   150                                                          TInt aIndex) = 0;
       
   151 
       
   152     /**
       
   153      * Called to notify that the descriptive name of a clip has changed. 
       
   154      *
       
   155      * @param aMovie  movie
       
   156      * @param aIndex  changed video clip index
       
   157      */
       
   158     virtual void NotifyVideoClipDescriptiveNameChanged(CVedMovie& aMovie,
       
   159                                                                 TInt aIndex) = 0;
       
   160 
       
   161     /**
       
   162      * Called to notify that the start transition effect of the movie
       
   163      * has changed (but no other changes have occurred).
       
   164      *
       
   165      * @param aMovie  movie
       
   166      */
       
   167     virtual void NotifyStartTransitionEffectChanged(CVedMovie& aMovie) = 0;
       
   168 
       
   169     /**
       
   170      * Called to notify that a middle transition effect has changed 
       
   171      * (but no other changes have occurred).
       
   172      *
       
   173      * @param aMovie  movie
       
   174      * @param aIndex  index of the changed middle transition effect
       
   175      */
       
   176     virtual void NotifyMiddleTransitionEffectChanged(CVedMovie& aMovie, 
       
   177                                                      TInt aIndex) = 0;
       
   178 
       
   179     /**
       
   180      * Called to notify that the end transition effect of the movie
       
   181      * has changed (but no other changes have occurred).
       
   182      *
       
   183      * @param aMovie  movie
       
   184      */
       
   185     virtual void NotifyEndTransitionEffectChanged(CVedMovie& aMovie) = 0;
       
   186 
       
   187     /**
       
   188      * Called to notify that a new audio clip has been successfully
       
   189      * added to the movie. Note that the indices of the audio clips
       
   190      * starting after the new clip have also changed as a result.
       
   191      *
       
   192      * @param aMovie  movie
       
   193      * @param aClip   new audio clip
       
   194      */
       
   195     virtual void NotifyAudioClipAdded(CVedMovie& aMovie, TInt aIndex) = 0;
       
   196 
       
   197     /**
       
   198      * Called to notify that adding a new audio clip to the movie has failed.
       
   199      *
       
   200      * Possible error codes:
       
   201      *  - <code>KErrNotFound</code> if there is no file with the specified name
       
   202      *    in the specified directory (but the directory exists)
       
   203      *  - <code>KErrPathNotFound</code> if the specified directory
       
   204      *    does not exist
       
   205      *  - <code>KErrUnknown</code> if the specified file is of unknown format
       
   206      *
       
   207      * @param aMovie  movie
       
   208      * @param aError  one of the system wide error codes
       
   209      */
       
   210     virtual void NotifyAudioClipAddingFailed(CVedMovie& aMovie, TInt aError) = 0;
       
   211 
       
   212     /**
       
   213      * Called to notify that an audio clip has been removed from the movie.
       
   214      * Note that the indices of the audio clips starting after the removed
       
   215      * clip have also changed as a result.
       
   216      *
       
   217      * @param aMovie  movie
       
   218      * @param aIndex  index of the removed audio clip
       
   219      */
       
   220     virtual void NotifyAudioClipRemoved(CVedMovie& aMovie, TInt aIndex) = 0;
       
   221 
       
   222     /**
       
   223      * Called to notify that an audio clip has moved (that is, its
       
   224      * index has changed). This may happen when the start time of the audio 
       
   225      * clip is changed. Note that the indices of the clips between the old and 
       
   226      * new indices have also changed as a result.
       
   227      *
       
   228      * @param aMovie     movie
       
   229      * @param aOldIndex  old index of the moved clip
       
   230      * @param aNewIndex  new index of the moved clip
       
   231      */
       
   232     virtual void NotifyAudioClipIndicesChanged(CVedMovie& aMovie, TInt aOldIndex, 
       
   233                                                TInt aNewIndex) = 0;
       
   234 
       
   235     /**
       
   236      * Called to notify that the timings (for example, the start time or
       
   237      * the duration) of an audio clip have changed (but the index of the
       
   238      * clip has <em>not</em> changed as a result).
       
   239      *
       
   240      * @param aMovie  movie
       
   241      * @param aClip   changed audio clip
       
   242      */
       
   243     virtual void NotifyAudioClipTimingsChanged(CVedMovie& aMovie,
       
   244                                                TInt aIndex) = 0;
       
   245 
       
   246     /**
       
   247      * Called to notify that the quality setting of the movie has been
       
   248      * changed.
       
   249      *
       
   250      * @param aMovie  movie
       
   251      */
       
   252     virtual void NotifyMovieQualityChanged(CVedMovie& aMovie) = 0;
       
   253 
       
   254     /**
       
   255      * Called to notify that the movie has been reseted.
       
   256      *
       
   257      * @param aMovie  movie
       
   258      */
       
   259     virtual void NotifyMovieReseted(CVedMovie& aMovie) = 0;
       
   260     
       
   261     /**
       
   262      * Called to notify that the output parameters have been changed
       
   263      *
       
   264      * @param aMovie  movie
       
   265      */
       
   266     virtual void NotifyMovieOutputParametersChanged(CVedMovie& aMovie) = 0;
       
   267     
       
   268     /**
       
   269      * Called to notify that a dynamic level mark has been inserted 
       
   270      * to an audio clip.
       
   271      *
       
   272      * @param aMovie       movie
       
   273      * @param aClipIndex   audio clip index
       
   274      * @param aMarkIndex   index of the inserted level mark
       
   275      */
       
   276     virtual void NotifyAudioClipDynamicLevelMarkInserted(CVedMovie& aMovie, 
       
   277                                                          TInt aClipIndex, 
       
   278                                                          TInt aMarkIndex) = 0;
       
   279 
       
   280     /**
       
   281      * Called to notify that a dynamic level mark has been inserted 
       
   282      * to an audio clip.
       
   283      *
       
   284      * @param aMovie       movie
       
   285      * @param aClipIndex   audio clip index
       
   286      * @param aMarkIndex   index of the inserted level mark
       
   287      */
       
   288     virtual void NotifyAudioClipDynamicLevelMarkRemoved(CVedMovie& aMovie, 
       
   289                                                         TInt aClipIndex, 
       
   290                                                         TInt aMarkIndex) = 0;
       
   291 
       
   292     /**
       
   293      * Called to notify that a dynamic level mark has been inserted 
       
   294      * to an audio clip.
       
   295      *
       
   296      * @param aMovie       movie
       
   297      * @param aClipIndex   audio clip index
       
   298      * @param aMarkIndex   index of the inserted level mark
       
   299      */
       
   300     virtual void NotifyVideoClipDynamicLevelMarkInserted(CVedMovie& aMovie, 
       
   301                                                          TInt aClipIndex, 
       
   302                                                          TInt aMarkIndex) = 0;
       
   303 
       
   304     /**
       
   305      * Called to notify that a dynamic level mark has been inserted 
       
   306      * to an audio clip.
       
   307      *
       
   308      * @param aMovie       movie
       
   309      * @param aClipIndex   audio clip index
       
   310      * @param aMarkIndex   index of the inserted level mark
       
   311      */
       
   312     virtual void NotifyVideoClipDynamicLevelMarkRemoved(CVedMovie& aMovie, 
       
   313                                                         TInt aClipIndex, 
       
   314                                                         TInt aMarkIndex) = 0;    
       
   315     };
       
   316 
       
   317 
       
   318 /**
       
   319  * Observer for movie processing operations. 
       
   320  *
       
   321  * 
       
   322  * @see  CVedMovie
       
   323  */
       
   324 class MVedMovieProcessingObserver
       
   325     {
       
   326 public:
       
   327     /**
       
   328      * Called to notify that a new movie processing operation has been started. 
       
   329      *
       
   330      * @param aMovie  movie
       
   331      */
       
   332     virtual void NotifyMovieProcessingStartedL(CVedMovie& aMovie) = 0;
       
   333 
       
   334     /**
       
   335      * Called to inform about the current progress of the movie processing operation.
       
   336      *
       
   337      * @param aMovie       movie
       
   338      * @param aPercentage  percentage of the operation completed, must be 
       
   339      *                     in range 0..100
       
   340      */
       
   341     virtual void NotifyMovieProcessingProgressed(CVedMovie& aMovie, TInt aPercentage) = 0;
       
   342 
       
   343     /**
       
   344      * Called to notify that the movie processing operation has been completed. 
       
   345      * 
       
   346      * @param aMovie  movie
       
   347      * @param aError  error code why the operation was completed. 
       
   348      *                <code>KErrNone</code> if the operation was completed 
       
   349      *                successfully.
       
   350      */
       
   351     virtual void NotifyMovieProcessingCompleted(CVedMovie& aMovie, TInt aError) = 0;
       
   352     };
       
   353 
       
   354 
       
   355 /**
       
   356  * Video movie, which consists of zero or more video clips and zero or more audio clips.
       
   357  * 
       
   358  * @see  CVedVideoClip
       
   359  * @see  CVedAudioClip
       
   360  */
       
   361 class CVedMovie : public CBase
       
   362     {
       
   363 public:
       
   364 
       
   365     /**
       
   366      * Enumeration for movie quality settings.
       
   367      */
       
   368     enum TVedMovieQuality
       
   369         {
       
   370         EQualityAutomatic = 0,
       
   371         EQualityMMSInteroperability,
       
   372         EQualityResolutionCIF,      // Obsolete, please use Medium/High instead
       
   373         EQualityResolutionQCIF,     // Obsolete, please use Medium/High instead
       
   374         EQualityResolutionMedium,
       
   375         EQualityResolutionHigh,        
       
   376         EQualityLast  // this should always be the last
       
   377         };
       
   378 
       
   379 
       
   380 public:
       
   381 
       
   382     /* Constructors & destructor. */
       
   383 
       
   384     /**
       
   385      * Constructs a new empty CVedMovie object. May leave if no resources are available.
       
   386      * 
       
   387      * Possible leave codes:
       
   388      *  - <code>KErrNoMemory</code> if memory allocation fails
       
   389      *
       
   390      * @param aFs  file server session to use to lock the video and audio
       
   391      *             clip files of the new movie; or NULL to not to lock the files
       
   392      *
       
   393      * @return  pointer to a new CVedMovie instance
       
   394      */
       
   395     IMPORT_C static CVedMovie* NewL(RFs* aFs);
       
   396 
       
   397     /**
       
   398      * Constructs a new empty CVedMovie object and leaves the object in the cleanup stack.
       
   399      * 
       
   400      * Possible leave codes:
       
   401      *  - <code>KErrNoMemory</code> if memory allocation fails
       
   402      * 
       
   403      * @param aFs  file server session to use to lock the video and audio
       
   404      *             clip files of the new movie; or NULL to not to lock the files
       
   405      *
       
   406      * @return  pointer to a new CVedMovie instance
       
   407      */
       
   408     IMPORT_C static CVedMovie* NewLC(RFs* aFs);
       
   409 
       
   410     /* Property methods. */
       
   411 
       
   412     /**
       
   413      * Returns the quality setting of this movie.
       
   414      *
       
   415      * @return  quality setting of this movie
       
   416      */
       
   417     virtual TVedMovieQuality Quality() const = 0;
       
   418 
       
   419     /**
       
   420      * Sets the quality setting of this movie.
       
   421      *
       
   422      * @param aQuality  quality setting
       
   423      */
       
   424     virtual void SetQuality(TVedMovieQuality aQuality) = 0;
       
   425 
       
   426     /**
       
   427      * Returns the video format of this movie. 
       
   428      * 
       
   429      * @return  video format of this movie
       
   430      */
       
   431     virtual TVedVideoFormat Format() const = 0;
       
   432 
       
   433     /**
       
   434      * Returns the video type of this movie. 
       
   435      * 
       
   436      * @return  video type of this movie
       
   437      */
       
   438     virtual TVedVideoType VideoType() const = 0;
       
   439 
       
   440     /**
       
   441      * Returns the resolution of this movie. Panics with 
       
   442      * <code>TVedPanic::EMovieEmpty</code> if there are no clips 
       
   443      * in the movie.
       
   444      * 
       
   445      * @return  resolution of the movie
       
   446      */
       
   447     virtual TSize Resolution() const = 0;
       
   448 
       
   449     /**
       
   450      * Returns the recommended maximum framerate of this movie..
       
   451      * <p>
       
   452      * Note that the returned maximum framerate is a recommendation,
       
   453      * not a guarantee. For example, the video clip generators inserted
       
   454      * in this movie should not generate frames at higher framerates 
       
   455      * than the recommendation. The movie may, however, exceed this
       
   456      * framerate (for example, if the framerates of some of the video
       
   457      * clips are higher than the recommendation and it is not possible
       
   458      * to drop the framerate).
       
   459      *
       
   460      * @return  maximum framerate in frames per second
       
   461      */
       
   462     virtual TInt MaximumFramerate() const = 0;
       
   463 
       
   464     /**
       
   465      * Returns the audio type of the movie audio track.
       
   466      * 
       
   467      * @return  audio type of the movie audio track
       
   468      */
       
   469     virtual TVedAudioType AudioType() const = 0;
       
   470 
       
   471     /**
       
   472      * Returns the audio sampling rate of the movie audio track.
       
   473      *
       
   474      * @return  audio sampling rate of the movie audio track.
       
   475      */
       
   476     virtual TInt AudioSamplingRate() const = 0;
       
   477 
       
   478     /**
       
   479      * Returns the audio channel mode of the movie audio track.
       
   480      * 
       
   481      * @return  audio channel mode of the movie audio track.
       
   482      */
       
   483     virtual TVedAudioChannelMode AudioChannelMode() const = 0;
       
   484 
       
   485     /**
       
   486      * Returns the total duration of this movie.
       
   487      * 
       
   488      * @return  duration in microseconds
       
   489      */
       
   490     virtual TTimeIntervalMicroSeconds Duration() const = 0;
       
   491 
       
   492     /**
       
   493      * Returns an estimate of the total size of this movie.
       
   494      * 
       
   495      * @return  size estimate in bytes
       
   496      */
       
   497     virtual TInt GetSizeEstimateL() const = 0;
       
   498 
       
   499     /**
       
   500      * Estimates end cutpoint with given target size and start cutpoint for current movie.
       
   501      *
       
   502      * @param aTargetSize  Target filesize for section indicated by aStartTime and aEndTime.
       
   503      * @param aStartTime   Start time for first frame included in cutted section. 
       
   504      * @param aEndTime     On return contains estimated end time for given target size and start cutpoint for current movie..
       
   505      */
       
   506     virtual void GetDurationEstimateL(TInt aTargetSize, TTimeIntervalMicroSeconds aStartTime, TTimeIntervalMicroSeconds& aEndTime) = 0;
       
   507 
       
   508     /**
       
   509      * Returns whether movie properties meet MMS compatibility
       
   510      * 
       
   511      * @return  ETrue if MMS compatible, else EFalse
       
   512      */
       
   513     virtual TBool IsMovieMMSCompatible() const = 0;
       
   514 
       
   515     /* Video clip management methods. */
       
   516 
       
   517     /**
       
   518      * Returns the number of video clips in this movie.
       
   519      *
       
   520      * @return  number of video clips
       
   521      */
       
   522     virtual TInt VideoClipCount() const = 0;
       
   523 
       
   524     /** 
       
   525      * Inserts a video clip from the specified file to the specified index 
       
   526      * in this movie. The observers are notified when the clip has been added 
       
   527      * or adding clip has failed. Panics with <code>EMovieAddOperationAlreadyRunning</code> 
       
   528      * if another add video or audio clip operation is already running.
       
   529      * Panics with code <code>USER-130</code> if the clip index is invalid.
       
   530      * The file will be opened in EFileShareReadersOnly mode by default, 
       
   531      * and the same mode should be used by the client too if it need to open
       
   532      * the file at the same time.
       
   533      *  
       
   534      * Possible leave codes:
       
   535      *  - <code>KErrNoMemory</code> if memory allocation fails
       
   536      *
       
   537      * @param aFileName  file name of the clip to add
       
   538      * @param aIndex     index the clip should be inserted at
       
   539      */
       
   540     virtual void InsertVideoClipL(const TDesC& aFileName, TInt aIndex) = 0;
       
   541 
       
   542     /** 
       
   543      * Inserts a video clip generated by the specified generator to the 
       
   544      * specified index in this movie. The observers are notified when the clip 
       
   545      * has been added or adding clip has failed. Note that a video clip
       
   546      * generator can be inserted to a movie only once. Panics with
       
   547      * <code>EVideoClipGeneratorAlreadyInserted</code> if the generator has
       
   548      * already been inserted to a movie. Panics with 
       
   549      * <code>EMovieAddOperationAlreadyRunning</code> if another add video 
       
   550      * or audio clip operation is already running. Panics with code 
       
   551      * <code>USER-130</code> if the clip index is invalid.
       
   552      *
       
   553      * Possible leave codes:
       
   554      *  - <code>KErrNoMemory</code> if memory allocation fails
       
   555      *
       
   556      * @param aGenerator           generator to add
       
   557      * @param aIsOwnedByVideoClip  <code>ETrue</code>, if this movie is responsible
       
   558      *                             for deleting the generator when the clip
       
   559      *                             is removed from this movie; <code>EFalse</code>,
       
   560      *                             otherwise
       
   561      * @param aIndex               index the clip should be inserted at
       
   562      */
       
   563     virtual void InsertVideoClipL(CVedVideoClipGenerator& aGenerator, TBool aIsOwnedByVideoClip,
       
   564                                   TInt aIndex) = 0;
       
   565 
       
   566     /** 
       
   567      * Removes the video clip at the specified index from this movie.
       
   568      * Panics with code <code>USER-130</code> if the clip index is invalid.
       
   569      *
       
   570      * @param aIndex  index of the clip to be removed
       
   571      */
       
   572     virtual void RemoveVideoClip(TInt aIndex) = 0;
       
   573 
       
   574 
       
   575     /* Transition effect management methods. */
       
   576 
       
   577     /** 
       
   578      * Returns the start transition effect of this movie. Panics with 
       
   579      * <code>TVedPanic::EMovieEmpty</code> if there are no video clips 
       
   580      * in the movie.
       
   581      *
       
   582      * @return  start transition effect
       
   583      */ 
       
   584     virtual TVedStartTransitionEffect StartTransitionEffect() const = 0;
       
   585 
       
   586     /** 
       
   587      * Sets the start transition effect of this movie. Panics with 
       
   588      * <code>TVedPanic::EMovieEmpty</code> if there are no video clips 
       
   589      * in the movie.
       
   590      *
       
   591      * @param aEffect  start transition effect
       
   592      */ 
       
   593     virtual void SetStartTransitionEffect(TVedStartTransitionEffect aEffect) = 0;
       
   594 
       
   595     /**
       
   596      * Returns the number of middle transition effects in this movie.
       
   597      * Note that this is the same as the number of video clips minus one.
       
   598      *
       
   599      * @return  number of middle transition effects
       
   600      */
       
   601     virtual TInt MiddleTransitionEffectCount() const = 0;
       
   602 
       
   603     /** 
       
   604      * Returns the middle transition effect at the specified index. 
       
   605      * Panics with code <code>USER-130</code> if the index is invalid.
       
   606      *
       
   607      * @param aIndex  index
       
   608      *
       
   609      * @return  middle transition effect at the specified index
       
   610      */ 
       
   611     virtual TVedMiddleTransitionEffect MiddleTransitionEffect(TInt aIndex) const = 0;
       
   612 
       
   613     /** 
       
   614      * Sets the middle transition effect at the specified index. 
       
   615      * Panics with code <code>USER-130</code> if the index is invalid.
       
   616      *
       
   617      * @param aEffect  middle transition effect
       
   618      * @param aIndex   index
       
   619      */ 
       
   620     virtual void SetMiddleTransitionEffect(TVedMiddleTransitionEffect aEffect, TInt aIndex) = 0;
       
   621 
       
   622     /** 
       
   623      * Returns the end transition effect of this movie. Panics with 
       
   624      * <code>TVedPanic::EMovieEmpty</code> if there are no video clips 
       
   625      * in the movie.
       
   626      *
       
   627      * @return  end transition effect
       
   628      */ 
       
   629     virtual TVedEndTransitionEffect EndTransitionEffect() const = 0;
       
   630 
       
   631     /** 
       
   632      * Sets the end transition effect of this movie. Panics with 
       
   633      * <code>TVedPanic::EMovieEmpty</code> if there are no video clips 
       
   634      * in the movie.
       
   635      *
       
   636      * @param aEffect  end transition effect
       
   637      */ 
       
   638     virtual void SetEndTransitionEffect(TVedEndTransitionEffect aEffect) = 0;
       
   639     
       
   640 
       
   641     /* Audio clip management methods. */
       
   642 
       
   643     /**
       
   644      * Returns the number of audio clips in this movie.
       
   645      *
       
   646      * @return  number of audio clips
       
   647      */
       
   648     virtual TInt AudioClipCount() const = 0;
       
   649 
       
   650     /** 
       
   651      * Adds the specified audio clip to this movie. The observers are notified
       
   652      * when the clip has been added or adding clip has failed. Panics with 
       
   653      * <code>EMovieAddOperationAlreadyRunning</code> if another add video or
       
   654      * audio clip operation is already running.
       
   655      * The file will be opened in EFileShareReadersOnly mode by default, 
       
   656      * and the same mode should be used by the client too if it need to open
       
   657      * the file at the same time.
       
   658      * 
       
   659      * Possible leave codes:
       
   660      *  - <code>KErrNoMemory</code> if memory allocation fails
       
   661      *
       
   662      * @param aFileName   file name of the clip to add
       
   663      * @param aStartTime  start time of the clip in movie timebase
       
   664      * @param aCutInTime  cut in time of the clip
       
   665      * @param aCutOutTime cut out time of the clip; or 
       
   666      *                    <code>KVedAudioClipOriginalDuration</code> to specify
       
   667      *                    that the original duration of the clip should be used
       
   668      */
       
   669     virtual void AddAudioClipL(const TDesC& aFileName,
       
   670             TTimeIntervalMicroSeconds aStartTime,
       
   671             TTimeIntervalMicroSeconds aCutInTime = TTimeIntervalMicroSeconds(0),
       
   672             TTimeIntervalMicroSeconds aCutOutTime = KVedAudioClipOriginalDuration) = 0;
       
   673 
       
   674     /** 
       
   675      * Removes the audio clip at the specified index from this movie.
       
   676      * Panics with code <code>USER-130</code> if the clip index is invalid.
       
   677      *
       
   678      * @param aIndex  index of the clip to be removed
       
   679      */
       
   680     virtual void RemoveAudioClip(TInt aIndex) = 0;
       
   681     
       
   682     
       
   683     /* Whole movie management methods. */
       
   684     
       
   685     /** 
       
   686      * Removes all video and audio clips and clears all transitions.
       
   687      */
       
   688     virtual void Reset() = 0;
       
   689 
       
   690 
       
   691     /* Processing methods. */
       
   692 
       
   693     /**
       
   694      * Starts a video processing operation. This method is asynchronous and 
       
   695      * returns immediately. The processing will happen in the background and
       
   696      * the observer will be notified about the progress of the operation.
       
   697      * Processed data is written into the specified file. Panics with 
       
   698      * <code>TVedPanic::EMovieEmpty</code> if there are no clips 
       
   699      * in the movie. Note that calling <code>ProcessL</code> may cause
       
   700      * changes in the maximum frame rates of generated clips.
       
   701      * 
       
   702      * Possible leave codes:
       
   703      *  - <code>KErrNoMemory</code> if memory allocation fails
       
   704      *  - <code>KErrAccessDenied</code> if the file access is denied
       
   705      *  - <code>KErrDiskFull</code> if the disk is full
       
   706      *  - <code>KErrWrite</code> if not all data could be written
       
   707      *  - <code>KErrBadName</code> if the filename is bad
       
   708      *  - <code>KErrDirFull</code> if the directory is full
       
   709      * 
       
   710      * @param aObserver  observer to be notified of the processing status
       
   711      * @param aFileName  name of the file to be written
       
   712      */
       
   713     virtual void ProcessL(const TDesC& aFileName,
       
   714                            MVedMovieProcessingObserver& aObserver) = 0;
       
   715 
       
   716     /**
       
   717      * Cancels the current video processing operation. If there is no 
       
   718      * operation in progress, the function does nothing.
       
   719      */
       
   720     virtual void CancelProcessing() = 0;
       
   721 
       
   722 
       
   723     /* Observer methods. */
       
   724 
       
   725     /**
       
   726      * Registers a movie observer. Panics with panic code 
       
   727      * <code>EMovieObserverAlreadyRegistered</code> if the movie observer is 
       
   728      * already registered.
       
   729      *
       
   730      * @param aObserver  observer that will receive the events
       
   731      */
       
   732     virtual void RegisterMovieObserverL(MVedMovieObserver* aObserver) = 0;
       
   733 
       
   734     /**
       
   735      * Unregisters a movie observer.
       
   736      *
       
   737      * @param aObserver  observer to be unregistered
       
   738      */
       
   739     virtual void UnregisterMovieObserver(MVedMovieObserver* aObserver) = 0;
       
   740 
       
   741     /* Video Clip Methods */
       
   742     /**
       
   743      * Returns a video clip info object to get detailed information about
       
   744      * the original video clip. Note that the specified editing operations 
       
   745      * (for example, cutting or muting audio) do <em>not</em>
       
   746      * affect the values returned by the info object.
       
   747      * 
       
   748      * @param aIndex  index of video clip in movie
       
   749      * @return  pointer to a video clip info instance
       
   750      */
       
   751     virtual CVedVideoClipInfo* VideoClipInfo(TInt aIndex) const = 0;
       
   752 
       
   753     /**
       
   754      * Returns whether this video clip with the specified editing operations 
       
   755      * applied (for example, changing speed or muting) has an audio track or not.
       
   756      *
       
   757      * @param aIndex  index of video clip in movie
       
   758      * @return  <code>ETrue</code> if clip has an audio track;
       
   759      *          <code>EFalse</code> otherwise
       
   760      */
       
   761     virtual TBool VideoClipEditedHasAudio(TInt aIndex) const = 0;
       
   762 
       
   763     /**
       
   764      * Sets the index of this video clip in the movie. 
       
   765      * Panics with code <code>EVideoClipIllegalIndex</code> 
       
   766      * if the clip index is invalid.
       
   767      *
       
   768      * @param aIndex  index of video clip in movie
       
   769      * @param aNewIndex  new index of this clip
       
   770      */
       
   771     virtual void VideoClipSetIndex(TInt aOldIndex, TInt aNewIndex) = 0;
       
   772  
       
   773     /**
       
   774      * Returns the playback speed of this video clip. Playback speed is
       
   775      * specified as parts per thousand of the normal playback speed. For example.
       
   776      * 1000 means the normal speed, 750 means 75% of the normal speed, and so on.
       
   777      *
       
   778      * @param aIndex  index of video clip in movie
       
   779      * @return  playback speed
       
   780      */
       
   781     virtual TInt VideoClipSpeed(TInt aIndex) const = 0;
       
   782 
       
   783     /**
       
   784      * Sets the playback speed of this video clip. Playback speed is
       
   785      * specified as parts per thousand of the normal playback speed. For example.
       
   786      * 1000 means the normal speed, 750 means 75% of the normal speed, and so on.
       
   787      * Panics with <code>EVideoClipIllegalSpeed</code> if playback speed is
       
   788      * illegal.
       
   789      *
       
   790      * @param aIndex  index of video clip in movie
       
   791      * @param aSpeed  playback speed; must be between 1 and 1000
       
   792      */
       
   793     virtual void VideoClipSetSpeed(TInt aIndex, TInt aSpeed) = 0;
       
   794     
       
   795     /**
       
   796      * Returns the color effect of this video clip.
       
   797      *
       
   798      * @param aIndex  index of video clip in movie
       
   799      * @return  color effect
       
   800      */
       
   801     virtual TVedColorEffect VideoClipColorEffect(TInt aIndex) const = 0;
       
   802 
       
   803     /**
       
   804      * Sets the color effect of this video clip.
       
   805      *
       
   806      * @param aIndex  index of video clip in movie
       
   807      * @param aColorEffect  color effect
       
   808      */
       
   809     virtual void VideoClipSetColorEffect(TInt aIndex, TVedColorEffect aColorEffect) = 0;
       
   810 
       
   811     /**
       
   812      * Returns whether this video clip can be muted or not (that is,
       
   813      * whether the mute setting has any effect). For example, if
       
   814      * this video clip has no audio track, it can never have audio
       
   815      * even if the mute setting is false.
       
   816      *
       
   817      * @param aIndex  index of video clip in movie
       
   818      * @return  <code>ETrue</code> if this video clip can be muted;
       
   819      *          <code>EFalse</code> otherwise
       
   820      */
       
   821     virtual TBool VideoClipIsMuteable(TInt aIndex) const = 0;
       
   822 
       
   823     /**
       
   824      * Returns whether the audio track of this video clip is muted or not.
       
   825      * Note that this returns ETrue only for cases where user has explicitly 
       
   826      * muted the audio or if there is no audio track even in the input; 
       
   827      * if the track is muted automatically, e.g. due to slow motion effect, 
       
   828      * but not explicitly by the user, the return value is EFalse.
       
   829      * If the user need to know for sure if there is audio track in the output, 
       
   830      * and this method returns EFalse, then the user should also compare 
       
   831      * the return value of VideoClipSpeed() to KVedNormalSpeed, 
       
   832      * and if they are not equal, assume the audio track is muted.
       
   833      *
       
   834      * @param aIndex  index of video clip in movie
       
   835      * @return  <code>ETrue</code> if the audio track is muted;
       
   836      *          <code>EFalse</code> otherwise
       
   837      */
       
   838     virtual TBool VideoClipIsMuted(TInt aIndex) const = 0;
       
   839 
       
   840     /**
       
   841      * Sets whether the audio track of this video clip is muted or not.
       
   842      *
       
   843      * @param aIndex  index of video clip in movie
       
   844      * @param aVolume  <code>ETrue</code> to mute the audio track;
       
   845      *                 <code>EFalse</code> not to mute the audio track
       
   846      */
       
   847     virtual void VideoClipSetMuted(TInt aIndex, TBool aMuted) = 0;
       
   848 
       
   849     /**
       
   850      * Returns the cut in time of this video clip in clip timebase.
       
   851      *
       
   852      * @param aIndex  index of video clip in movie
       
   853      * @return  cut in time in microseconds in clip timebase
       
   854      */
       
   855     virtual TTimeIntervalMicroSeconds VideoClipCutInTime(TInt aIndex) const = 0;
       
   856 
       
   857     /**
       
   858      * Sets the cut in time of this video clip in clip timebase.
       
   859      * Panics with <code>EVideoClipIllegalCutInTime</code> if
       
   860      * cut in time is illegal.
       
   861      *
       
   862      * @param aIndex  index of video clip in movie
       
   863      * @param aCutInTime  cut in time in microseconds in clip timebase
       
   864      */
       
   865     virtual void VideoClipSetCutInTime(TInt aIndex, TTimeIntervalMicroSeconds aCutInTime) = 0;
       
   866 
       
   867     /**
       
   868      * Returns the cut out time of this video clip in clip timebase.
       
   869      *
       
   870      * @param aIndex  index of video clip in movie
       
   871      * @return  cut out time in microseconds in clip timebase
       
   872      */
       
   873     virtual TTimeIntervalMicroSeconds VideoClipCutOutTime(TInt aIndex) const = 0;
       
   874 
       
   875     /**
       
   876      * Sets the cut out time of this video clip in clip timebase. 
       
   877      * Panics with <code>EVideoClipIllegalCutOutTime</code> if
       
   878      * cut out time is illegal.
       
   879      *
       
   880      * @param aIndex  index of video clip in movie
       
   881      * @param aCutOutTime  cut out time in microseconds in clip timebase
       
   882      */
       
   883     virtual void VideoClipSetCutOutTime(TInt aIndex, TTimeIntervalMicroSeconds aCutOutTime) = 0;
       
   884 
       
   885     /**
       
   886      * Returns the start time of this video clip in movie timebase.
       
   887      *
       
   888      * @param aIndex  index of video clip in movie
       
   889      * @return  start time in microseconds in movie timebase
       
   890      */
       
   891     virtual TTimeIntervalMicroSeconds VideoClipStartTime(TInt aIndex) const = 0;
       
   892 
       
   893     /**
       
   894      * Returns the end time of this video clip in movie timebase.
       
   895      *
       
   896      * @param aIndex  index of video clip in movie
       
   897      * @return  end time in microseconds in movie timebase
       
   898      */
       
   899     virtual TTimeIntervalMicroSeconds VideoClipEndTime(TInt aIndex) const = 0;
       
   900 
       
   901     /**
       
   902      * Returns the duration of this video clip with the specified
       
   903      * editing operations applied (for example, cutting 
       
   904      * and changing speed)
       
   905      * 
       
   906      * @param aIndex  index of video clip in movie
       
   907      * @return  duration in microseconds
       
   908      */
       
   909     virtual TTimeIntervalMicroSeconds VideoClipEditedDuration(TInt aIndex) const = 0;
       
   910 
       
   911     /* Audio Clip Methods */
       
   912 
       
   913     /**
       
   914      * Returns an audio clip info object to get detailed information about
       
   915      * the original audio clip. Note that the specified editing operations 
       
   916      * (for example, changing duration) do <em>not</em>
       
   917      * affect the values returned by the info object.
       
   918      * 
       
   919      * @param aIndex  index of audio clip in movie
       
   920      * @return  pointer to an audio clip info instance
       
   921      */
       
   922     virtual CVedAudioClipInfo* AudioClipInfo(TInt aIndex) const = 0;
       
   923 
       
   924     /**
       
   925      * Returns the start time of this audio clip in movie timebase.
       
   926      *
       
   927      * @param aIndex  index of audio clip in movie
       
   928      * @return  start time in microseconds in movie timebase
       
   929      */
       
   930     virtual TTimeIntervalMicroSeconds AudioClipStartTime(TInt aIndex) const = 0;
       
   931 
       
   932     /**
       
   933      * Sets the start time of this audio clip in movie timebase. 
       
   934      * Also updates the end time. Duration remains unchanged.
       
   935      * Note that since the audio clips are ordered based on their
       
   936      * start times, the index of the clip may change as a result
       
   937      * of changing the start time.
       
   938      *
       
   939      * @param aIndex  index of audio clip in movie
       
   940      * @param aStartTime  start time in microseconds in movie timebase
       
   941      */
       
   942     virtual void AudioClipSetStartTime(TInt aIndex, TTimeIntervalMicroSeconds aStartTime) = 0;
       
   943 
       
   944     /**
       
   945      * Returns the end time of this audio clip in movie timebase.
       
   946      *
       
   947      * @param aIndex  index of audio clip in movie
       
   948      * @return  end time in microseconds in movie timebase
       
   949      */
       
   950     virtual TTimeIntervalMicroSeconds AudioClipEndTime(TInt aIndex) const = 0;
       
   951 
       
   952     /**
       
   953      * Returns the duration of the selected part of this clip.
       
   954      * 
       
   955      * @param aIndex  index of audio clip in movie
       
   956      * @return  duration in microseconds
       
   957      */
       
   958     virtual TTimeIntervalMicroSeconds AudioClipEditedDuration(TInt aIndex) const = 0;
       
   959 
       
   960     /**
       
   961      * Returns the cut in time of this audio clip in clip timebase.
       
   962      *
       
   963      * @param aIndex  index of audio clip in movie
       
   964      * @return  cut in time in microseconds in clip timebase
       
   965      */
       
   966     virtual TTimeIntervalMicroSeconds AudioClipCutInTime(TInt aIndex) const = 0;
       
   967 
       
   968     /**
       
   969      * Sets the cut in time of this audio clip in clip timebase.
       
   970      * Panics with <code>EAudioClipIllegalCutInTime</code> if
       
   971      * cut in time is illegal.
       
   972      *
       
   973      * @param aIndex  index of audio clip in movie
       
   974      * @param aCutInTime  cut in time in microseconds in clip timebase
       
   975      */
       
   976     virtual void AudioClipSetCutInTime(TInt aIndex, TTimeIntervalMicroSeconds aCutInTime) = 0;
       
   977 
       
   978     /**
       
   979      * Returns the cut out time of this audio clip in clip timebase.
       
   980      *
       
   981      * @param aIndex  index of audio clip in movie
       
   982      * @return  cut out time in microseconds in clip timebase
       
   983      */
       
   984     virtual TTimeIntervalMicroSeconds AudioClipCutOutTime(TInt aIndex) const = 0;
       
   985 
       
   986     /**
       
   987      * Sets the cut out time of this audio clip in clip timebase.
       
   988      * Panics with <code>EAudioClipIllegalCutOutTime</code> if
       
   989      * cut in time is illegal.
       
   990      *
       
   991      * @param aIndex  index of audio clip in movie
       
   992      * @param aCutOutTime  cut out time in microseconds in clip timebase
       
   993      */
       
   994     virtual void AudioClipSetCutOutTime(TInt aIndex, TTimeIntervalMicroSeconds aCutOutTime) = 0;
       
   995 
       
   996     /**
       
   997      * Returns the target bitrate of the movie audio track.
       
   998      * 
       
   999      * @return  target bitrate of the movie audio track.
       
  1000      */
       
  1001     virtual TInt AudioBitrate() const = 0;
       
  1002 
       
  1003     /**
       
  1004      * Returns the target bitrate of the movie video track.
       
  1005      * 
       
  1006      * @return  target bitrate of the movie video track.
       
  1007      */
       
  1008     virtual TInt VideoBitrate() const = 0;
       
  1009 
       
  1010     /**
       
  1011      * Returns the target framerate of the movie video track.
       
  1012      * 
       
  1013      * @return  target framerate of the movie video track.
       
  1014      */
       
  1015     virtual TReal VideoFrameRate() const = 0;
       
  1016 
       
  1017     /**
       
  1018      * Sets the output parameters for the movie. Leaves
       
  1019      * with KErrNotSupported if a parameter is illegal,
       
  1020      * e.g., target bitrate is too high for the given 
       
  1021      * codec. Setting a integer parameter to zero indicates
       
  1022      * that a default value will be used for that parameter.
       
  1023      *
       
  1024      * This method overrides the SetQuality method
       
  1025      *
       
  1026      * Possible leave codes:
       
  1027      *  - <code>KErrNotSupported</code> if setting is not valid
       
  1028      *
       
  1029      * @param Output parameters
       
  1030      */
       
  1031     
       
  1032     virtual void SetOutputParametersL(TVedOutputParameters& aOutputParams) = 0;
       
  1033     
       
  1034     /**
       
  1035      * Sets the maximum size for the movie
       
  1036      * 
       
  1037      * @param aLimit Maximum size in bytes
       
  1038      */
       
  1039     virtual void SetMovieSizeLimit(TInt aLimit) = 0;
       
  1040     
       
  1041      /**
       
  1042      * Returns whether this audio clip is normalized or not.
       
  1043      *
       
  1044      * @param aIndex  index of audio clip in movie
       
  1045      * @return  <code>ETrue</code> if the audio clip is normalized;
       
  1046      *          <code>EFalse</code> otherwise
       
  1047      */
       
  1048     virtual TBool AudioClipNormalizing(TInt aIndex) const = 0;
       
  1049 
       
  1050     /**
       
  1051      * Sets whether this audio clip is normalized or not.
       
  1052      *
       
  1053      * @param aIndex  index of audio clip in movie
       
  1054      * @param aVolume  <code>ETrue</code> to normalize the audio clip;
       
  1055      *                 <code>EFalse</code> not to normalize the audio clip
       
  1056      */
       
  1057     virtual void AudioClipSetNormalizing(TInt aIndex, TBool aNormalizing) = 0;
       
  1058 
       
  1059     /**
       
  1060      * Inserts a new dynamic level mark to the audio clip. The mark timing
       
  1061      * must be within the time boundaries of the audio clip.
       
  1062      *
       
  1063      * Note! This method should not be used at the same time with SetAudioClipVolumeGainL
       
  1064      * since these overrule each other; the latter one used stays valid.
       
  1065      *
       
  1066      * @param aIndex  index of the audio clip
       
  1067      * @param aMark   dynamic level mark to be inserted
       
  1068      */
       
  1069     virtual void AudioClipInsertDynamicLevelMarkL(TInt aIndex, TVedDynamicLevelMark aMark) = 0;
       
  1070     
       
  1071     /**
       
  1072      * Removes the specified dynamic level mark from the specified audio clip.
       
  1073      * The mark index must be between 0 and number of dynamic level marks in the clip.
       
  1074      *
       
  1075      * @param aClipIndex  index of the audio clip
       
  1076      * @param aMarkIndex  index of the mark to be removed
       
  1077      */
       
  1078     virtual void AudioClipRemoveDynamicLevelMark(TInt aClipIndex, TInt aMarkIndex) = 0;
       
  1079 
       
  1080     /**
       
  1081      * Returns the number of dynamic level marks in the specified audio clip.
       
  1082      * 
       
  1083      * @param aIndex  index of the audio clip
       
  1084      */
       
  1085     virtual TInt AudioClipDynamicLevelMarkCount(TInt aIndex) const = 0;
       
  1086 
       
  1087     /**
       
  1088      * Returns the specified dynamic level mark from the specified audio clip.
       
  1089      * 
       
  1090      * @param aClipIndex  index of the audio clip
       
  1091      * @param aMarkIndex  index of the dynamic level mark
       
  1092      */    
       
  1093     virtual TVedDynamicLevelMark AudioClipDynamicLevelMark(TInt aClipIndex, TInt aMarkIndex) = 0;
       
  1094 
       
  1095     /**
       
  1096      * Returns whether the audio track of this video clip is normalized or not.
       
  1097      *
       
  1098      * @param aIndex  index of video clip in movie
       
  1099      * @return  <code>ETrue</code> if the audio track is normalized;
       
  1100      *          <code>EFalse</code> otherwise
       
  1101      */
       
  1102     virtual TBool VideoClipNormalizing(TInt aIndex) const = 0;
       
  1103 
       
  1104     /**
       
  1105      * Sets whether the audio track of this video clip is normalized or not.
       
  1106      *
       
  1107      * @param aIndex  index of video clip in movie
       
  1108      * @param aVolume  <code>ETrue</code> to normalize the audio track;
       
  1109      *                 <code>EFalse</code> not to normalize the audio track
       
  1110      */
       
  1111     virtual void VideoClipSetNormalizing(TInt aIndex, TBool aNormalizing) = 0;
       
  1112 
       
  1113     /**
       
  1114      * Inserts a new dynamic level mark to the video clip. The mark timing
       
  1115      * must be within the time boundaries of the video clip.
       
  1116      *
       
  1117      * Note! This method should not be used at the same time with SetVideoClipVolumeGainL
       
  1118      * since these overrule each other; the latter one used stays valid.
       
  1119      *
       
  1120      * @param aIndex  index of the video clip
       
  1121      * @param aMark   dynamic level mark to be inserted
       
  1122      */
       
  1123     virtual void VideoClipInsertDynamicLevelMarkL(TInt aIndex, TVedDynamicLevelMark aMark) = 0;
       
  1124     
       
  1125     /**
       
  1126      * Removes the specified dynamic level mark from the specified video clip.
       
  1127      * The mark index must be between 0 and number of dynamic level marks in the clip.
       
  1128      *
       
  1129      * @param aClipIndex  index of the video clip
       
  1130      * @param aMarkIndex  index of the mark to be removed
       
  1131      */
       
  1132     virtual void VideoClipRemoveDynamicLevelMark(TInt aClipIndex, TInt aMarkIndex) = 0;
       
  1133 
       
  1134     /**
       
  1135      * Returns the number of dynamic level marks in the specified video clip.
       
  1136      * 
       
  1137      * @param aIndex  index of the video clip
       
  1138      */
       
  1139     virtual TInt VideoClipDynamicLevelMarkCount(TInt aIndex) const = 0;
       
  1140 
       
  1141     /**
       
  1142      * Returns the specified dynamic level mark from the specified video clip.
       
  1143      * 
       
  1144      * @param aClipIndex  index of the video clip
       
  1145      * @param aMarkIndex  index of the dynamic level mark
       
  1146      */    
       
  1147     virtual TVedDynamicLevelMark VideoClipDynamicLevelMark(TInt aClipIndex, TInt aMarkIndex) = 0;    
       
  1148     
       
  1149      /**
       
  1150      * Returns the color tone of the specified clip.
       
  1151      *
       
  1152      * @return color tone
       
  1153      */
       
  1154     virtual TRgb VideoClipColorTone(TInt aVideoCLipIndex) const = 0;
       
  1155     
       
  1156     /**
       
  1157      * Sets the color tone of the specified clip.
       
  1158      *
       
  1159      * @param aColorTone  color tone
       
  1160      */
       
  1161     virtual void VideoClipSetColorTone(TInt aVideoClipIndex, TRgb aColorTone) = 0;
       
  1162     
       
  1163      /**
       
  1164      * Returns an estimate for movie processing time
       
  1165      *
       
  1166      * @return Processing time
       
  1167      */
       
  1168     virtual TTimeIntervalMicroSeconds GetProcessingTimeEstimateL() = 0;
       
  1169 
       
  1170     /**
       
  1171      * Checks if a movie observer is registered.
       
  1172      *
       
  1173      * @param aObserver observer to be checked
       
  1174      * @return <code>ETrue</code> if the observer is registered
       
  1175      *         <code>EFalse</code> otherwise
       
  1176      */
       
  1177     virtual TBool MovieObserverIsRegistered(MVedMovieObserver* aObserver) = 0;
       
  1178 
       
  1179     /**
       
  1180      * Set volume gain for audio track in the given video clip. Value 0 means no gain.
       
  1181      * In practice calls VideoClipInsertDynamicLevelMarkL to set dynamic level mark
       
  1182      * to the beginning and end of the clip. 
       
  1183      * Also the observer callback NotifyVideoClipDynamicLevelMarkInserted is called if gain
       
  1184      * is nonzero; if it is zero, callback NotifyVideoClipDynamicLevelMarkRemoved is called.
       
  1185      *
       
  1186      * If index is KVedClipIndexAll, the setting is applied to all video clips in the movie.
       
  1187      *
       
  1188      * Note! This method should not be used at the same time with VideoClipInsertDynamicLevelMarkL
       
  1189      * since these overrule each other; the latter one used stays valid.
       
  1190      *
       
  1191      * @param aClipIndex    index of the clip; KVedClipIndexAll if applied for all the clips
       
  1192      * @param aVolumeGain   Volume gain. One step equals 0.1 dedibels for positive values and
       
  1193      *                      0.5 decibels for negative values.
       
  1194      *                      Value = 0 sets the original level (no gain)
       
  1195      *                      Value range -127...127; if exceeded, the value is saturated to max
       
  1196      */
       
  1197     virtual void SetVideoClipVolumeGainL(TInt aClipIndex, TInt aVolumeGain) = 0;
       
  1198 
       
  1199     /**
       
  1200      * Get volume gain for audio track in the given video clip.
       
  1201      * If index is KVedClipIndexAll, the global gain set for all video clips in the movie is returned.
       
  1202      *
       
  1203      * @param aClipIndex    index of the clip; KVedClipIndexAll if applied for all the clips (whole movie)
       
  1204      * @return Volume gain in +0.1 or -0.5 decibel steps
       
  1205      */
       
  1206     virtual TInt GetVideoClipVolumeGainL(TInt aClipIndex) = 0;
       
  1207 
       
  1208     /**
       
  1209      * Set volume gain for the given audio clip. Value 0 means no gain.
       
  1210      * In practice calls AudioClipInsertDynamicLevelMarkL to set dynamic level mark
       
  1211      * to the beginning and end of the clip. 
       
  1212      * Also the observer callback NotifyAudioClipDynamicLevelMarkInserted is called if gain
       
  1213      * is nonzero; if it is zero, callback NotifyAudioClipDynamicLevelMarkRemoved is called.
       
  1214      *
       
  1215      * If index is KVedClipIndexAll, the setting is applied to all audio clips in the movie.
       
  1216      *
       
  1217      * Note! This method should not be used at the same time with AudioClipInsertDynamicLevelMarkL
       
  1218      * since these overrule each other; the latter one used stays valid.
       
  1219      *
       
  1220      * @param aClipIndex    Index of the clip; KVedClipIndexAll if applied for all the clips
       
  1221      * @param aVolumeGain   Volume gain. One step equals 0.1 dedibels for positive values and
       
  1222      *                      0.5 decibels for negative values. 
       
  1223      *                      Value = 0 sets the original level (no gain)
       
  1224      *                      Value range -127...127; if exceeded, the value is saturated to max
       
  1225      */
       
  1226     virtual void SetAudioClipVolumeGainL(TInt aClipIndex, TInt aVolumeGain) = 0;
       
  1227 
       
  1228     /**
       
  1229      * Get volume gain for the given audio clip.
       
  1230      * If index is KVedClipIndexAll, the global gain set for all video clips in the movie is returned.
       
  1231      *
       
  1232      * @param aClipIndex    index of the clip; KVedClipIndexAll if applied for all the clips
       
  1233      * @return Volume gain in +0.1 or -0.5 decibel steps
       
  1234      */
       
  1235     virtual TInt GetAudioClipVolumeGainL(TInt aClipIndex) = 0;
       
  1236     
       
  1237     /** 
       
  1238      * Inserts a video clip from the specified file to the specified index 
       
  1239      * in this movie. The observers are notified when the clip has been added 
       
  1240      * or adding clip has failed. Panics with <code>EMovieAddOperationAlreadyRunning</code> 
       
  1241      * if another add video or audio clip operation is already running.
       
  1242      * Panics with code <code>USER-130</code> if the clip index is invalid.
       
  1243      * The file will be opened in EFileShareReadersOnly mode by default, 
       
  1244      * and the same mode should be used by the client too if it need to open
       
  1245      * the file at the same time.
       
  1246      *  
       
  1247      * Possible leave codes:
       
  1248      *  - <code>KErrNoMemory</code> if memory allocation fails
       
  1249      *
       
  1250      * @param aFileHandle  file handle of the clip to add
       
  1251      * @param aIndex     index the clip should be inserted at
       
  1252      */
       
  1253     virtual void InsertVideoClipL(RFile* aFileHandle, TInt aIndex) = 0;
       
  1254     
       
  1255     /** 
       
  1256      * Adds the specified audio clip to this movie. The observers are notified
       
  1257      * when the clip has been added or adding clip has failed. Panics with 
       
  1258      * <code>EMovieAddOperationAlreadyRunning</code> if another add video or
       
  1259      * audio clip operation is already running.
       
  1260      * The file will be opened in EFileShareReadersOnly mode by default, 
       
  1261      * and the same mode should be used by the client too if it need to open
       
  1262      * the file at the same time.
       
  1263      * 
       
  1264      * Possible leave codes:
       
  1265      *  - <code>KErrNoMemory</code> if memory allocation fails
       
  1266      *
       
  1267      * @param aFilehandle   file handle of the clip to add
       
  1268      * @param aStartTime  start time of the clip in movie timebase
       
  1269      * @param aCutInTime  cut in time of the clip
       
  1270      * @param aCutOutTime cut out time of the clip; or 
       
  1271      *                    <code>KVedAudioClipOriginalDuration</code> to specify
       
  1272      *                    that the original duration of the clip should be used
       
  1273      */
       
  1274     
       
  1275     virtual void AddAudioClipL(RFile* aFileHandle,
       
  1276             TTimeIntervalMicroSeconds aStartTime,
       
  1277             TTimeIntervalMicroSeconds aCutInTime = TTimeIntervalMicroSeconds(0),
       
  1278             TTimeIntervalMicroSeconds aCutOutTime = KVedAudioClipOriginalDuration) = 0;
       
  1279     
       
  1280     /**
       
  1281      * Starts a video processing operation. This method is asynchronous and 
       
  1282      * returns immediately. The processing will happen in the background and
       
  1283      * the observer will be notified about the progress of the operation.
       
  1284      * Processed data is written into the specified file. Panics with 
       
  1285      * <code>TVedPanic::EMovieEmpty</code> if there are no clips 
       
  1286      * in the movie. Note that calling <code>ProcessL</code> may cause
       
  1287      * changes in the maximum frame rates of generated clips.
       
  1288      * 
       
  1289      * Possible leave codes:
       
  1290      *  - <code>KErrNoMemory</code> if memory allocation fails
       
  1291      *  - <code>KErrAccessDenied</code> if the file access is denied
       
  1292      *  - <code>KErrDiskFull</code> if the disk is full
       
  1293      *  - <code>KErrWrite</code> if not all data could be written
       
  1294      *  - <code>KErrBadName</code> if the filename is bad
       
  1295      *  - <code>KErrDirFull</code> if the directory is full
       
  1296      * 
       
  1297      * @param aObserver  observer to be notified of the processing status
       
  1298      * @param aFileHandle  handle of the file to be written
       
  1299      */
       
  1300     
       
  1301     virtual void ProcessL(RFile* aFileHandle,
       
  1302                           MVedMovieProcessingObserver& aObserver) = 0;
       
  1303     
       
  1304 
       
  1305     };
       
  1306 
       
  1307 #endif // __VEDMOVIE_H__
       
  1308