2001-07-22 14:18:56 +00:00
|
|
|
/*
|
|
|
|
* Image format
|
2002-05-25 22:34:32 +00:00
|
|
|
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard.
|
2001-07-22 14:18:56 +00:00
|
|
|
*
|
2006-10-07 15:30:46 +00:00
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2002-05-25 22:34:32 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2006-10-07 15:30:46 +00:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2001-07-22 14:18:56 +00:00
|
|
|
*
|
2006-10-07 15:30:46 +00:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2001-07-22 14:18:56 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2002-05-25 22:34:32 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2001-07-22 14:18:56 +00:00
|
|
|
*
|
2002-05-25 22:34:32 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2006-10-07 15:30:46 +00:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2006-01-12 22:43:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2001-07-22 14:18:56 +00:00
|
|
|
*/
|
|
|
|
#include "avformat.h"
|
2002-12-20 19:25:10 +00:00
|
|
|
|
2001-07-22 14:18:56 +00:00
|
|
|
typedef struct {
|
|
|
|
int width;
|
|
|
|
int height;
|
2003-08-24 21:20:44 +00:00
|
|
|
int img_first;
|
|
|
|
int img_last;
|
2001-07-22 14:18:56 +00:00
|
|
|
int img_number;
|
2003-08-24 21:20:44 +00:00
|
|
|
int img_count;
|
2001-07-22 14:18:56 +00:00
|
|
|
int img_size;
|
2003-01-11 05:02:14 +00:00
|
|
|
AVImageFormat *img_fmt;
|
|
|
|
int pix_fmt;
|
2001-07-22 14:18:56 +00:00
|
|
|
int is_pipe;
|
|
|
|
char path[1024];
|
2003-01-11 05:02:14 +00:00
|
|
|
/* temporary usage */
|
|
|
|
void *ptr;
|
2001-07-22 14:18:56 +00:00
|
|
|
} VideoData;
|
|
|
|
|
2003-08-08 17:53:30 +00:00
|
|
|
|
|
|
|
/* return -1 if no image found */
|
2005-12-17 18:14:38 +00:00
|
|
|
static int find_image_range(int *pfirst_index, int *plast_index,
|
2003-08-08 17:53:30 +00:00
|
|
|
const char *path)
|
|
|
|
{
|
|
|
|
char buf[1024];
|
|
|
|
int range, last_index, range1, first_index;
|
|
|
|
|
|
|
|
/* find the first image */
|
|
|
|
for(first_index = 0; first_index < 5; first_index++) {
|
2006-09-04 09:57:47 +00:00
|
|
|
if (av_get_frame_filename(buf, sizeof(buf), path, first_index) < 0)
|
2003-08-08 17:53:30 +00:00
|
|
|
goto fail;
|
|
|
|
if (url_exist(buf))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (first_index == 5)
|
|
|
|
goto fail;
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2003-08-08 17:53:30 +00:00
|
|
|
/* find the last image */
|
|
|
|
last_index = first_index;
|
|
|
|
for(;;) {
|
|
|
|
range = 0;
|
|
|
|
for(;;) {
|
|
|
|
if (!range)
|
|
|
|
range1 = 1;
|
|
|
|
else
|
|
|
|
range1 = 2 * range;
|
2006-09-04 09:57:47 +00:00
|
|
|
if (av_get_frame_filename(buf, sizeof(buf), path,
|
|
|
|
last_index + range1) < 0)
|
2003-08-08 17:53:30 +00:00
|
|
|
goto fail;
|
|
|
|
if (!url_exist(buf))
|
|
|
|
break;
|
|
|
|
range = range1;
|
|
|
|
/* just in case... */
|
|
|
|
if (range >= (1 << 30))
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
/* we are sure than image last_index + range exists */
|
|
|
|
if (!range)
|
|
|
|
break;
|
|
|
|
last_index += range;
|
|
|
|
}
|
|
|
|
*pfirst_index = first_index;
|
|
|
|
*plast_index = last_index;
|
|
|
|
return 0;
|
|
|
|
fail:
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
static int image_probe(AVProbeData *p)
|
2001-07-22 14:18:56 +00:00
|
|
|
{
|
2006-09-04 09:57:47 +00:00
|
|
|
if (av_filename_number_test(p->filename) && guess_image_format(p->filename))
|
2004-11-10 00:02:06 +00:00
|
|
|
return AVPROBE_SCORE_MAX-1;
|
2003-01-11 05:02:14 +00:00
|
|
|
else
|
2001-07-22 14:18:56 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
static int read_header_alloc_cb(void *opaque, AVImageInfo *info)
|
2001-07-22 14:18:56 +00:00
|
|
|
{
|
2003-01-11 05:02:14 +00:00
|
|
|
VideoData *s = opaque;
|
2001-07-22 14:18:56 +00:00
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
s->width = info->width;
|
|
|
|
s->height = info->height;
|
|
|
|
s->pix_fmt = info->pix_fmt;
|
|
|
|
/* stop image reading but no error */
|
|
|
|
return 1;
|
2001-07-22 14:18:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
|
|
|
{
|
2002-05-20 16:31:13 +00:00
|
|
|
VideoData *s = s1->priv_data;
|
2003-08-08 17:53:30 +00:00
|
|
|
int ret, first_index, last_index;
|
2001-07-22 14:18:56 +00:00
|
|
|
char buf[1024];
|
|
|
|
ByteIOContext pb1, *f = &pb1;
|
|
|
|
AVStream *st;
|
|
|
|
|
2002-05-20 16:31:13 +00:00
|
|
|
st = av_new_stream(s1, 0);
|
2001-07-22 14:18:56 +00:00
|
|
|
if (!st) {
|
|
|
|
return -ENOMEM;
|
|
|
|
}
|
2002-05-20 16:31:13 +00:00
|
|
|
|
2006-03-11 00:22:21 +00:00
|
|
|
if (ap->image_format)
|
2003-01-11 05:02:14 +00:00
|
|
|
s->img_fmt = ap->image_format;
|
|
|
|
|
2005-01-08 14:21:33 +00:00
|
|
|
pstrcpy(s->path, sizeof(s->path), s1->filename);
|
2001-07-22 14:18:56 +00:00
|
|
|
s->img_number = 0;
|
2003-08-24 21:20:44 +00:00
|
|
|
s->img_count = 0;
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2001-07-22 14:18:56 +00:00
|
|
|
/* find format */
|
2002-05-20 16:31:13 +00:00
|
|
|
if (s1->iformat->flags & AVFMT_NOFILE)
|
2001-07-22 14:18:56 +00:00
|
|
|
s->is_pipe = 0;
|
|
|
|
else
|
|
|
|
s->is_pipe = 1;
|
2005-04-30 21:43:59 +00:00
|
|
|
|
2006-03-11 00:22:21 +00:00
|
|
|
if (!ap->time_base.num) {
|
2005-07-17 22:24:36 +00:00
|
|
|
st->codec->time_base= (AVRational){1,25};
|
2003-08-08 17:53:30 +00:00
|
|
|
} else {
|
2005-07-17 22:24:36 +00:00
|
|
|
st->codec->time_base= ap->time_base;
|
2003-08-08 17:53:30 +00:00
|
|
|
}
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2001-07-22 14:18:56 +00:00
|
|
|
if (!s->is_pipe) {
|
2003-08-08 17:53:30 +00:00
|
|
|
if (find_image_range(&first_index, &last_index, s->path) < 0)
|
|
|
|
goto fail;
|
2003-08-24 21:20:44 +00:00
|
|
|
s->img_first = first_index;
|
|
|
|
s->img_last = last_index;
|
2003-08-08 17:53:30 +00:00
|
|
|
s->img_number = first_index;
|
|
|
|
/* compute duration */
|
|
|
|
st->start_time = 0;
|
2005-04-30 21:43:59 +00:00
|
|
|
st->duration = last_index - first_index + 1;
|
2006-09-04 09:57:47 +00:00
|
|
|
if (av_get_frame_filename(buf, sizeof(buf), s->path, s->img_number) < 0)
|
2003-08-08 17:53:30 +00:00
|
|
|
goto fail;
|
|
|
|
if (url_fopen(f, buf, URL_RDONLY) < 0)
|
2001-07-22 14:18:56 +00:00
|
|
|
goto fail;
|
|
|
|
} else {
|
|
|
|
f = &s1->pb;
|
|
|
|
}
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
ret = av_read_image(f, s1->filename, s->img_fmt, read_header_alloc_cb, s);
|
|
|
|
if (ret < 0)
|
|
|
|
goto fail1;
|
2001-07-22 14:18:56 +00:00
|
|
|
|
|
|
|
if (!s->is_pipe) {
|
|
|
|
url_fclose(f);
|
|
|
|
} else {
|
|
|
|
url_fseek(f, 0, SEEK_SET);
|
|
|
|
}
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2005-07-17 22:24:36 +00:00
|
|
|
st->codec->codec_type = CODEC_TYPE_VIDEO;
|
|
|
|
st->codec->codec_id = CODEC_ID_RAWVIDEO;
|
|
|
|
st->codec->width = s->width;
|
|
|
|
st->codec->height = s->height;
|
|
|
|
st->codec->pix_fmt = s->pix_fmt;
|
2004-05-13 14:54:57 +00:00
|
|
|
s->img_size = avpicture_get_size(s->pix_fmt, (s->width+15)&(~15), (s->height+15)&(~15));
|
2003-01-11 05:02:14 +00:00
|
|
|
|
2001-07-22 14:18:56 +00:00
|
|
|
return 0;
|
|
|
|
fail1:
|
|
|
|
if (!s->is_pipe)
|
|
|
|
url_fclose(f);
|
|
|
|
fail:
|
2004-06-19 03:59:34 +00:00
|
|
|
return AVERROR_IO;
|
2001-07-22 14:18:56 +00:00
|
|
|
}
|
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
static int read_packet_alloc_cb(void *opaque, AVImageInfo *info)
|
2001-07-22 14:18:56 +00:00
|
|
|
{
|
2003-01-11 05:02:14 +00:00
|
|
|
VideoData *s = opaque;
|
|
|
|
|
|
|
|
if (info->width != s->width ||
|
|
|
|
info->height != s->height)
|
|
|
|
return -1;
|
2004-05-13 14:54:57 +00:00
|
|
|
avpicture_fill(&info->pict, s->ptr, info->pix_fmt, (info->width+15)&(~15), (info->height+15)&(~15));
|
2001-07-22 14:18:56 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
|
2001-07-22 14:18:56 +00:00
|
|
|
{
|
2003-01-11 05:02:14 +00:00
|
|
|
VideoData *s = s1->priv_data;
|
|
|
|
char filename[1024];
|
|
|
|
int ret;
|
|
|
|
ByteIOContext f1, *f;
|
2001-07-22 14:18:56 +00:00
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
if (!s->is_pipe) {
|
2003-08-24 21:20:44 +00:00
|
|
|
/* loop over input */
|
2006-07-13 21:13:49 +00:00
|
|
|
if (s1->loop_input && s->img_number > s->img_last) {
|
2003-08-24 21:20:44 +00:00
|
|
|
s->img_number = s->img_first;
|
|
|
|
}
|
2006-09-04 09:57:47 +00:00
|
|
|
if (av_get_frame_filename(filename, sizeof(filename),
|
|
|
|
s->path, s->img_number) < 0)
|
2004-06-19 03:59:34 +00:00
|
|
|
return AVERROR_IO;
|
2003-01-11 05:02:14 +00:00
|
|
|
f = &f1;
|
|
|
|
if (url_fopen(f, filename, URL_RDONLY) < 0)
|
2004-06-19 03:59:34 +00:00
|
|
|
return AVERROR_IO;
|
2003-01-11 05:02:14 +00:00
|
|
|
} else {
|
|
|
|
f = &s1->pb;
|
|
|
|
if (url_feof(f))
|
2004-06-19 03:59:34 +00:00
|
|
|
return AVERROR_IO;
|
2003-01-11 05:02:14 +00:00
|
|
|
}
|
2001-08-11 18:59:34 +00:00
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
av_new_packet(pkt, s->img_size);
|
|
|
|
pkt->stream_index = 0;
|
|
|
|
|
|
|
|
s->ptr = pkt->data;
|
|
|
|
ret = av_read_image(f, filename, s->img_fmt, read_packet_alloc_cb, s);
|
|
|
|
if (!s->is_pipe) {
|
|
|
|
url_fclose(f);
|
2001-08-11 18:59:34 +00:00
|
|
|
}
|
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
if (ret < 0) {
|
|
|
|
av_free_packet(pkt);
|
2004-06-19 03:59:34 +00:00
|
|
|
return AVERROR_IO; /* signal EOF */
|
2003-01-11 05:02:14 +00:00
|
|
|
} else {
|
2003-08-24 21:20:44 +00:00
|
|
|
/* XXX: computing this pts is not necessary as it is done in
|
|
|
|
the generic code too */
|
2005-07-17 22:24:36 +00:00
|
|
|
pkt->pts = av_rescale((int64_t)s->img_count * s1->streams[0]->codec->time_base.num, s1->streams[0]->time_base.den, s1->streams[0]->codec->time_base.den) / s1->streams[0]->time_base.num;
|
2003-08-24 21:20:44 +00:00
|
|
|
s->img_count++;
|
2003-01-11 05:02:14 +00:00
|
|
|
s->img_number++;
|
|
|
|
return 0;
|
|
|
|
}
|
2001-08-11 18:59:34 +00:00
|
|
|
}
|
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
static int img_read_close(AVFormatContext *s1)
|
2001-07-22 14:18:56 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
/******************************************************/
|
|
|
|
/* image output */
|
|
|
|
|
|
|
|
static int img_set_parameters(AVFormatContext *s, AVFormatParameters *ap)
|
2002-09-06 13:01:19 +00:00
|
|
|
{
|
2003-01-11 05:02:14 +00:00
|
|
|
VideoData *img = s->priv_data;
|
|
|
|
AVStream *st;
|
|
|
|
AVImageFormat *img_fmt;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* find output image format */
|
2006-03-11 00:22:21 +00:00
|
|
|
if (ap->image_format) {
|
2003-01-11 05:02:14 +00:00
|
|
|
img_fmt = ap->image_format;
|
2002-09-06 13:01:19 +00:00
|
|
|
} else {
|
2003-01-11 05:02:14 +00:00
|
|
|
img_fmt = guess_image_format(s->filename);
|
2002-09-06 13:01:19 +00:00
|
|
|
}
|
2003-01-11 05:02:14 +00:00
|
|
|
if (!img_fmt)
|
|
|
|
return -1;
|
2002-09-06 13:01:19 +00:00
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
if (s->nb_streams != 1)
|
|
|
|
return -1;
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
st = s->streams[0];
|
|
|
|
/* we select the first matching format */
|
|
|
|
for(i=0;i<PIX_FMT_NB;i++) {
|
|
|
|
if (img_fmt->supported_pixel_formats & (1 << i))
|
|
|
|
break;
|
2002-09-06 13:01:19 +00:00
|
|
|
}
|
2003-01-11 05:02:14 +00:00
|
|
|
if (i >= PIX_FMT_NB)
|
|
|
|
return -1;
|
|
|
|
img->img_fmt = img_fmt;
|
|
|
|
img->pix_fmt = i;
|
2005-07-17 22:24:36 +00:00
|
|
|
st->codec->pix_fmt = img->pix_fmt;
|
2002-09-06 13:01:19 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-07-22 14:18:56 +00:00
|
|
|
static int img_write_header(AVFormatContext *s)
|
|
|
|
{
|
2002-05-20 16:31:13 +00:00
|
|
|
VideoData *img = s->priv_data;
|
2001-07-22 14:18:56 +00:00
|
|
|
|
|
|
|
img->img_number = 1;
|
2005-01-08 14:21:33 +00:00
|
|
|
pstrcpy(img->path, sizeof(img->path), s->filename);
|
2001-07-22 14:18:56 +00:00
|
|
|
|
|
|
|
/* find format */
|
2002-05-20 16:31:13 +00:00
|
|
|
if (s->oformat->flags & AVFMT_NOFILE)
|
2001-07-22 14:18:56 +00:00
|
|
|
img->is_pipe = 0;
|
|
|
|
else
|
|
|
|
img->is_pipe = 1;
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2001-07-22 14:18:56 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-05-29 02:06:32 +00:00
|
|
|
static int img_write_packet(AVFormatContext *s, AVPacket *pkt)
|
2001-07-22 14:18:56 +00:00
|
|
|
{
|
|
|
|
VideoData *img = s->priv_data;
|
2004-05-29 02:06:32 +00:00
|
|
|
AVStream *st = s->streams[pkt->stream_index];
|
2001-07-22 14:18:56 +00:00
|
|
|
ByteIOContext pb1, *pb;
|
2003-01-11 05:02:14 +00:00
|
|
|
AVPicture *picture;
|
|
|
|
int width, height, ret;
|
2001-07-22 14:18:56 +00:00
|
|
|
char filename[1024];
|
2003-01-11 05:02:14 +00:00
|
|
|
AVImageInfo info;
|
2001-07-22 14:18:56 +00:00
|
|
|
|
2005-07-17 22:24:36 +00:00
|
|
|
width = st->codec->width;
|
|
|
|
height = st->codec->height;
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2004-05-29 02:06:32 +00:00
|
|
|
picture = (AVPicture *)pkt->data;
|
2001-07-22 14:18:56 +00:00
|
|
|
|
|
|
|
if (!img->is_pipe) {
|
2006-09-04 09:57:47 +00:00
|
|
|
if (av_get_frame_filename(filename, sizeof(filename),
|
|
|
|
img->path, img->img_number) < 0)
|
2004-06-19 03:59:34 +00:00
|
|
|
return AVERROR_IO;
|
2001-07-22 14:18:56 +00:00
|
|
|
pb = &pb1;
|
|
|
|
if (url_fopen(pb, filename, URL_WRONLY) < 0)
|
2004-06-19 03:59:34 +00:00
|
|
|
return AVERROR_IO;
|
2001-07-22 14:18:56 +00:00
|
|
|
} else {
|
|
|
|
pb = &s->pb;
|
|
|
|
}
|
2003-01-11 05:02:14 +00:00
|
|
|
info.width = width;
|
|
|
|
info.height = height;
|
2005-07-17 22:24:36 +00:00
|
|
|
info.pix_fmt = st->codec->pix_fmt;
|
2003-10-14 14:40:36 +00:00
|
|
|
info.interleaved = 0; /* FIXME: there should be a way to set it right */
|
2003-01-11 05:02:14 +00:00
|
|
|
info.pict = *picture;
|
|
|
|
ret = av_write_image(pb, img->img_fmt, &info);
|
2001-07-22 14:18:56 +00:00
|
|
|
if (!img->is_pipe) {
|
|
|
|
url_fclose(pb);
|
|
|
|
}
|
|
|
|
|
|
|
|
img->img_number++;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int img_write_trailer(AVFormatContext *s)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
/* input */
|
2006-07-10 21:14:37 +00:00
|
|
|
#ifdef CONFIG_IMAGE_DEMUXER
|
|
|
|
AVInputFormat image_demuxer = {
|
2003-01-11 05:02:14 +00:00
|
|
|
"image",
|
|
|
|
"image sequence",
|
2002-05-20 16:31:13 +00:00
|
|
|
sizeof(VideoData),
|
2003-01-11 05:02:14 +00:00
|
|
|
image_probe,
|
2001-07-22 14:18:56 +00:00
|
|
|
img_read_header,
|
|
|
|
img_read_packet,
|
|
|
|
img_read_close,
|
|
|
|
NULL,
|
2004-04-12 18:32:36 +00:00
|
|
|
NULL,
|
2001-09-16 21:50:48 +00:00
|
|
|
AVFMT_NOFILE | AVFMT_NEEDNUMBER,
|
2001-07-22 14:18:56 +00:00
|
|
|
};
|
2006-07-10 21:14:37 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_IMAGEPIPE_DEMUXER
|
|
|
|
AVInputFormat imagepipe_demuxer = {
|
2003-01-11 05:02:14 +00:00
|
|
|
"imagepipe",
|
|
|
|
"piped image sequence",
|
2002-05-20 16:31:13 +00:00
|
|
|
sizeof(VideoData),
|
|
|
|
NULL, /* no probe */
|
2001-07-22 14:18:56 +00:00
|
|
|
img_read_header,
|
|
|
|
img_read_packet,
|
|
|
|
img_read_close,
|
|
|
|
NULL,
|
|
|
|
};
|
2006-07-10 21:14:37 +00:00
|
|
|
#endif
|
2001-07-22 14:18:56 +00:00
|
|
|
|
2003-01-11 05:02:14 +00:00
|
|
|
/* output */
|
2006-07-10 21:14:37 +00:00
|
|
|
#ifdef CONFIG_IMAGE_MUXER
|
|
|
|
AVOutputFormat image_muxer = {
|
2003-01-11 05:02:14 +00:00
|
|
|
"image",
|
|
|
|
"image sequence",
|
2001-08-11 18:59:34 +00:00
|
|
|
"",
|
|
|
|
"",
|
2002-05-20 16:31:13 +00:00
|
|
|
sizeof(VideoData),
|
2001-08-11 18:59:34 +00:00
|
|
|
CODEC_ID_NONE,
|
|
|
|
CODEC_ID_RAWVIDEO,
|
|
|
|
img_write_header,
|
|
|
|
img_write_packet,
|
|
|
|
img_write_trailer,
|
2003-01-11 05:02:14 +00:00
|
|
|
AVFMT_NOFILE | AVFMT_NEEDNUMBER | AVFMT_RAWPICTURE,
|
|
|
|
img_set_parameters,
|
2001-08-11 18:59:34 +00:00
|
|
|
};
|
2006-07-10 21:14:37 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_IMAGEPIPE_MUXER
|
|
|
|
AVOutputFormat imagepipe_muxer = {
|
2003-01-11 05:02:14 +00:00
|
|
|
"imagepipe",
|
|
|
|
"piped image sequence",
|
|
|
|
"",
|
2002-09-06 13:01:19 +00:00
|
|
|
"",
|
|
|
|
sizeof(VideoData),
|
|
|
|
CODEC_ID_NONE,
|
|
|
|
CODEC_ID_RAWVIDEO,
|
|
|
|
img_write_header,
|
|
|
|
img_write_packet,
|
|
|
|
img_write_trailer,
|
2003-01-11 05:33:35 +00:00
|
|
|
AVFMT_RAWPICTURE,
|
2003-01-11 05:02:14 +00:00
|
|
|
img_set_parameters,
|
2002-09-06 13:01:19 +00:00
|
|
|
};
|
2006-07-10 21:14:37 +00:00
|
|
|
#endif
|