/*
* FFmpeg main
* Copyright (c) 2000-2003 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* needed for usleep() */
#define _XOPEN_SOURCE 600
#define TAG "android_media_ffmpeg"
#include <android/log.h>
#include "jniUtils.h"
#include "methods.h"
#include "config.h"
#include <ctype.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <limits.h>
#include <unistd.h>
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libavcodec/opt.h"
#include "libavcodec/audioconvert.h"
#include "libavcodec/colorspace.h"
#include "libavutil/fifo.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"
#include "libavutil/libm.h"
#include "libavformat/os_support.h"
#if CONFIG_AVFILTER
# include "libavfilter/avfilter.h"
# include "libavfilter/avfiltergraph.h"
# include "libavfilter/graphparser.h"
# include "libavfilter/vsrc_buffer.h"
#endif
#if HAVE_SYS_RESOURCE_H
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#elif HAVE_GETPROCESSTIMES
#include <windows.h>
#endif
#if HAVE_GETPROCESSMEMORYINFO
#include <windows.h>
#include <psapi.h>
#endif
#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#if HAVE_TERMIOS_H
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <termios.h>
#elif HAVE_CONIO_H
#include <conio.h>
#endif
#include <time.h>
#include "cmdutils.h"
#undef NDEBUG
#include <assert.h>
const char program_name[] = "FFmpeg";
const int program_birth_year = 2000;
/* select an input stream for an output stream */
typedef struct AVStreamMap {
int file_index;
int stream_index;
int sync_file_index;
int sync_stream_index;
} AVStreamMap;
/** select an input file for an output file */
typedef struct AVMetaDataMap {
int out_file;
int in_file;
} AVMetaDataMap;
static const OptionDef options[];
#define MAX_FILES 100
static const char *last_asked_format = NULL;
static AVFormatContext *input_files[MAX_FILES];
static int64_t input_files_ts_offset[MAX_FILES];
static double input_files_ts_scale[MAX_FILES][MAX_STREAMS];
static AVCodec *input_codecs[MAX_FILES*MAX_STREAMS];
static int nb_input_files = 0;
static int nb_icodecs;
static AVFormatContext *output_files[MAX_FILES];
static AVCodec *output_codecs[MAX_FILES*MAX_STREAMS];
static int nb_output_files = 0;
static int nb_ocodecs;
static AVStreamMap stream_maps[MAX_FILES*MAX_STREAMS];
static int nb_stream_maps;
static AVMetaDataMap meta_data_maps[MAX_FILES];
static int nb_meta_data_maps;
static int frame_width = 0;
static int frame_height = 0;
static float frame_aspect_ratio = 0;
static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE;
static enum SampleFormat audio_sample_fmt = SAMPLE_FMT_NONE;
static int frame_topBand = 0;
static int frame_bottomBand = 0;
static int frame_leftBand = 0;
static int frame_rightBand = 0;
static int max_frames[4] = {INT_MAX, INT_MAX, INT_MAX, INT_MAX};
static AVRational frame_rate;
static float video_qscale = 0;
static uint16_t *intra_matrix = NULL;
static uint16_t *inter_matrix = NULL;
static const char *video_rc_override_string=NULL;
static int video_disable = 0;
static int video_discard = 0;
static char *video_codec_name = NULL;
static unsigned int video_codec_tag = 0;
static char *video_language = NULL;
static int same_quality = 0;
static int do_deinterlace = 0;
static int top_field_first = -1;
static int me_threshold = 0;
static int intra_dc_precision = 8;
static int loop_input = 0;
static int loop_output = AVFMT_NOOUTPUTLOOP;
static int qp_hist = 0;
#if CONFIG_AVFILTER
static char *vfilters = NULL;
AVFilterGraph *graph = NULL;
#endif
static int intra_only = 0;
static int audio_sample_rate = 44100;
static int64_t channel_layout = 0;
#define QSCALE_NONE -99999
static float audio_qscale = QSCALE_NONE;
static int audio_disable = 0;
static int audio_channels = 1;
static char *audio_codec_name = NULL;
static unsigned int audio_codec_tag = 0;
static char *audio_language = NULL;
static int subtitle_disable = 0;
static char *subtitle_codec_name = NULL;
static char *subtitle_language = NULL;
static unsigned int subtitle_codec_tag = 0;
static float mux_preload= 0.5;
static float mux_max_delay= 0.7;
static int64_t recording_time = INT64_MAX;
static int64_t start_time = 0;
static int64_t rec_timestamp = 0;
static int64_t input_ts_offset = 0;
static int file_overwrite = 0;
static int metadata_count;
static AVMetadataTag *metadata;
static int do_benchmark = 0;
static int do_hex_dump = 0;
static int do_pkt_dump = 0;
static int do_psnr = 0;
static int do_pass = 0;
static char *pass_logfilename_prefix = NULL;
static int audio_stream_copy = 0;
static int video_stream_copy = 0;
static int subtitle_stream_copy = 0;
static int video_sync_method= -1;
static int audio_sync_method= 0;
static float audio_drift_threshold= 0.1;
static int copy_ts= 0;
static int opt_shortest = 0;
static int video_global_header = 0;
static char *vstats_filename;
static FILE *vstats_file;
static int opt_programid = 0;
static int copy_initial_nonkeyframes = 0;
static int rate_emu = 0;
static int video_channel = 0;
static char *video_standard;
static int audio_volume = 256;
static int exit_on_error = 0;
static int using_stdin = 0;
static int verbose = 1;
static int thread_count= 1;
static int q_pressed = 0;
static int64_t video_size = 0;
static int64_t audio_size = 0;
static int64_t extra_size = 0;
static int nb_frames_dup = 0;
static int nb_frames_drop = 0;
static int input_sync;
static uint64_t limit_filesize = 0;
static int force_fps = 0;
static int pgmyuv_compatibility_hack=0;
static float dts_delta_threshold = 10;
static unsigned int sws_flags = SWS_BICUBIC;
static int64_t timer_start;
static uint8_t *audio_buf;
static uint8_t *audio_out;
unsigned int allocated_audio_out_size, allocated_audio_buf_size;
static short *samples;
static AVBitStreamFilterContext *video_bitstream_filters=NULL;
static AVBitStreamFilterContext *audio_bitstream_filters=NULL;
static AVBitStreamFilterContext *subtitle_bitstream_filters=NULL;
static AVBitStreamFilterContext *bitstream_filters[MAX_FILES][MAX_STREAMS];
#define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass"
struct AVInputStream;
typedef struct AVOutputStream {
int file_index; /* file index */
int index; /* stream index in the output file */
int source_index; /* AVInputStream index */
AVStream *st; /* stream in the output file */
int encoding_needed; /* true if encoding needed for this stream */
int frame_number;
/* input pts and corresponding output pts
for A/V sync */
//double sync_ipts; /* dts from the AVPacket of the demuxer in second units */
struct AVInputStream *sync_ist; /* input stream to sync against */
int64_t sync_opts; /* output frame counter, could be changed to some true timestamp */ //FIXME look at frame_number
/* video only */
int video_resample;
AVFrame pict_tmp; /* temporary image for resampling */
struct SwsContext *img_resample_ctx; /* for image resampling */
int resample_height;
int resample_width;
int resample_pix_fmt;
/* full frame size of first frame */
int original_height;
int original_width;
没有合适的资源?快使用搜索试试~ 我知道了~
基于havlenaptr ffmpeg 项目修改编译后的android工程文件源码
共4446个文件
svn-base:1777个
c:775个
d:570个
4星 · 超过85%的资源 需积分: 9 62 下载量 71 浏览量
2013-01-25
15:08:08
上传
评论 2
收藏 25.7MB 7Z 举报
温馨提示
基于havlenaptr ffmpeg 项目修改编译后的android工程文件源码,包括了编译后的libffmpeg_jni.so。已修改了原有代码中编译不过的错误,并且可以运行。(本机系统4.0.3,libjnivideo.so,libjniaudio.so应于你的系统保持一致,havlenaptr中自带的为2.2的)
资源推荐
资源详情
资源评论
收起资源包目录
基于havlenaptr ffmpeg 项目修改编译后的android工程文件源码 (4446个子文件)
libavcodec.a 22.46MB
libavformat.a 7.93MB
libswscale.a 551KB
libmediaplayer.a 478KB
libavutil.a 307KB
libpostproc.a 98KB
resources.ap_ 51KB
ffmpeg.apk 2.66MB
ffmpegDemo.apk 2.62MB
h264_deblock_sse2.asm 19KB
x86inc.asm 15KB
x86util.asm 12KB
fft_mmx.asm 11KB
dsputil_yasm.asm 10KB
h264_idct_sse2.asm 2KB
com_media_ffmpeg_FFMpeg.c 165KB
dsputil.c 161KB
snow.c 159KB
postprocess_template.c 157KB
ffserver.c 156KB
ffmpeg.c 155KB
mpegvideo_enc.c 139KB
swscale_template.c 138KB
vorbis_data.c 134KB
h264.c 126KB
dsputil_mmx.c 123KB
vc1dec.c 122KB
dsputil_vis.c 118KB
utils.c 115KB
rgb2rgb_template.c 112KB
ffplay.c 99KB
h264dsp_mmx.c 93KB
mpegvideo.c 91KB
mpeg12.c 89KB
mov.c 87KB
mpeg4videodec.c 85KB
msmpeg4data.c 83KB
wmavoice.c 80KB
mpegaudiodec.c 79KB
motion_est.c 78KB
vp3.c 77KB
aacdec.c 75KB
movenc.c 74KB
ra144.c 73KB
rtsp.c 72KB
mxfenc.c 72KB
simple_idct_mmx.c 71KB
h264_cabac.c 70KB
swscale.c 70KB
matroskadec.c 68KB
qdm2.c 67KB
aacsbr.c 66KB
adpcm.c 62KB
aactab.c 62KB
msmpeg4.c 61KB
qpel.c 61KB
wmaprodec.c 60KB
vorbis_dec.c 60KB
eac3dec_data.c 60KB
dsputil_altivec.c 57KB
alsdec.c 56KB
utils.c 55KB
rv34.c 54KB
mpegts.c 54KB
postprocess_altivec_template.c 54KB
ac3dec.c 52KB
mjpegdec.c 52KB
dca.c 48KB
huffyuv.c 48KB
indeo3.c 47KB
h264_altivec.c 47KB
dsputil_iwmmxt_rnd_template.c 47KB
dv.c 46KB
mpeg4videoenc.c 46KB
ivi_common.c 46KB
options.c 45KB
motion_est_template.c 44KB
asfdec.c 44KB
cook.c 43KB
dsputilenc_mmx.c 43KB
jrevdct.c 43KB
error_resilience.c 43KB
imgconvert.c 42KB
mpegenc.c 42KB
ac3enc.c 41KB
dsputil_mmx_avg_template.c 41KB
dnxhddata.c 40KB
dvbsubdec.c 40KB
aaccoder.c 40KB
avidec.c 40KB
amrnbdec.c 39KB
snowdsp_mmx.c 39KB
h264pred.c 39KB
svq3.c 39KB
mlpdec.c 38KB
ps.c 38KB
flacenc.c 38KB
mxfdec.c 38KB
yuv2rgb_altivec.c 38KB
utils.c 37KB
共 4446 条
- 1
- 2
- 3
- 4
- 5
- 6
- 45
lzk0100552
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- ZEND解密dezender12
- sony 索尼IMX334摄像头模组电路板AD版硬件PCB图(6层板).zip
- 基于flask和echarts融合交易策略的bitfinex可视化微服务.zip
- 包含了wvp-assist.tar wvp-talk.tar zlmediakit.tar .
- 3r4efgh53wgrf43tw
- 2024新版Java基础从入门到精通全套视频+资料下载
- Spring AI大模型视频教程+ChatGPT视频教程+OpenAI大模型视频教程(资料+视频教程)
- ABB工业机器人教程PDF版本
- 123321123323211
- 三相桥式全桥整流电路MATALB Simulink仿真文件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页