Modification for using Software decoder for thumbnail generation in JNI

Change-Id: Ie3dd5a28311627fd0b559bc3d4e28d2f668ccc61
diff --git a/media/jni/mediaeditor/Android.mk b/media/jni/mediaeditor/Android.mk
index 6a7116c..9c21e5e 100755
--- a/media/jni/mediaeditor/Android.mk
+++ b/media/jni/mediaeditor/Android.mk
@@ -66,7 +66,8 @@
     -DUSE_STAGEFRIGHT_AUDIOENC \
     -DUSE_STAGEFRIGHT_VIDEOENC \
     -DUSE_STAGEFRIGHT_READERS \
-    -DUSE_STAGEFRIGHT_3GPP_READER
+    -DUSE_STAGEFRIGHT_3GPP_READER \
+    -DUSE_SOFTWARE_DECODER
 
 
 LOCAL_LDFLAGS += -fuse-ld=bfd
diff --git a/media/jni/mediaeditor/VideoBrowserMain.c b/media/jni/mediaeditor/VideoBrowserMain.c
index f54a16e..bb13fba 100755
--- a/media/jni/mediaeditor/VideoBrowserMain.c
+++ b/media/jni/mediaeditor/VideoBrowserMain.c
@@ -246,9 +246,13 @@
                     pContext->m_pCodecLoaderContext = M4OSA_NULL;
                     decoderType = M4DECODER_kVideoTypeMPEG4;
 
-                    err = VideoEditorVideoDecoder_getInterface_MPEG4(
-                        &decoderType, &pContext->m_pDecoder);
-
+#ifdef USE_SOFTWARE_DECODER
+                        err = VideoEditorVideoDecoder_getSoftwareInterface_MPEG4(
+                            &decoderType, &pContext->m_pDecoder);
+#else
+                        err = VideoEditorVideoDecoder_getInterface_MPEG4(
+                            &decoderType, &pContext->m_pDecoder);
+#endif
                     CHECK_ERR(videoBrowserCreate, err) ;
 
                     err = pContext->m_pDecoder->m_pFctCreate(
@@ -267,8 +271,14 @@
                     pContext->m_pCodecLoaderContext = M4OSA_NULL;
 
                     decoderType = M4DECODER_kVideoTypeAVC;
-                    err = VideoEditorVideoDecoder_getInterface_H264(
-                        &decoderType, &pContext->m_pDecoder);
+
+#ifdef USE_SOFTWARE_DECODER
+                        err = VideoEditorVideoDecoder_getSoftwareInterface_H264(
+                            &decoderType, &pContext->m_pDecoder);
+#else
+                        err = VideoEditorVideoDecoder_getInterface_H264(
+                            &decoderType, &pContext->m_pDecoder);
+#endif
                    CHECK_ERR(videoBrowserCreate, err) ;
 
                     err = pContext->m_pDecoder->m_pFctCreate(