业界动态
FFmpeg Android armeabi-v7a arm64-v8a 动态链接库.so文件
2025-01-01 02:32
#include "config.h" #include <ctype.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <errno.h> #include <limits.h> #include <stdatomic.h> #include <stdint.h> #if HAVE_IO_H #include <io.h> #endif #if HAVE_UNISTD_H #include <unistd.h> #endif #include "libavformat/avformat.h" #include "libavdevice/avdevice.h" #include "libswresample/swresample.h" #include "libavutil/opt.h" #include "libavutil/channel_layout.h" #include "libavutil/parseutils.h" #include "libavutil/samplefmt.h" #include "libavutil/fifo.h" #include "libavutil/hwcontext.h" #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" #include "libavutil/display.h" #include "libavutil/mathematics.h" #include "libavutil/pixdesc.h" #include "libavutil/avstring.h" #include "libavutil/libm.h" #include "libavutil/imgutils.h" #include "libavutil/timestamp.h" #include "libavutil/bprint.h" #include "libavutil/time.h" #include "libavutil/threadmessage.h" #include "libavcodec/mathops.h" #include "libavformat/os_support.h" # include "libavfilter/avfilter.h" # include "libavfilter/buffersrc.h" # include "libavfilter/buffersink.h" #if HAVE_SYS_RESOURCE_H #include <sys/time.h> #include <sys/types.h> #include <sys/resource.h> #elif HAVE_GETPROCESSTIMES #include <windows.h> #endif #if HAVE_GETPROCESSMEMORYINFO #include <windows.h> #include <psapi.h> #endif #if HAVE_SETConSOLECTRLHANDLER #include <windows.h> #endif #if HAVE_SYS_SELECt_H #include <sys/select.h> #endif #if HAVE_TERMIOS_H #include <fcntl.h> #include <sys/ioctl.h> #include <termios.h> #elif HAVE_KBHIT #include <conio.h> #endif #if HAVE_PTHREADS #include <pthread.h> #endif #include <time.h> #include <regex.h> #include "ffmpeg.h" #include "cmdutils.h" #include "libavutil/avassert.h" #include "android/log.h" #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG , "ffmpeg.c", __VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR , "ffmpeg.c", __VA_ARGS__) static int progress = 0; const char program_name[] = "ffmpeg"; const int program_birth_year = 2000; static FILE *vstats_file; const char *const forced_keyframes_const_names[] = { "n", "n_forced", "prev_forced_n", "prev_forced_t", "t", NULL }; static void do_video_stats(OutputStream *ost, int frame_size); static int64_t getutime(void); static int64_t getmaxrss(void); static int ifilter_has_all_input_formats(FilterGraph *fg); static int run_as_daemon = 0; static int nb_frames_dup = 0; static unsigned dup_warning = 1000; static int nb_frames_drop = 0; static int64_t decode_error_stat[2]; static int want_sdp = 1; static int current_time; AVIOContext *progress_avio = NULL; static uint8_t *subtitle_out; InputStream **input_streams = NULL; int nb_input_streams = 0; InputFile **input_files = NULL; int nb_input_files = 0; OutputStream **output_streams = NULL; int nb_output_streams = 0; OutputFile **output_files = NULL; int nb_output_files = 0; FilterGraph **filtergraphs; int nb_filtergraphs; #if HAVE_TERMIOS_H static struct termios oldtty; static int restore_tty; #endif #if HAVE_PTHREADS static void free_input_threads(void); #endif static int sub2video_get_blank_frame(InputStream *ist) { int ret; AVframe *frame = ist->sub2video.frame; av_frame_unref(frame); ist->sub2video.frame->width = ist->dec_ctx->width ? ist->dec_ctx->width : ist->sub2video.w; ist->sub2video.frame->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h; ist->sub2video.frame->format = AV_PIX_FMT_RGB32; if ((ret = av_frame_get_buffer(frame, 32)) < 0) return ret; memset(frame->data[0], 0, frame->height * frame->linesize[0]); return 0; } static void sub2video_copy_rect(uint8_t *dst, int dst_linesize, int w, int h, AVSubtitleRect *r) { uint32_t *pal, *dst2; uint8_t *src, *src2; int x, y; if (r->type != SUBTITLE_BITMAP) { av_log(NULL, AV_LOG_WARNING, "sub2video: non-bitmap subtitle "); return; } if (r->x < 0 || r->x + r->w > w || r->y < 0 || r->y + r->h > h) { av_log(NULL, AV_LOG_WARNING, "sub2video: rectangle (%d %d %d %d) overflowing %d %d ", r->x, r->y, r->w, r->h, w, h ); return; } dst += r->y * dst_linesize + r->x * 4; src = r->data[0]; pal = (uint32_t *)r->data[1]; for (y = 0; y < r->h; y++) { dst2 = (uint32_t *)dst; src2 = src; for (x = 0; x < r->w; x++) *(dst2++) = pal[*(src2++)]; dst += dst_linesize; src += r->linesize[0]; } } static void sub2video_push_ref(InputStream *ist, int64_t pts) { AVframe *frame = ist->sub2video.frame; int i; av_assert1(frame->data[0]); ist->sub2video.last_pts = frame->pts = pts; for (i = 0; i < ist->nb_filters; i++) av_buffersrc_add_frame_flags(ist->filters[i]->filter, frame, AV_BUFFERSRC_FLAG_KEEP_REF | AV_BUFFERSRC_FLAG_PUSH); } void sub2video_update(InputStream *ist, AVSubtitle *sub) { AVframe *frame = ist->sub2video.frame; int8_t *dst; int dst_linesize; int num_rects, i; int64_t pts, end_pts; if (!frame) return; if (sub) { pts = av_rescale_q(sub->pts + sub->start_display_time * 1000LL, AV_TIME_base_Q, ist->st->time_base); end_pts = av_rescale_q(sub->pts + sub->end_display_time * 1000LL, AV_TIME_base_Q, ist->st->time_base); num_rects = sub->num_rects; } else { pts = ist->sub2video.end_pts; end_pts = INT64_MAX; num_rects = 0; } if (sub2video_get_blank_frame(ist) < 0) { av_log(ist->dec_ctx, AV_LOG_ERROR, "Impossible to get a blank canvas. "); return; } dst = frame->data [0]; dst_linesize = frame->linesize[0]; for (i = 0; i < num_rects; i++) sub2video_copy_rect(dst, dst_linesize, frame->width, frame->height, sub->rects[i]); sub2video_push_ref(ist, pts); ist->sub2video.end_pts = end_pts; } static void sub2video_heartbeat(InputStream *ist, int64_t pts) { InputFile *infile = input_files[ist->file_index]; int i, j, nb_reqs; int64_t pts2; /* When a frame is read from a file, examine all sub2video streams in the same file and send the sub2video frame again. Otherwise, decoded
    以上就是本篇文章【FFmpeg Android armeabi-v7a arm64-v8a 动态链接库.so文件】的全部内容了,欢迎阅览 ! 文章地址:https://sicmodule.kub2b.com/news/14085.html
     栏目首页      相关文章      动态      同类文章      热门文章      网站地图      返回首页 企库往资讯移动站 https://sicmodule.kub2b.com/mobile/ , 查看更多   
最新文章
手机单扬声器和双扬声器有什么区别?原来差别这么大手机扬声器「手机单扬声器和双扬声器有什么区别?原来差别这么大」
随着手机的普及和发展,音频体验成为消费者选择手机的重要因素之一。而在手机音频方面,单扬声器和双扬声器是常见的设计方案。那
手机维修知识大全维修手机「手机维修知识大全」
修理手机维修知识大全手机是高科技精密电子产品。工作原理、制造工艺、软件和硬件、测试、技术标准在所有的电器设备中是最复杂的
2k分辨率手机有哪些(2k分辨率的手机哪款性价比最高)
  关于《2K分辨率手机有哪些》的文章  随着科技的不断发展,手机已经成为了我们日常生活中不可或缺的一部分。而在手机的各种
红手指云手机苹果版(红雀浏览器) v1.0.23 iPhone版红手指云手机「红手指云手机苹果版(红雀浏览器) v1.0.23 iPhone版」
红手指手游专用虚拟手机是一款非常实用的手机挂机软件,在这里玩家随时随地离线挂机、自动帮助你闯关升级,非常强大的游戏挂机神
1手机2(一加11手机)
  《手机2》:探索科技与生活的无限可能  在当今数字化时代,智能手机无疑是我们生活中不可或缺的一部分。随着科技的飞速发
手机NFC是什么?怎么使用?手机nfc「手机NFC是什么?怎么使用?」
但很多人不知道的是,除了这三种无线通信技术外,很多智能手机里还有一种无线通信技术,那就是NFC。2004年,飞利浦半导体,诺基
360手机 官网(360手机官网入口)
  探索《360手机官网》:一站式手机技术与服务的平台  在当今数字化时代,手机已经成为我们日常生活中不可或缺的一部分。而
关于手机电池的冷知识:机身温度过高,会永久降低手机电池容量手机电量「关于手机电池的冷知识:机身温度过高,会永久降低手机电池容量」
相信大家在日常使用手机时,最关注的就是我们手机的电量还剩多少,尤其是现在我们一般出门都不带现金,直接通过手机进行支付,所
260手机助手(360手机助手官方版下载)
  《260手机助手》:一站式手机管理和服务的新选择  随着智能手机的普及,我们的生活越来越离不开手机。为了更好地管理和优
小米发布迄今最强被动散热系统,两倍于VC散热,原神满帧运行手机散热「小米发布迄今最强被动散热系统,两倍于VC散热,原神满帧运行」
你的手机“烫”吗? 玩局游戏,瞬间化身暖手宝?拍拍视频就过热,需要“冷静”一下才能继续使用!充电是很快,温度升的也很快…