资源简介
avilib库是对avi文件处理的工具。他是一个使用c语言编写的库,可以很方便的对avi文件提取帧和生成avi视频文件
代码片段和文件信息
/*
* avilib.c
*
* Copyright (C) Thomas streich - June 2001
* multiple audio track support Copyright (C) 2002 Thomas streich
*
* Original code:
* Copyright (C) 1999 Rainer Johanni
*
* This file is part of transcode a linux video stream processing tool
*
* transcode is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 or (at your option)
* any later version.
*
* transcode 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Make; see the file COPYING. If not write to
* the Free Software Foundation 675 Mass Ave Cambridge MA 02139 USA.
*
*/
//SLM
#ifdef WIN32
#include
#define ftruncate _chsize
#define strncasecmp _strnicmp
typedef int ssize_t;
#endif
#ifdef __CYGWIN__
#include
#endif
#include “avilib.h“
//#include
#define INFO_LIST
/* The following variable indicates the kind of error */
long AVI_errno = 0;
#define MAX_INFO_STRLEN 64
static char id_str[MAX_INFO_STRLEN];
#define frame_RATE_SCALE 1000000
#define TAG “57“
#include
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUGTAG __VA_ARGS__) // 定义LOGD类型
#define LOGI(...) __android_log_print(ANDROID_LOG_INFOTAG __VA_ARGS__) // 定义LOGI类型
#define LOGW(...) __android_log_print(ANDROID_LOG_WARNTAG __VA_ARGS__) // 定义LOGW类型
#define LOGE(...) __android_log_print(ANDROID_LOG_ERRORTAG __VA_ARGS__) // 定义LOGE类型
#define LOGF(...) __android_log_print(ANDROID_LOG_FATALTAG __VA_ARGS__) // 定义LOGF类型
/*******************************************************************
* *
* Utilities for writing an AVI File *
* *
*******************************************************************/
static size_t avi_read(int fd char *buf size_t len)
{
size_t n = 0;
size_t r = 0;
while (r < len) {
n = read (fd buf + r len - r);
if ((ssize_t)n <= 0)
return r;
r += n;
}
return r;
}
static size_t avi_write (int fd char *buf size_t len)
{
size_t n = 0;
size_t r = 0;
while (r < len) {
n = write (fd buf + r len - r);
if ((ssize_t)n < 0)
return n;
r += n;
}
return r;
}
/* HEADERBYTES: The number of bytes to reserve for the header */
#define HEADERBYTES 2048
/* AVI_MAX_LEN: The maximum length of an AVI file we stay a bit below
the 2GB limit (Remem
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 55511 2016-08-09 11:01 avi\avilib.c
文件 12027 2008-12-24 10:05 avi\avilib.h
文件 2191 2016-08-31 09:40 avi\jni.txt
目录 0 2016-08-31 09:40 avi
----------- --------- ---------- ----- ----
69729 4
- 上一篇:基于单片机DHT11初始化c语言
- 下一篇:crytoapi加解密代码
评论
共有 条评论