summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
authorsynergydev <synergye@codefi.re>2013-10-25 12:36:28 -0700
committersynergydev <synergye@codefi.re>2013-10-25 12:38:30 -0700
commit3b546caeb0a576c4d7d7f1e8d2fdfed2bb8bdeed (patch)
tree06f5ff682b7809091f39ca7c2beae8f435d741a0 /libvideoeditor
parentd5255d1de125d15afae6cfc35701a5255b5e2933 (diff)
downloadframeworks_av-3b546caeb0a576c4d7d7f1e8d2fdfed2bb8bdeed.zip
frameworks_av-3b546caeb0a576c4d7d7f1e8d2fdfed2bb8bdeed.tar.gz
frameworks_av-3b546caeb0a576c4d7d7f1e8d2fdfed2bb8bdeed.tar.bz2
Fix c++11 narrowing
The best fix for these narrowing violations is to use static casting As an example, this change would the following for libnaio: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'long' in initializer list const struct timespec req = {0, ns}; ^~ Change-Id: I04ed1de4497dc19772194afef3ebf8fe0c8b82bc
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorPreviewController.cpp4
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditor3gpReader.cpp8
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditorAudioDecoder.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
index 149c4ea..c3cd3d0 100755
--- a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
+++ b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
@@ -1248,7 +1248,7 @@ void VideoEditorPreviewController::notify(
case MEDIA_SET_VIDEO_SIZE:
ALOGV("MEDIA_SET_VIDEO_SIZE; New video size %d x %d", ext1, ext2);
break;
- case 0xAAAAAAAA:
+ case static_cast<int>(0xAAAAAAAA):
ALOGV("VIDEO PLAYBACK ALMOST over, prepare next player");
// Select next player and prepare it
// If there is a clip after this one
@@ -1268,7 +1268,7 @@ void VideoEditorPreviewController::notify(
}
}
break;
- case 0xBBBBBBBB:
+ case static_cast<int>(0xBBBBBBBB):
{
ALOGV("VIDEO PLAYBACK, Update Overlay");
int overlayIndex = ext2;
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditor3gpReader.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditor3gpReader.cpp
index 3c8915a..99cf9ec 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditor3gpReader.cpp
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditor3gpReader.cpp
@@ -776,16 +776,16 @@ M4OSA_ERR VideoEditor3gpReader_setOption(M4OSA_Context context,
case M4READER_kOptionID_SetOsaFileReaderFctsPtr:
break;
- case M4READER_3GP_kOptionID_AudioOnly:
+ case static_cast<M4OSA_OptionID>(M4READER_3GP_kOptionID_AudioOnly):
break;
- case M4READER_3GP_kOptionID_VideoOnly:
+ case static_cast<M4OSA_OptionID>(M4READER_3GP_kOptionID_VideoOnly):
break;
- case M4READER_3GP_kOptionID_FastOpenMode:
+ case static_cast<M4OSA_OptionID>(M4READER_3GP_kOptionID_FastOpenMode):
break;
- case M4READER_kOptionID_MaxMetadataSize:
+ case static_cast<M4OSA_OptionID>(M4READER_kOptionID_MaxMetadataSize):
break;
default:
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorAudioDecoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorAudioDecoder.cpp
index 9b35d07..e4c7ea1 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorAudioDecoder.cpp
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorAudioDecoder.cpp
@@ -809,7 +809,7 @@ M4OSA_ERR VideoEditorAudioDecoder_setOption(M4AD_Context pContext,
pDecoderContext = (VideoEditorAudioDecoder_Context*)pContext;
switch( optionID ) {
- case M4AD_kOptionID_UserParam:
+ case static_cast<M4OSA_UInt32>(M4AD_kOptionID_UserParam):
ALOGV("VideoEditorAudioDecodersetOption UserParam is not supported");
err = M4ERR_NOT_IMPLEMENTED;
break;