资源简介
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_
相关资源
- zlib 最新 1.2.8 win32 win64 编译好的dll
- Win32 API大全.chm
- eetop.cn_eetop.cn_hfss15_win32crack
- nginx-rtmp-win32-master.rar
- FFMEPG实现h264解码
- ffmpegh265rtmp.zip
- sunxi-tools-win32-support_f1c100s_32M(32M fl
- ffserver(windows下编译32位)
- qt_ffmpeg_mp4_export_and_import.zip
- 最简单的基于FFmpeg的推流器 1.2
- 简单的ffmpeg推流demo
- FFmpeg和SDL,读内存中的视频流,进行
- ffmpeg之pcm转AAC
- ffmpeg-2.8.14.tar.gz
- 利用ffmpeg的filter混音
- vs2010 ffmpeg实时解码h264码流
- ffmpeg 音视频转码代码
- windows上自己编译的最新的ffmpeg库
- Qt基于FFmpeg播放本地 H.264H264文件
- 从ffmpeg中抽取的h264解码器,可用于
- ffplay源代码
- 最简单的基于FFmpeg的推流器以推送R
- DVD文件VOB的生成代码
- ipscan-win32
- FFmpeg 采集摄像头输出rtmp直播流媒体,
- 基于ffmpeg将avi视频转换为mp4视频
- (补充)修改output-example,将H.264AAC帧
- ffmpeg-win64位库
- X264实时编码,FFmpeg实时解码
- FFmpeg API读取视音频文件信息的一个工
评论
共有 条评论