camappengine/Engine/Src/CaeEngineImpVideoRecording.cpp
branchRCL_3
changeset 9 88688c05574c
parent 8 6bc4220d7f67
--- a/camappengine/Engine/Src/CaeEngineImpVideoRecording.cpp	Fri Mar 12 15:43:25 2010 +0200
+++ b/camappengine/Engine/Src/CaeEngineImpVideoRecording.cpp	Mon Mar 15 12:41:16 2010 +0200
@@ -1155,25 +1155,26 @@
         User::Leave( KErrNotSupported );
         }
 
-    // Get the controller UID.
-    iVideoControllerUid = controllers[0]->Uid();
+    TBool found( EFalse );
+    for ( TInt contInd = 0; contInd < controllers.Count() && !found; contInd++ ) // there can be more than one controller, search from all of them
+        {
+        // Get the controller UID.
+        iVideoControllerUid = controllers[contInd]->Uid();
+        LOGTEXT3( _L("Cae: CCaeEngineImp::FindVideoUidsL() contInd=%d, Uid=%x"), contInd, iVideoControllerUid.iUid );
 
-    // Inquires the controller about supported formats.
-    // We use the first controller found having index 0.
-    RMMFFormatImplInfoArray formats;
-    formats = controllers[0]->RecordFormats();
+        // Inquires the controller about supported formats.
+        RMMFFormatImplInfoArray formats = controllers[contInd]->RecordFormats();
 
-    // Get the first format that supports our mime type.
-    
-    TBool found( EFalse );
-
-    for ( TInt i = 0; i < formats.Count(); i++ )
-        {
-        if ( formats[i]->SupportsMimeType( aMimeType ) )
+        // Get the first format that supports our mime type.
+        for ( TInt i = 0; i < formats.Count(); i++ )
             {
-            iVideoFormatUid = formats[i]->Uid(); // set the UID
-            found = ETrue;
-            break;
+            if ( formats[i]->SupportsMimeType( aMimeType ) )
+                {
+                iVideoFormatUid = formats[i]->Uid(); // set the UID
+                found = ETrue;
+                LOGTEXT3( _L("Cae: CCaeEngineImp::FindVideoUidsL() Found iVideoFormatUid=%x, index=%d"), iVideoFormatUid.iUid, i );
+                break;
+                }
             }
         }
     if ( !found )