以上就是本篇文章【FFmpeg Android armeabi-v7a arm64-v8a 动态链接库.so文件】的全部内容了,欢迎阅览 ! 文章地址:https://sicmodule.kub2b.com/news/14085.html
栏目首页
相关文章
动态
同类文章
热门文章
网站地图
返回首页 企库往资讯移动站 https://sicmodule.kub2b.com/mobile/ , 查看更多
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
盘点2024西安荣耀时刻!“西”引力爆表!
从传统文化的深厚积淀到旅游行业的蓬勃发展从非遗艺术的薪火相传到现代潮流的创新融合……今天,和文旅君一起回顾2024年古都西安
惠山街道2024年工作总结和2025年工作思路
2024年工作回顾2024年惠山街道始终坚持以习近平新时代中国特色社会主义思想为指导,认真落实区委、区政府决策部署,坚持稳中求进
天气|明日“小寒”!最冷“三九”就要来!
今日天气实况今日迎来2025年的首个双休日天气状况还不错天空晴朗,阳光温暖,风力微弱15时全市各区气温在7℃左右明天迎来小寒节
枝江市2025年“十大民生项目”公布!
枝江市第七届人民代表大会第五次会议于2025年1月10日票决产生了枝江市2025年度重大民生实事项目一起来看看↓↓↓一、枝江市枫杨
原来是这样 | 又上热搜!最近很火的“煮苹果水”,到底怎么喝更有用?
鄠邑区是中国科协命名的“全国科普示范区”,为进一步弘扬科学精神、普及科学知识、传播科学思想,鄠邑区科学技术协会联合鄠邑区
惊掉下巴!他俩在一起了???
新发色迎新年 2025鸿运当头拉满仪式感从头开始换个气场NOUGAT ,欧美名媛凯特王妃最爱的纯有机老牌洗护自然原生植萃护不伤头皮、
第一批鸡娃英语的妈妈,都后悔了……
虽然科大大同事们都说不卷,但又悄咪咪卷(啪啪打脸中…)的家长,2年级用上倾听者不算晚!说真的,有了它,吼孩子都少了!产品
发改委:推进户用光伏发展,助力农民拓宽增收新路径
中国产品流通经纪人协会供销合作行业标准《农产品食品供应商信用评价规范》参编单位征集函中国农产品流通经纪人协会供销合作行业
泉州百度爱采购运营介绍
百度爱采购入驻条件有哪些:商家需持有工商行政管理局颁发的营业执照,并且执照在6个月有效期内;厂家商品真实在营且符合国家相
抖音feed是什么 feed广告投放流程
feed是什么?feed流(又称信息流)它是穿插在App内容中的广告,具有原生沉浸式体验,支持多种展现形式。feed可以进行线索收集,