Skip to content

Commit

Permalink
mjpeg直播用fps,云存用pts
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed Oct 15, 2024
1 parent 9fdb6c3 commit 8d57675
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
20 changes: 3 additions & 17 deletions ijkmedia/ijkplayer/ff_ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1290,22 +1290,6 @@ static void check_external_clock_speed(VideoState *is, FFPlayer *ffp) {
set_clock_speed(&is->extclk, 1);
}
}
}else{


if (is->videoq.nb_packets > EXTERNAL_CLOCK_MAX_FRAMES) {
double speed = is->extclk.speed;
if (speed == 1.0) {
set_clock_speed(&is->extclk, ffp->audio_speed);
}
// printf("speeddddddd===5mjpeg===packets===>%d==>%f===>%f\n",is->videoq.nb_packets,speed, ffp->audio_speed);
}else if (is->videoq.nb_packets < EXTERNAL_CLOCK_MIN_FRAMES){
double speed = is->extclk.speed;
if (speed != 1.0) {
set_clock_speed(&is->extclk, 1);
}
// printf("speeddddddd===6mjpeg===packets===>%d==>%f\n",is->videoq.nb_packets,speed);
}
}
}
}
Expand Down Expand Up @@ -3379,7 +3363,9 @@ static int read_thread(void *arg)
}

is->realtime = is_realtime(ic, ffp->packet_buffering);

av_dict_set_int(&ic->metadata, "packet-buffering", ffp->packet_buffering, 0);
// printf("av_dict_set_int_packet-buffering111===>%d",ffp->packet_buffering);

av_dump_format(ic, 0, is->filename, 0);

int video_stream_count = 0;
Expand Down
2 changes: 1 addition & 1 deletion init-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# IJK_FFMPEG_UPSTREAM=git://git.videolan.org/ffmpeg.git
IJK_FFMPEG_UPSTREAM=https://github.com/tonychanchen/FFmpeg.git
IJK_FFMPEG_FORK=https://github.com/tonychanchen/FFmpeg.git
IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.8--20210205--002
IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.8--20210205--003
IJK_FFMPEG_LOCAL_REPO=extra/ffmpeg

set -e
Expand Down
2 changes: 1 addition & 1 deletion init-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# IJK_FFMPEG_UPSTREAM=git://git.videolan.org/ffmpeg.git
IJK_FFMPEG_UPSTREAM=https://github.com/tonychanchen/FFmpeg.git
IJK_FFMPEG_FORK=https://github.com/tonychanchen/FFmpeg.git
IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.8--20210205--002
IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.8--20210205--003
IJK_FFMPEG_LOCAL_REPO=extra/ffmpeg

IJK_GASP_UPSTREAM=https://github.com/Bilibili/gas-preprocessor.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#import "ijkioapplication.h"
#include "string.h"

static const char *kIJKFFRequiredFFmpegVersion = "ff4.0--ijk0.8.8--20210205--002";
static const char *kIJKFFRequiredFFmpegVersion = "ff4.0--ijk0.8.8--20210205--003";

// It means you didn't call shutdown if you found this object leaked.
@interface IJKWeakHolder : NSObject
Expand Down

0 comments on commit 8d57675

Please sign in to comment.