2001-07-22 17:18:56 +03:00
|
|
|
/*
|
|
|
|
* Image format
|
2002-05-26 01:34:32 +03:00
|
|
|
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard.
|
2001-07-22 17:18:56 +03:00
|
|
|
*
|
2002-05-26 01:34:32 +03:00
|
|
|
* This library 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 of the License, or (at your option) any later version.
|
2001-07-22 17:18:56 +03:00
|
|
|
*
|
2002-05-26 01:34:32 +03:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2001-07-22 17:18:56 +03:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2002-05-26 01:34:32 +03:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2001-07-22 17:18:56 +03:00
|
|
|
*
|
2002-05-26 01:34:32 +03:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-07-22 17:18:56 +03:00
|
|
|
*/
|
|
|
|
#include "avformat.h"
|
2002-12-20 21:25:10 +02:00
|
|
|
|
2003-08-25 00:20:44 +03:00
|
|
|
/* XXX: this is a hack */
|
|
|
|
int loop_input = 0;
|
|
|
|
|
2001-07-22 17:18:56 +03:00
|
|
|
typedef struct {
|
|
|
|
int width;
|
|
|
|
int height;
|
2003-08-25 00:20:44 +03:00
|
|
|
int img_first;
|
|
|
|
int img_last;
|
2001-07-22 17:18:56 +03:00
|
|
|
int img_number;
|
2003-08-25 00:20:44 +03:00
|
|
|
int img_count;
|
2001-07-22 17:18:56 +03:00
|
|
|
int img_size;
|
2003-01-11 07:02:14 +02:00
|
|
|
AVImageFormat *img_fmt;
|
|
|
|
int pix_fmt;
|
2001-07-22 17:18:56 +03:00
|
|
|
int is_pipe;
|
|
|
|
char path[1024];
|
2003-01-11 07:02:14 +02:00
|
|
|
/* temporary usage */
|
|
|
|
void *ptr;
|
2001-07-22 17:18:56 +03:00
|
|
|
} VideoData;
|
|
|
|
|
2003-08-08 20:53:30 +03:00
|
|
|
|
|
|
|
/* return -1 if no image found */
|
|
|
|
static int find_image_range(int *pfirst_index, int *plast_index,
|
|
|
|
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++) {
|
|
|
|
if (get_frame_filename(buf, sizeof(buf), path, first_index) < 0)
|
|
|
|
goto fail;
|
|
|
|
if (url_exist(buf))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (first_index == 5)
|
|
|
|
goto fail;
|
|
|
|
|
|
|
|
/* find the last image */
|
|
|
|
last_index = first_index;
|
|
|
|
for(;;) {
|
|
|
|
range = 0;
|
|
|
|
for(;;) {
|
|
|
|
if (!range)
|
|
|
|
range1 = 1;
|
|
|
|
else
|
|
|
|
range1 = 2 * range;
|
|
|
|
if (get_frame_filename(buf, sizeof(buf), path,
|
|
|
|
last_index + range1) < 0)
|
|
|
|
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 07:02:14 +02:00
|
|
|
static int image_probe(AVProbeData *p)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2003-01-11 07:33:35 +02:00
|
|
|
if (filename_number_test(p->filename) >= 0 && guess_image_format(p->filename))
|
2004-11-10 02:02:06 +02:00
|
|
|
return AVPROBE_SCORE_MAX-1;
|
2003-01-11 07:02:14 +02:00
|
|
|
else
|
2001-07-22 17:18:56 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
static int read_header_alloc_cb(void *opaque, AVImageInfo *info)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2003-01-11 07:02:14 +02:00
|
|
|
VideoData *s = opaque;
|
2001-07-22 17:18:56 +03:00
|
|
|
|
2003-01-11 07:02:14 +02: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 17:18:56 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
|
|
|
{
|
2002-05-20 19:31:13 +03:00
|
|
|
VideoData *s = s1->priv_data;
|
2003-08-08 20:53:30 +03:00
|
|
|
int ret, first_index, last_index;
|
2001-07-22 17:18:56 +03:00
|
|
|
char buf[1024];
|
|
|
|
ByteIOContext pb1, *f = &pb1;
|
|
|
|
AVStream *st;
|
|
|
|
|
2002-05-20 19:31:13 +03:00
|
|
|
st = av_new_stream(s1, 0);
|
2001-07-22 17:18:56 +03:00
|
|
|
if (!st) {
|
2002-05-19 02:11:09 +03:00
|
|
|
av_free(s);
|
2001-07-22 17:18:56 +03:00
|
|
|
return -ENOMEM;
|
|
|
|
}
|
2002-05-20 19:31:13 +03:00
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
if (ap && ap->image_format)
|
|
|
|
s->img_fmt = ap->image_format;
|
|
|
|
|
2005-01-08 16:21:33 +02:00
|
|
|
pstrcpy(s->path, sizeof(s->path), s1->filename);
|
2001-07-22 17:18:56 +03:00
|
|
|
s->img_number = 0;
|
2003-08-25 00:20:44 +03:00
|
|
|
s->img_count = 0;
|
|
|
|
|
2001-07-22 17:18:56 +03:00
|
|
|
/* find format */
|
2002-05-20 19:31:13 +03:00
|
|
|
if (s1->iformat->flags & AVFMT_NOFILE)
|
2001-07-22 17:18:56 +03:00
|
|
|
s->is_pipe = 0;
|
|
|
|
else
|
|
|
|
s->is_pipe = 1;
|
2005-05-01 00:43:59 +03:00
|
|
|
|
|
|
|
if (!ap || !ap->time_base.num) {
|
2005-07-18 01:24:36 +03:00
|
|
|
st->codec->time_base= (AVRational){1,25};
|
2003-08-08 20:53:30 +03:00
|
|
|
} else {
|
2005-07-18 01:24:36 +03:00
|
|
|
st->codec->time_base= ap->time_base;
|
2003-08-08 20:53:30 +03:00
|
|
|
}
|
2005-05-01 00:43:59 +03:00
|
|
|
|
2001-07-22 17:18:56 +03:00
|
|
|
if (!s->is_pipe) {
|
2003-08-08 20:53:30 +03:00
|
|
|
if (find_image_range(&first_index, &last_index, s->path) < 0)
|
|
|
|
goto fail;
|
2003-08-25 00:20:44 +03:00
|
|
|
s->img_first = first_index;
|
|
|
|
s->img_last = last_index;
|
2003-08-08 20:53:30 +03:00
|
|
|
s->img_number = first_index;
|
|
|
|
/* compute duration */
|
|
|
|
st->start_time = 0;
|
2005-05-01 00:43:59 +03:00
|
|
|
st->duration = last_index - first_index + 1;
|
2003-08-08 20:53:30 +03:00
|
|
|
if (get_frame_filename(buf, sizeof(buf), s->path, s->img_number) < 0)
|
|
|
|
goto fail;
|
|
|
|
if (url_fopen(f, buf, URL_RDONLY) < 0)
|
2001-07-22 17:18:56 +03:00
|
|
|
goto fail;
|
|
|
|
} else {
|
|
|
|
f = &s1->pb;
|
|
|
|
}
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
ret = av_read_image(f, s1->filename, s->img_fmt, read_header_alloc_cb, s);
|
|
|
|
if (ret < 0)
|
|
|
|
goto fail1;
|
2001-07-22 17:18:56 +03:00
|
|
|
|
|
|
|
if (!s->is_pipe) {
|
|
|
|
url_fclose(f);
|
|
|
|
} else {
|
|
|
|
url_fseek(f, 0, SEEK_SET);
|
|
|
|
}
|
|
|
|
|
2005-07-18 01:24:36 +03: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 17:54:57 +03:00
|
|
|
s->img_size = avpicture_get_size(s->pix_fmt, (s->width+15)&(~15), (s->height+15)&(~15));
|
2003-01-11 07:02:14 +02:00
|
|
|
|
2001-07-22 17:18:56 +03:00
|
|
|
return 0;
|
|
|
|
fail1:
|
|
|
|
if (!s->is_pipe)
|
|
|
|
url_fclose(f);
|
|
|
|
fail:
|
2002-05-19 02:11:09 +03:00
|
|
|
av_free(s);
|
2004-06-19 06:59:34 +03:00
|
|
|
return AVERROR_IO;
|
2001-07-22 17:18:56 +03:00
|
|
|
}
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
static int read_packet_alloc_cb(void *opaque, AVImageInfo *info)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2003-01-11 07:02:14 +02:00
|
|
|
VideoData *s = opaque;
|
|
|
|
|
|
|
|
if (info->width != s->width ||
|
|
|
|
info->height != s->height)
|
|
|
|
return -1;
|
2004-05-13 17:54:57 +03:00
|
|
|
avpicture_fill(&info->pict, s->ptr, info->pix_fmt, (info->width+15)&(~15), (info->height+15)&(~15));
|
2001-07-22 17:18:56 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
2003-01-11 07:02:14 +02:00
|
|
|
VideoData *s = s1->priv_data;
|
|
|
|
char filename[1024];
|
|
|
|
int ret;
|
|
|
|
ByteIOContext f1, *f;
|
2001-07-22 17:18:56 +03:00
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
if (!s->is_pipe) {
|
2003-08-25 00:20:44 +03:00
|
|
|
/* loop over input */
|
|
|
|
if (loop_input && s->img_number > s->img_last) {
|
|
|
|
s->img_number = s->img_first;
|
|
|
|
}
|
2003-01-11 07:02:14 +02:00
|
|
|
if (get_frame_filename(filename, sizeof(filename),
|
|
|
|
s->path, s->img_number) < 0)
|
2004-06-19 06:59:34 +03:00
|
|
|
return AVERROR_IO;
|
2003-01-11 07:02:14 +02:00
|
|
|
f = &f1;
|
|
|
|
if (url_fopen(f, filename, URL_RDONLY) < 0)
|
2004-06-19 06:59:34 +03:00
|
|
|
return AVERROR_IO;
|
2003-01-11 07:02:14 +02:00
|
|
|
} else {
|
|
|
|
f = &s1->pb;
|
|
|
|
if (url_feof(f))
|
2004-06-19 06:59:34 +03:00
|
|
|
return AVERROR_IO;
|
2003-01-11 07:02:14 +02:00
|
|
|
}
|
2001-08-11 21:59:34 +03:00
|
|
|
|
2003-01-11 07:02:14 +02: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 21:59:34 +03:00
|
|
|
}
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
if (ret < 0) {
|
|
|
|
av_free_packet(pkt);
|
2004-06-19 06:59:34 +03:00
|
|
|
return AVERROR_IO; /* signal EOF */
|
2003-01-11 07:02:14 +02:00
|
|
|
} else {
|
2003-08-25 00:20:44 +03:00
|
|
|
/* XXX: computing this pts is not necessary as it is done in
|
|
|
|
the generic code too */
|
2005-07-18 01:24:36 +03: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-25 00:20:44 +03:00
|
|
|
s->img_count++;
|
2003-01-11 07:02:14 +02:00
|
|
|
s->img_number++;
|
|
|
|
return 0;
|
|
|
|
}
|
2001-08-11 21:59:34 +03:00
|
|
|
}
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
static int img_read_close(AVFormatContext *s1)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
/******************************************************/
|
|
|
|
/* image output */
|
|
|
|
|
|
|
|
static int img_set_parameters(AVFormatContext *s, AVFormatParameters *ap)
|
2002-09-06 16:01:19 +03:00
|
|
|
{
|
2003-01-11 07:02:14 +02:00
|
|
|
VideoData *img = s->priv_data;
|
|
|
|
AVStream *st;
|
|
|
|
AVImageFormat *img_fmt;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* find output image format */
|
|
|
|
if (ap && ap->image_format) {
|
|
|
|
img_fmt = ap->image_format;
|
2002-09-06 16:01:19 +03:00
|
|
|
} else {
|
2003-01-11 07:02:14 +02:00
|
|
|
img_fmt = guess_image_format(s->filename);
|
2002-09-06 16:01:19 +03:00
|
|
|
}
|
2003-01-11 07:02:14 +02:00
|
|
|
if (!img_fmt)
|
|
|
|
return -1;
|
2002-09-06 16:01:19 +03:00
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
if (s->nb_streams != 1)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
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 16:01:19 +03:00
|
|
|
}
|
2003-01-11 07:02:14 +02:00
|
|
|
if (i >= PIX_FMT_NB)
|
|
|
|
return -1;
|
|
|
|
img->img_fmt = img_fmt;
|
|
|
|
img->pix_fmt = i;
|
2005-07-18 01:24:36 +03:00
|
|
|
st->codec->pix_fmt = img->pix_fmt;
|
2002-09-06 16:01:19 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-07-22 17:18:56 +03:00
|
|
|
static int img_write_header(AVFormatContext *s)
|
|
|
|
{
|
2002-05-20 19:31:13 +03:00
|
|
|
VideoData *img = s->priv_data;
|
2001-07-22 17:18:56 +03:00
|
|
|
|
|
|
|
img->img_number = 1;
|
2005-01-08 16:21:33 +02:00
|
|
|
pstrcpy(img->path, sizeof(img->path), s->filename);
|
2001-07-22 17:18:56 +03:00
|
|
|
|
|
|
|
/* find format */
|
2002-05-20 19:31:13 +03:00
|
|
|
if (s->oformat->flags & AVFMT_NOFILE)
|
2001-07-22 17:18:56 +03:00
|
|
|
img->is_pipe = 0;
|
|
|
|
else
|
|
|
|
img->is_pipe = 1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-05-29 05:06:32 +03:00
|
|
|
static int img_write_packet(AVFormatContext *s, AVPacket *pkt)
|
2001-07-22 17:18:56 +03:00
|
|
|
{
|
|
|
|
VideoData *img = s->priv_data;
|
2004-05-29 05:06:32 +03:00
|
|
|
AVStream *st = s->streams[pkt->stream_index];
|
2001-07-22 17:18:56 +03:00
|
|
|
ByteIOContext pb1, *pb;
|
2003-01-11 07:02:14 +02:00
|
|
|
AVPicture *picture;
|
|
|
|
int width, height, ret;
|
2001-07-22 17:18:56 +03:00
|
|
|
char filename[1024];
|
2003-01-11 07:02:14 +02:00
|
|
|
AVImageInfo info;
|
2001-07-22 17:18:56 +03:00
|
|
|
|
2005-07-18 01:24:36 +03:00
|
|
|
width = st->codec->width;
|
|
|
|
height = st->codec->height;
|
2002-09-06 16:01:19 +03:00
|
|
|
|
2004-05-29 05:06:32 +03:00
|
|
|
picture = (AVPicture *)pkt->data;
|
2001-07-22 17:18:56 +03:00
|
|
|
|
|
|
|
if (!img->is_pipe) {
|
2003-01-11 07:02:14 +02:00
|
|
|
if (get_frame_filename(filename, sizeof(filename),
|
|
|
|
img->path, img->img_number) < 0)
|
2004-06-19 06:59:34 +03:00
|
|
|
return AVERROR_IO;
|
2001-07-22 17:18:56 +03:00
|
|
|
pb = &pb1;
|
|
|
|
if (url_fopen(pb, filename, URL_WRONLY) < 0)
|
2004-06-19 06:59:34 +03:00
|
|
|
return AVERROR_IO;
|
2001-07-22 17:18:56 +03:00
|
|
|
} else {
|
|
|
|
pb = &s->pb;
|
|
|
|
}
|
2003-01-11 07:02:14 +02:00
|
|
|
info.width = width;
|
|
|
|
info.height = height;
|
2005-07-18 01:24:36 +03:00
|
|
|
info.pix_fmt = st->codec->pix_fmt;
|
2003-10-14 17:40:36 +03:00
|
|
|
info.interleaved = 0; /* FIXME: there should be a way to set it right */
|
2003-01-11 07:02:14 +02:00
|
|
|
info.pict = *picture;
|
|
|
|
ret = av_write_image(pb, img->img_fmt, &info);
|
2001-07-22 17:18:56 +03: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 07:02:14 +02:00
|
|
|
/* input */
|
2001-07-22 17:18:56 +03:00
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
static AVInputFormat image_iformat = {
|
|
|
|
"image",
|
|
|
|
"image sequence",
|
2002-05-20 19:31:13 +03:00
|
|
|
sizeof(VideoData),
|
2003-01-11 07:02:14 +02:00
|
|
|
image_probe,
|
2001-07-22 17:18:56 +03:00
|
|
|
img_read_header,
|
|
|
|
img_read_packet,
|
|
|
|
img_read_close,
|
|
|
|
NULL,
|
2004-04-12 21:32:36 +03:00
|
|
|
NULL,
|
2001-09-17 00:50:48 +03:00
|
|
|
AVFMT_NOFILE | AVFMT_NEEDNUMBER,
|
2001-07-22 17:18:56 +03:00
|
|
|
};
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
static AVInputFormat imagepipe_iformat = {
|
|
|
|
"imagepipe",
|
|
|
|
"piped image sequence",
|
2002-05-20 19:31:13 +03:00
|
|
|
sizeof(VideoData),
|
|
|
|
NULL, /* no probe */
|
2001-07-22 17:18:56 +03:00
|
|
|
img_read_header,
|
|
|
|
img_read_packet,
|
|
|
|
img_read_close,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
/* output */
|
2001-08-11 21:59:34 +03:00
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
static AVOutputFormat image_oformat = {
|
|
|
|
"image",
|
|
|
|
"image sequence",
|
2001-08-11 21:59:34 +03:00
|
|
|
"",
|
|
|
|
"",
|
2002-05-20 19:31:13 +03:00
|
|
|
sizeof(VideoData),
|
2001-08-11 21:59:34 +03:00
|
|
|
CODEC_ID_NONE,
|
|
|
|
CODEC_ID_RAWVIDEO,
|
|
|
|
img_write_header,
|
|
|
|
img_write_packet,
|
|
|
|
img_write_trailer,
|
2003-01-11 07:02:14 +02:00
|
|
|
AVFMT_NOFILE | AVFMT_NEEDNUMBER | AVFMT_RAWPICTURE,
|
|
|
|
img_set_parameters,
|
2001-08-11 21:59:34 +03:00
|
|
|
};
|
2002-05-20 19:31:13 +03:00
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
static AVOutputFormat imagepipe_oformat = {
|
|
|
|
"imagepipe",
|
|
|
|
"piped image sequence",
|
|
|
|
"",
|
2002-09-06 16:01:19 +03:00
|
|
|
"",
|
|
|
|
sizeof(VideoData),
|
|
|
|
CODEC_ID_NONE,
|
|
|
|
CODEC_ID_RAWVIDEO,
|
|
|
|
img_write_header,
|
|
|
|
img_write_packet,
|
|
|
|
img_write_trailer,
|
2003-01-11 07:33:35 +02:00
|
|
|
AVFMT_RAWPICTURE,
|
2003-01-11 07:02:14 +02:00
|
|
|
img_set_parameters,
|
2002-09-06 16:01:19 +03:00
|
|
|
};
|
|
|
|
|
2002-05-20 19:31:13 +03:00
|
|
|
int img_init(void)
|
|
|
|
{
|
2003-01-11 07:02:14 +02:00
|
|
|
av_register_input_format(&image_iformat);
|
|
|
|
av_register_output_format(&image_oformat);
|
2002-05-20 19:31:13 +03:00
|
|
|
|
2003-01-11 07:02:14 +02:00
|
|
|
av_register_input_format(&imagepipe_iformat);
|
|
|
|
av_register_output_format(&imagepipe_oformat);
|
2002-09-06 16:01:19 +03:00
|
|
|
|
2002-05-20 19:31:13 +03:00
|
|
|
return 0;
|
|
|
|
}
|