提交 a8740af5 编写于 作者: Y Yrom Wang

Merge pull request #2 from bbcallen/master

update
......@@ -1486,7 +1486,7 @@ static int audio_decode_frame(FFPlayer *ffp)
if (is->swr_ctx) {
const uint8_t **in = (const uint8_t **)is->frame->extended_data;
uint8_t **out = &is->audio_buf1;
int out_count = (int64_t)wanted_nb_samples * is->audio_tgt.freq / is->frame->sample_rate + 256;
int out_count = (int)((int64_t)wanted_nb_samples * is->audio_tgt.freq / is->frame->sample_rate + 256);
int out_size = av_samples_get_buffer_size(NULL, is->audio_tgt.channels, out_count, is->audio_tgt.fmt, 0);
int len2;
if (out_size < 0) {
......@@ -2270,15 +2270,15 @@ static int read_thread(void *arg)
video_cached_duration = is->videoq.duration * av_q2d(is->video_st->time_base) * 1000;
if (video_cached_duration >= 0 && audio_cached_duration >= 0) {
cached_duration_in_ms = IJKMAX(video_cached_duration, audio_cached_duration);
cached_duration_in_ms = (int)IJKMAX(video_cached_duration, audio_cached_duration);
} else if (video_cached_duration >= 0) {
cached_duration_in_ms = video_cached_duration;
cached_duration_in_ms = (int)video_cached_duration;
} else if (audio_cached_duration >= 0) {
cached_duration_in_ms = audio_cached_duration;
cached_duration_in_ms = (int)audio_cached_duration;
}
if (cached_duration_in_ms >= 0) {
buf_time_percent = av_rescale(cached_duration_in_ms, 1005, hwm_in_ms * 10);
buf_time_percent = (int)av_rescale(cached_duration_in_ms, 1005, hwm_in_ms * 10);
if (last_buffered_time_percentage != buf_time_percent) {
#ifdef FFP_SHOW_DEMUX_CACHE
ALOGE("time cache=%%%d (%d/%d)\n", buf_time_percent, cached_duration_in_ms, hwm_in_ms);
......@@ -2291,7 +2291,7 @@ static int read_thread(void *arg)
int cached_size = is->audioq.size + is->videoq.size;
if (hwm_in_bytes > 0) {
buf_size_percent = av_rescale(cached_size, 1005, hwm_in_bytes * 10);
buf_size_percent = (int)av_rescale(cached_size, 1005, hwm_in_bytes * 10);
if (last_buffered_size_percentage != buf_size_percent) {
#ifdef FFP_SHOW_DEMUX_CACHE
ALOGE("size cache=%%%d (%d/%d)\n", buf_size_percent, cached_size, hwm_in_bytes);
......@@ -2424,7 +2424,7 @@ static int video_refresh_thread(void *arg)
double remaining_time = 0.0;
while (!is->abort_request) {
if (remaining_time > 0.0)
av_usleep((int64_t)(remaining_time * 1000000.0));
av_usleep((int)(int64_t)(remaining_time * 1000000.0));
remaining_time = REFRESH_RATE;
if (is->show_mode != SHOW_MODE_NONE && (!is->paused || is->force_refresh))
video_refresh(ffp, &remaining_time);
......
......@@ -405,7 +405,7 @@ typedef struct FFPlayer {
char *afilters;
#endif
int64_t sws_flags;
int sws_flags;
/* current context */
#ifdef FFP_MERGE
......
......@@ -445,7 +445,7 @@ int ijkmp_seek_to_l(IjkMediaPlayer *mp, long msec)
mp->seek_req = 1;
mp->seek_msec = msec;
ffp_remove_msg(mp->ffplayer, FFP_REQ_SEEK);
ffp_notify_msg2(mp->ffplayer, FFP_REQ_SEEK, msec);
ffp_notify_msg2(mp->ffplayer, FFP_REQ_SEEK, (int)msec);
// TODO: 9 64-bit long?
return 0;
......@@ -495,7 +495,7 @@ long ijkmp_get_duration(IjkMediaPlayer *mp)
{
assert(mp);
pthread_mutex_lock(&mp->mutex);
int retval = ijkmp_get_duration_l(mp);
long retval = ijkmp_get_duration_l(mp);
pthread_mutex_unlock(&mp->mutex);
return retval;
}
......@@ -583,8 +583,8 @@ int ijkmp_get_msg(IjkMediaPlayer *mp, AVMessage *msg, int block)
continue_wait_next_msg = 1;
pthread_mutex_lock(&mp->mutex);
if (0 == ikjmp_chkst_pause_l(mp->mp_state)) {
int retval = ffp_pause_l(mp->ffplayer);
if (retval == 0)
int pause_ret = ffp_pause_l(mp->ffplayer);
if (pause_ret == 0)
ijkmp_change_state_l(mp, MP_STATE_PAUSED);
}
pthread_mutex_unlock(&mp->mutex);
......
......@@ -177,10 +177,6 @@ SDL_VoutOverlay *SDL_VoutFFmpeg_CreateOverlay(int width, int height, Uint32 form
// 16 bytes align pitch for arm-neon image-convert
buf_width = IJKALIGN(width, 16); // 1 bytes per pixel for Y-plane
#elif defined(__APPLE__)
// 2^n align for width
buf_width = width;
if (width > 0)
buf_width = 1 << (sizeof(int) * 8 - __builtin_clz(width));
buf_width = width;
#else
buf_width = IJKALIGN(width, 16); // unknown platform
......
......@@ -711,13 +711,18 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
......@@ -728,10 +733,13 @@
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
......@@ -741,20 +749,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
......
......@@ -67,4 +67,4 @@
}
}
@end
\ No newline at end of file
@end
......@@ -79,7 +79,7 @@
if (out_size > INT_MAX || !(utf8Plain = av_mallocz(out_size)))
return NULL;
if ((ret = av_base64_decode(utf8Plain, utf8Cipher, out_size)) < 0) {
if ((ret = av_base64_decode(utf8Plain, utf8Cipher, (int)out_size)) < 0) {
av_free(utf8Plain);
NSLog(@"Invalid base64 in MRL\n");
return NULL;
......
......@@ -37,7 +37,7 @@
{
ijkmp_set_codec_option(mediaPlayer,
[optionName UTF8String],
[[NSString stringWithFormat:@"%d", value] UTF8String]);
[[NSString stringWithFormat:@"%d", (int)value] UTF8String]);
}
@end
......@@ -26,4 +26,4 @@ NSString *const IJKMediaPlaybackIsPreparedToPlayDidChangeNotification = @"IJKMed
NSString *const IJKMoviePlayerLoadStateDidChangeNotification = @"IJKMoviePlayerLoadStateDidChangeNotification";
NSString *const IJKMoviePlayerPlaybackDidFinishNotification = @"IJKMoviePlayerPlaybackDidFinishNotification";
NSString *const IJKMoviePlayerPlaybackStateDidChangeNotification = @"IJKMoviePlayerPlaybackStateDidChangeNotification";
\ No newline at end of file
NSString *const IJKMoviePlayerPlaybackStateDidChangeNotification = @"IJKMoviePlayerPlaybackStateDidChangeNotification";
......@@ -25,4 +25,4 @@
#import "IJKMPMoviePlayerController.h"
#import "IJKFFOptions.h"
#import "IJKFFMoviePlayerController.h"
\ No newline at end of file
#import "IJKFFMoviePlayerController.h"
......@@ -70,7 +70,7 @@
&flag,
sizeof(flag));
if (status != noErr) {
ALOGE("AudioUnit: failed to set IO mode (%li)", status);
ALOGE("AudioUnit: failed to set IO mode (%d)", (int)status);
}
/* Get the current format */
......@@ -102,7 +102,7 @@
&streamDescription,
i_param_size);
if (status != noErr) {
ALOGE("AudioUnit: failed to set stream format (%li)", status);
ALOGE("AudioUnit: failed to set stream format (%d)", (int)status);
self = nil;
return nil;
}
......@@ -115,7 +115,7 @@
&streamDescription,
&i_param_size);
if (status != noErr) {
ALOGE("AudioUnit: failed to verify stream format (%li)", status);
ALOGE("AudioUnit: failed to verify stream format (%d)", (int)status);
}
AURenderCallbackStruct callback;
......@@ -126,7 +126,7 @@
kAudioUnitScope_Input,
0, &callback, sizeof(callback));
if (status != noErr) {
ALOGE("AudioUnit: render callback setup failed (%li)", status);
ALOGE("AudioUnit: render callback setup failed (%d)", (int)status);
self = nil;
return nil;
}
......@@ -136,7 +136,7 @@
/* AU initiliaze */
status = AudioUnitInitialize(auUnit);
if (status != noErr) {
ALOGE("AudioUnit: AudioUnitInitialize failed (%li)", status);
ALOGE("AudioUnit: AudioUnitInitialize failed (%d)", (int)status);
self = nil;
return nil;
}
......@@ -204,7 +204,7 @@
OSStatus status = AudioOutputUnitStop(_auUnit);
if (status != noErr)
ALOGE("AudioUnit: failed to stop AudioUnit (%li)", status);
ALOGE("AudioUnit: failed to stop AudioUnit (%d)", (int)status);
}
- (void)close
......
......@@ -96,8 +96,8 @@ static NSString *const g_yuvFragmentShaderString = IJK_SHADER_STRING
glTexImage2D(GL_TEXTURE_2D,
0,
GL_LUMINANCE,
widths[i],
heights[i],
(int)widths[i],
(int)heights[i],
0,
GL_LUMINANCE,
GL_UNSIGNED_BYTE,
......
......@@ -79,8 +79,8 @@ static NSString *const g_rgbFragmentShaderString = IJK_SHADER_STRING
glTexImage2D(GL_TEXTURE_2D,
0,
GL_RGB,
widths[i],
heights[i],
(int)widths[i],
(int)heights[i],
0,
GL_RGB,
GL_UNSIGNED_BYTE,
......
......@@ -170,7 +170,7 @@ enum {
return [CAEAGLLayer class];
}
- (id) initWithFrame:(CGRect)frame withChroma:(NSInteger)chroma
- (id) initWithFrame:(CGRect)frame withChroma:(int)chroma
{
self = [super initWithFrame:frame];
if (self) {
......
......@@ -42,4 +42,4 @@ SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data
return NULL;
return thread;
}
\ No newline at end of file
}
......@@ -73,28 +73,31 @@ echo "===================="
FF_BUILD_NAME="unknown"
FF_XCRUN_PLATFORM="iPhoneOS"
FF_XCRUN_SIMULATOR=
FF_XCRUN_OSVERSION=
if [ "$FF_ARCH" == "i386" ]; then
FF_BUILD_NAME="ffmpeg-i386"
FF_XCRUN_PLATFORM="iPhoneSimulator"
FF_XCRUN_SIMULATOR="-mios-simulator-version-min=5.0"
FF_XCRUN_OSVERSION="-mios-simulator-version-min=5.1.1"
FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_SIMULATOR"
elif [ "$FF_ARCH" == "x86_64" ]; then
FF_BUILD_NAME="ffmpeg-x86_64"
FF_XCRUN_PLATFORM="iPhoneSimulator"
FF_XCRUN_SIMULATOR="-mios-simulator-version-min=7.0"
FF_XCRUN_OSVERSION="-mios-simulator-version-min=7.0"
FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_SIMULATOR"
elif [ "$FF_ARCH" == "armv7" ]; then
FF_BUILD_NAME="ffmpeg-armv7"
FF_XCRUN_OSVERSION="-miphoneos-version-min=5.1.1"
FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_ARM"
# FFMPEG_CFG_CPU="--cpu=cortex-a8"
elif [ "$FF_ARCH" == "armv7s" ]; then
FF_BUILD_NAME="ffmpeg-armv7s"
FFMPEG_CFG_CPU="--cpu=swift"
FF_XCRUN_OSVERSION="-miphoneos-version-min=5.1.1"
FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_ARM"
elif [ "$FF_ARCH" == "arm64" ]; then
FF_BUILD_NAME="ffmpeg-arm64"
FF_XCRUN_OSVERSION="-miphoneos-version-min=5.1.1"
FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_ARM"
else
echo "unknown architecture $FF_ARCH";
......@@ -103,7 +106,7 @@ fi
echo "build_name: $FF_BUILD_NAME"
echo "platform: $FF_XCRUN_PLATFORM"
echo "simulator: $FF_XCRUN_SIMULATOR"
echo "osversion: $FF_XCRUN_OSVERSION"
#--------------------
echo "===================="
......@@ -131,7 +134,7 @@ FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_CPU"
FFMPEG_CFLAGS=
FFMPEG_CFLAGS="$FFMPEG_CFLAGS -arch $FF_ARCH"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCRUN_SIMULATOR"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCRUN_OSVERSION"
FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FFMPEG_EXTRA_CFLAGS"
FFMPEG_CXXFLAGS="$FFMPEG_CFLAGS"
FFMPEG_LDFLAGS="$FFMPEG_CFLAGS"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册