Skip to content
Snippets Groups Projects
Commit ac6d020f authored by Pascal Massimino's avatar Pascal Massimino
Browse files

cleanup image2pipe_{de}muxer fields

Originally committed as revision 25531 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 96ea6ad2
No related branches found
No related tags found
No related merge requests found
...@@ -171,7 +171,7 @@ static int find_image_range(int *pfirst_index, int *plast_index, ...@@ -171,7 +171,7 @@ static int find_image_range(int *pfirst_index, int *plast_index,
} }
static int image_probe(AVProbeData *p) static int read_probe(AVProbeData *p)
{ {
if (p->filename && av_str2id(img_tags, p->filename)) { if (p->filename && av_str2id(img_tags, p->filename)) {
if (av_filename_number_test(p->filename)) if (av_filename_number_test(p->filename))
...@@ -186,7 +186,7 @@ enum CodecID av_guess_image2_codec(const char *filename){ ...@@ -186,7 +186,7 @@ enum CodecID av_guess_image2_codec(const char *filename){
return av_str2id(img_tags, filename); return av_str2id(img_tags, filename);
} }
static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) static int read_header(AVFormatContext *s1, AVFormatParameters *ap)
{ {
VideoData *s = s1->priv_data; VideoData *s = s1->priv_data;
int first_index, last_index; int first_index, last_index;
...@@ -249,7 +249,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) ...@@ -249,7 +249,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
return 0; return 0;
} }
static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) static int read_packet(AVFormatContext *s1, AVPacket *pkt)
{ {
VideoData *s = s1->priv_data; VideoData *s = s1->priv_data;
char filename[1024]; char filename[1024];
...@@ -320,7 +320,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) ...@@ -320,7 +320,7 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
/******************************************************/ /******************************************************/
/* image output */ /* image output */
static int img_write_header(AVFormatContext *s) static int write_header(AVFormatContext *s)
{ {
VideoData *img = s->priv_data; VideoData *img = s->priv_data;
...@@ -336,7 +336,7 @@ static int img_write_header(AVFormatContext *s) ...@@ -336,7 +336,7 @@ static int img_write_header(AVFormatContext *s)
return 0; return 0;
} }
static int img_write_packet(AVFormatContext *s, AVPacket *pkt) static int write_packet(AVFormatContext *s, AVPacket *pkt)
{ {
VideoData *img = s->priv_data; VideoData *img = s->priv_data;
ByteIOContext *pb[3]; ByteIOContext *pb[3];
...@@ -413,56 +413,51 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -413,56 +413,51 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt)
/* input */ /* input */
#if CONFIG_IMAGE2_DEMUXER #if CONFIG_IMAGE2_DEMUXER
AVInputFormat image2_demuxer = { AVInputFormat image2_demuxer = {
"image2", .name = "image2",
NULL_IF_CONFIG_SMALL("image2 sequence"), .long_name = NULL_IF_CONFIG_SMALL("image2 sequence"),
sizeof(VideoData), .priv_data_size = sizeof(VideoData),
image_probe, .read_probe = read_probe,
img_read_header, .read_header = read_header,
img_read_packet, .read_packet = read_packet,
NULL, .flags = AVFMT_NOFILE,
NULL,
NULL,
AVFMT_NOFILE,
}; };
#endif #endif
#if CONFIG_IMAGE2PIPE_DEMUXER #if CONFIG_IMAGE2PIPE_DEMUXER
AVInputFormat image2pipe_demuxer = { AVInputFormat image2pipe_demuxer = {
"image2pipe", .name = "image2pipe",
NULL_IF_CONFIG_SMALL("piped image2 sequence"), .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"),
sizeof(VideoData), .priv_data_size = sizeof(VideoData),
NULL, /* no probe */ .read_header = read_header,
img_read_header, .read_packet = read_packet,
img_read_packet,
}; };
#endif #endif
/* output */ /* output */
#if CONFIG_IMAGE2_MUXER #if CONFIG_IMAGE2_MUXER
AVOutputFormat image2_muxer = { AVOutputFormat image2_muxer = {
"image2", .name = "image2",
NULL_IF_CONFIG_SMALL("image2 sequence"), .long_name = NULL_IF_CONFIG_SMALL("image2 sequence"),
"", .mime_type = "",
"bmp,jpeg,jpg,ljpg,pam,pbm,pcx,pgm,pgmyuv,png,ppm,sgi,tga,tif,tiff,jp2", .extensions = "bmp,jpeg,jpg,ljpg,pam,pbm,pcx,pgm,pgmyuv,png,ppm,sgi,tga,tif,tiff,jp2",
sizeof(VideoData), .priv_data_size = sizeof(VideoData),
CODEC_ID_NONE, .audio_codec = CODEC_ID_NONE,
CODEC_ID_MJPEG, .video_codec = CODEC_ID_MJPEG,
img_write_header, .write_header = write_header,
img_write_packet, .write_packet = write_packet,
NULL, .flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE
.flags= AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE
}; };
#endif #endif
#if CONFIG_IMAGE2PIPE_MUXER #if CONFIG_IMAGE2PIPE_MUXER
AVOutputFormat image2pipe_muxer = { AVOutputFormat image2pipe_muxer = {
"image2pipe", .name = "image2pipe",
NULL_IF_CONFIG_SMALL("piped image2 sequence"), .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"),
"", .mime_type = "",
"", .extensions = "",
sizeof(VideoData), .priv_data_size = sizeof(VideoData),
CODEC_ID_NONE, .audio_codec = CODEC_ID_NONE,
CODEC_ID_MJPEG, .video_codec = CODEC_ID_MJPEG,
img_write_header, .write_header = write_header,
img_write_packet, .write_packet = write_packet,
.flags= AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS .flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment