Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongyafeiying committed May 3, 2013
1 parent ac21cd5 commit 9080347
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion TestPlayWithFFMPEGAndSDL/FSFFPLAYViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
/* no AV sync correction is done if below the AV sync threshold */
#define AV_SYNC_THRESHOLD 0.01
/* no AV correction is done if too big error */
#define AV_NOSYNC_THRESHOLD 1.0
#define AV_NOSYNC_THRESHOLD 10.0

/* maximum audio speed change to get correct sync */
#define SAMPLE_CORRECTION_PERCENT_MAX 10
Expand Down
18 changes: 9 additions & 9 deletions TestPlayWithFFMPEGAndSDL/FSFFPLAYViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ - (void)startPlayWithURLString:(NSString *)playURLString {

int flags;
VideoState *is;
// char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy";
char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy";

input_filename = [playURLString UTF8String];

Expand Down Expand Up @@ -1979,13 +1979,13 @@ - (void)startPlayWithURLString:(NSString *)playURLString {
video_disable = 0;
}
flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
// if (audio_disable)
// flags &= ~SDL_INIT_AUDIO;
// if (display_disable)
// SDL_putenv(dummy_videodriver); /* For the event queue, we always need a video driver. */
//#if !defined(__MINGW32__) && !defined(__APPLE__)
// flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */
//#endif
if (audio_disable)
flags &= ~SDL_INIT_AUDIO;
if (display_disable)
SDL_putenv(dummy_videodriver); /* For the event queue, we always need a video driver. */
#if !defined(__MINGW32__) && !defined(__APPLE__)
flags |= SDL_INIT_EVENTTHREAD; /* Not supported on Windows or Mac OS X */
#endif

if (SDL_Init (flags)) {
// fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
Expand Down Expand Up @@ -2112,7 +2112,7 @@ - (void)seekWithTime:(int)time {
#pragma mark ibaction methods
- (IBAction)playAction:(id)sender {
// [self startPlayWithURLString:[[NSBundle mainBundle] pathForResource:@"1" ofType:@"mp4"]];
[self startPlayWithURLString:@"udp://@192.168.1.100:8905?fifo_size=1000000&overrun_nonfatal=1&buffer_size=65535&pkt_size=65535&reuse=1"];
[self startPlayWithURLString:@"udp://@192.168.1.100:8905?fifo_size=1000000&overrun_nonfatal=1&buffer_size=102400&pkt_size=102400"];
}

- (IBAction)pausePlayAction:(id)sender {
Expand Down

0 comments on commit 9080347

Please sign in to comment.