资源简介
ffmpeg 2.5.2 win32 shared源码,有时网站不能下载,备份
代码片段和文件信息
/*
* Copyright (c) 2014 Stefano Sabatini
*
* Permission is hereby granted free of charge to any person obtaining a copy
* of this software and associated documentation files (the “Software“) to deal
* in the Software without restriction including without limitation the rights
* to use copy modify merge publish distribute sublicense and/or sell
* copies of the Software and to permit persons to whom the Software is
* furnished to do so subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
* IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
* LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/**
* @file
* libavformat AVIOContext API example.
*
* Make libavformat demuxer access media content through a custom
* AVIOContext read callback.
* @example avio_reading.c
*/
#include
#include
#include
#include
struct buffer_data {
uint8_t *ptr;
size_t size; ///< size left in the buffer
};
static int read_packet(void *opaque uint8_t *buf int buf_size)
{
struct buffer_data *bd = (struct buffer_data *)opaque;
buf_size = FFMIN(buf_size bd->size);
printf(“ptr:%p size:%zu\n“ bd->ptr bd->size);
/* copy internal buffer data to buf */
memcpy(buf bd->ptr buf_size);
bd->ptr += buf_size;
bd->size -= buf_size;
return buf_size;
}
int main(int argc char *argv[])
{
AVFormatContext *fmt_ctx = NULL;
AVIOContext *avio_ctx = NULL;
uint8_t *buffer = NULL *avio_ctx_buffer = NULL;
size_t buffer_size avio_ctx_buffer_size = 4096;
char *input_filename = NULL;
int ret = 0;
struct buffer_data bd = { 0 };
if (argc != 2) {
fprintf(stderr “usage: %s input_file\n“
“API example program to show how to read from a custom buffer “
“accessed through AVIOContext.\n“ argv[0]);
return 1;
}
input_filename = argv[1];
/* register codecs and formats and other lavf/lavc components*/
av_register_all();
/* slurp file content into buffer */
ret = av_file_map(input_filename &buffer &buffer_size 0 NULL);
if (ret < 0)
goto end;
/* fill opaque structure used by the AVIOContext read callback */
bd.ptr = buffer;
bd.size = buffer_size;
if (!(fmt_ctx = avformat_alloc_context())) {
ret = AVERROR(ENOMEM);
goto end;
}
avio_ctx_buffer = av_malloc(avio_ctx_buffer_size);
if (!avio_ctx_
相关资源
- 利用FFmpeg将mkv视频转换为H.264
- OpenCC-1.0.5-Win32
- 安卓交叉编译ffmepgx86_64版本
- ffmepg的安卓arm(armeabi-v7a)版本
- 基于ARM9的远程视频监控系统
- 最简单的基于FFmpeg的封装格式转换器
- SDK播放器加速.zip
- 基于ffmpeg的经典版 ffplay 音视频播放
- ffmpeg api实现视频转码音视频
- Notepad++的Json格式化插件win32和x64两版
- FFMPEG入门基础资料pdf
- Eclipse64位4.3开普勒版eclipse-standard-ke
- ffmpeg ffdoc (FFMPEG的最完整教程)
- award_bios_editor1.2_win32.zip
- Eclipse64位4.3.2开普勒版eclipse-jee-keple
- ninja(windows 32/64位)
- ffmpeg转码为hls代码
- ffmpeg-4.0.2最新版 windows vs2013编译动态
- ffmpeg实现直播功能
- linuxubuntu下ffmpeg + alsa 的音频播放器
- 内存H264+PCM发布rtmp.rar
- ffmpeg-4.2.1-win32-dev.zip
- M3U8视频PC机64位辅助工具2.0 —&md
- ffmpeg-3.2.tar.bz2
- Eclipse64位4.3开普勒版eclipse-jee-kepler-
- Eclipse32位4.3开普勒版eclipse-standard-ke
- pywin32-225-cp38-cp38-win_amd64.whl
- openssl-0.9.8k_WIN32.rar
- chromedriver_win32适用于 72.0.3626.119正式版
- 操作系统程序 WIN32API 进程的控制通信
评论
共有 条评论