camappengine/Engine/Src/CaeEngineImpVideoNameCustom.cpp
branchRCL_3
changeset 10 6bc4220d7f67
parent 0 9b3e960ffc8a
equal deleted inserted replaced
6:bcdc0181a9f1 10:6bc4220d7f67
    20 
    20 
    21 // INCLUDE FILES
    21 // INCLUDE FILES
    22 #include "CaeEngineImp.h" // For Camera Application Engine implementation.
    22 #include "CaeEngineImp.h" // For Camera Application Engine implementation.
    23 #include "CamCControllerCustomCommands.h" // For Camcorder plug-in custom commands and UId.
    23 #include "CamCControllerCustomCommands.h" // For Camcorder plug-in custom commands and UId.
    24 #include <mmf/server/mmffile.h> // For MMF definitions (as TMMFFileConfig)
    24 #include <mmf/server/mmffile.h> // For MMF definitions (as TMMFFileConfig)
       
    25 #include "OstTraceDefinitions.h"
       
    26 #ifdef OST_TRACE_COMPILER_IN_USE
       
    27 #include "CaeEngineImpVideoNameCustomTraces.h"
       
    28 #endif
    25 
    29 
    26 // -----------------------------------------------------------------------------
    30 // -----------------------------------------------------------------------------
    27 // CCaeEngineImp::ChangeVideoFileNameL
    31 // CCaeEngineImp::ChangeVideoFileNameL
    28 // -----------------------------------------------------------------------------
    32 // -----------------------------------------------------------------------------
    29 //
    33 //
    30 void CCaeEngineImp::ChangeVideoFileNameL()
    34 void CCaeEngineImp::ChangeVideoFileNameL()
    31     {
    35     {
       
    36     OstTrace0( CAMERASRV_PERFORMANCE, CCAEENGINEIMP_CHANGEVIDEOFILENAMEL, "e_CAM_CAE_CHANGE_VIDEO_FILE_NAME 1" );
    32     LOGTEXT( _L( "Cae: CCaeEngineImp::ChangeVideoFileNameL() entering" ) );
    37     LOGTEXT( _L( "Cae: CCaeEngineImp::ChangeVideoFileNameL() entering" ) );
    33 
    38 
    34     if ( iVideoControllerUid == KCamCControllerImplementationUid ) 
    39     if ( iVideoControllerUid == KCamCControllerImplementationUid ) 
    35         {
    40         {
    36         // Use custom command interface of Video Recorder to change the file name.
    41         // Use custom command interface of Video Recorder to change the file name.
    37         // We know that the custom command is available with this specific implementation.
    42         // We know that the custom command is available with this specific implementation.
    38         TMMFFileConfig pckg;
    43         TMMFFileConfig pckg;
    39         pckg().iPath = iVideoClipFileName->Des();
    44         pckg().iPath = iVideoClipFileName->Des();
       
    45         OstTrace0( CAMERASRV_PERFORMANCE, DUP2_CCAEENGINEIMP_CHANGEVIDEOFILENAMEL, "e_CAM_CAE_CUSTOM_COMMAND 1" );
    40         TInt err = iVideoRecorder->CustomCommandSync( TMMFMessageDestination( iVideoControllerUid, 
    46         TInt err = iVideoRecorder->CustomCommandSync( TMMFMessageDestination( iVideoControllerUid, 
    41                                                                    KMMFObjectHandleController ), 
    47                                                                    KMMFObjectHandleController ), 
    42                                            ECamCControllerCCNewFilename, 
    48                                            ECamCControllerCCNewFilename, 
    43                                            pckg, 
    49                                            pckg, 
    44                                            KNullDesC8 );
    50                                            KNullDesC8 );
       
    51         OstTrace0( CAMERASRV_PERFORMANCE, DUP3_CCAEENGINEIMP_CHANGEVIDEOFILENAMEL, "e_CAM_CAE_CUSTOM_COMMAND 0" );
    45         if (err)
    52         if (err)
    46             {
    53             {
    47             LOGTEXT2( _L( "Cae: CCaeEngineImp::ChangeVideoFileNameL() CustomCommandSync failed err=%d, leaving" ), err );
    54             LOGTEXT2( _L( "Cae: CCaeEngineImp::ChangeVideoFileNameL() CustomCommandSync failed err=%d, leaving" ), err );
    48             User::Leave(err);
    55             User::Leave(err);
    49             }
    56             }
    50         iPrepPars = EFalse;
    57         iPrepPars = EFalse;
       
    58         OstTrace0( CAMERASRV_PERFORMANCE, DUP4_CCAEENGINEIMP_CHANGEVIDEOFILENAMEL, "e_CAM_CAE_VIDEORECORDER_PREPARE 1" );
    51         iVideoRecorder->Prepare();
    59         iVideoRecorder->Prepare();
       
    60         OstTrace0( CAMERASRV_PERFORMANCE, DUP5_CCAEENGINEIMP_CHANGEVIDEOFILENAMEL, "e_CAM_CAE_VIDEORECORDER_PREPARE 0" );
    52         }
    61         }
    53     else 
    62     else 
    54         {
    63         {
    55         // With 3rd party video controllers we need to re-open video recording because
    64         // With 3rd party video controllers we need to re-open video recording because
    56         // we can not rely on using custom command for changing the file name.
    65         // we can not rely on using custom command for changing the file name.
    57         CloseVideoRecording();
    66         CloseVideoRecording();
    58         // Open video recorder.
    67         // Open video recorder.
    59         iVideoOpened = ETrue; // This is always set to ETrue when 
    68         iVideoOpened = ETrue; // This is always set to ETrue when 
    60                               // OpenFileL has been called to allow 
    69                               // OpenFileL has been called to allow 
    61                               // freeing resources by CloseVideoRecording().
    70                               // freeing resources by CloseVideoRecording().
       
    71         OstTrace0( CAMERASRV_PERFORMANCE, DUP6_CCAEENGINEIMP_CHANGEVIDEOFILENAMEL, "e_CAM_CAE_VIDEORECORDER_OPENFILE 1" );
    62         iVideoRecorder->OpenFileL( iVideoClipFileName->Des(),
    72         iVideoRecorder->OpenFileL( iVideoClipFileName->Des(),
    63                                    iCameraHandle,
    73                                    iCameraHandle,
    64                                    iVideoControllerUid,
    74                                    iVideoControllerUid,
    65                                    iVideoFormatUid, 
    75                                    iVideoFormatUid, 
    66                                    iVideoType->Des(),  
    76                                    iVideoType->Des(),  
    67                                    iVideoAudioType );
    77                                    iVideoAudioType );
       
    78         OstTrace0( CAMERASRV_PERFORMANCE, DUP7_CCAEENGINEIMP_CHANGEVIDEOFILENAMEL, "e_CAM_CAE_VIDEORECORDER_OPENFILE 0" );
    68         }
    79         }
    69 
    80     OstTrace0( CAMERASRV_PERFORMANCE, DUP1_CCAEENGINEIMP_CHANGEVIDEOFILENAMEL, "e_CAM_CAE_CHANGE_VIDEO_FILE_NAME 0" );
    70     LOGTEXT( _L( "Cae: CCaeEngineImp::ChangeVideoFileNameL() returning" ) );
    81     LOGTEXT( _L( "Cae: CCaeEngineImp::ChangeVideoFileNameL() returning" ) );
    71     }
    82     }
    72 
    83 
    73 //  End of File
    84 //  End of File