summaryrefslogtreecommitdiffstats
path: root/libvideoeditor/osal
diff options
context:
space:
mode:
authorDharmaray Kundargi <dharmaray@google.com>2011-01-17 18:44:23 -0800
committerDharmaray Kundargi <dharmaray@google.com>2011-01-17 18:45:44 -0800
commit945956bb7126e483c3bcf7583c9f7acaae952830 (patch)
treea98e538af997a1cf08cb7c58b8a9e75e81d096cb /libvideoeditor/osal
parent524effb5b841da901a141160480a6b00d1d9861f (diff)
downloadframeworks_av-945956bb7126e483c3bcf7583c9f7acaae952830.zip
frameworks_av-945956bb7126e483c3bcf7583c9f7acaae952830.tar.gz
frameworks_av-945956bb7126e483c3bcf7583c9f7acaae952830.tar.bz2
videoeditor osal files check in on honeycomb
Change-Id: Ibb1f20329fbc6bb1629f5d6d4588eb6966f1c1ab
Diffstat (limited to 'libvideoeditor/osal')
-rwxr-xr-xlibvideoeditor/osal/src/M4OSA_FileCommon.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/libvideoeditor/osal/src/M4OSA_FileCommon.c b/libvideoeditor/osal/src/M4OSA_FileCommon.c
index 25163e6..b7a0a5b 100755
--- a/libvideoeditor/osal/src/M4OSA_FileCommon.c
+++ b/libvideoeditor/osal/src/M4OSA_FileCommon.c
@@ -45,6 +45,7 @@
#include "M4OSA_Memory.h"
#include "M4OSA_CharStar.h"
+#define FILE_LOWER_CASE //defined to support limitaion of lower case file system in sdcard.
/**
************************************************************************
* @brief This function opens the provided URL and returns its context.
@@ -85,6 +86,10 @@ M4OSA_ERR M4OSA_fileCommonOpen(M4OSA_UInt16 core_id, M4OSA_Context* pContext,
FILE* pFileHandler = M4OSA_NULL;
M4OSA_FileContext *pFileContext = M4OSA_NULL;
+#ifdef FILE_LOWER_CASE
+ M4OSA_Char *tmpLowerCaseUrl = M4OSA_NULL;
+#endif
+
#ifdef UTF_CONVERSION
/*FB: to test the UTF16->UTF8 conversion into Video Artist*/
/*Convert the URL from UTF16 to UTF8*/
@@ -134,6 +139,15 @@ M4OSA_ERR M4OSA_fileCommonOpen(M4OSA_UInt16 core_id, M4OSA_Context* pContext,
M4OSA_DEBUG_IF1((M4OSA_FILE_WRITER == core_id) && !(fileModeAccess & M4OSA_kFileWrite),
M4ERR_FILE_BAD_MODE_ACCESS, "M4OSA_fileCommonOpen: M4OSA_kFileWrite");
+#ifdef FILE_LOWER_CASE
+ tmpLowerCaseUrl = (M4OSA_Char*)M4OSA_malloc(strlen(pUrl) +1, 0, "conversion buf");
+ for(i=0; i<strlen(pUrl); i++)
+ {
+ tmpLowerCaseUrl[i] = M4OSA_chrToLower(pUrl[i]);
+ }
+ tmpLowerCaseUrl[i] = '\0'; //null terminate
+#endif
+
/* Create flag necessary for opening file */
if ((fileModeAccess & M4OSA_kFileRead) &&
(fileModeAccess & M4OSA_kFileWrite)&&(fileModeAccess & M4OSA_kFileCreate))
@@ -174,8 +188,9 @@ M4OSA_ERR M4OSA_fileCommonOpen(M4OSA_UInt16 core_id, M4OSA_Context* pContext,
pFileHandler = fopen((const char *)tempConversionBuf, (const char *)mode);
/*Free the temporary decoded buffer*/
M4OSA_free((M4OSA_MemAddr32)tempConversionBuf);
-#else
- pFileHandler = fopen((const char *)pUrl, (const char *)mode);
+#else if FILE_LOWER_CASE
+ pFileHandler = fopen((const char *)tmpLowerCaseUrl, (const char *)mode);
+ M4OSA_free((M4OSA_MemAddr32)tmpLowerCaseUrl);
#endif /* UTF_CONVERSION */
if (M4OSA_NULL == pFileHandler)