lavf: make av_guess_image2_codec internal
It doesn't look very useful as a public function.
This commit is contained in:
parent
5593f03148
commit
a9bf9d8e53
@ -899,7 +899,9 @@ AVInputFormat *av_iformat_next(AVInputFormat *f);
|
|||||||
*/
|
*/
|
||||||
AVOutputFormat *av_oformat_next(AVOutputFormat *f);
|
AVOutputFormat *av_oformat_next(AVOutputFormat *f);
|
||||||
|
|
||||||
enum CodecID av_guess_image2_codec(const char *filename);
|
#if FF_API_GUESS_IMG2_CODEC
|
||||||
|
attribute_deprecated enum CodecID av_guess_image2_codec(const char *filename);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* XXX: Use automatic init with either ELF sections or C file parser */
|
/* XXX: Use automatic init with either ELF sections or C file parser */
|
||||||
/* modules. */
|
/* modules. */
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
#include "avio_internal.h"
|
#include "avio_internal.h"
|
||||||
|
#include "internal.h"
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -183,9 +184,16 @@ static int read_probe(AVProbeData *p)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum CodecID ff_guess_image2_codec(const char *filename)
|
||||||
|
{
|
||||||
|
return av_str2id(img_tags, filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if FF_API_GUESS_IMG2_CODEC
|
||||||
enum CodecID av_guess_image2_codec(const char *filename){
|
enum CodecID av_guess_image2_codec(const char *filename){
|
||||||
return av_str2id(img_tags, filename);
|
return av_str2id(img_tags, filename);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
static int read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
||||||
{
|
{
|
||||||
|
@ -250,4 +250,6 @@ void ff_reduce_index(AVFormatContext *s, int stream_index);
|
|||||||
void ff_make_absolute_url(char *buf, int size, const char *base,
|
void ff_make_absolute_url(char *buf, int size, const char *base,
|
||||||
const char *rel);
|
const char *rel);
|
||||||
|
|
||||||
|
enum CodecID ff_guess_image2_codec(const char *filename);
|
||||||
|
|
||||||
#endif /* AVFORMAT_INTERNAL_H */
|
#endif /* AVFORMAT_INTERNAL_H */
|
||||||
|
@ -218,7 +218,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
|
|||||||
#if CONFIG_IMAGE2_MUXER
|
#if CONFIG_IMAGE2_MUXER
|
||||||
if (!short_name && filename &&
|
if (!short_name && filename &&
|
||||||
av_filename_number_test(filename) &&
|
av_filename_number_test(filename) &&
|
||||||
av_guess_image2_codec(filename) != CODEC_ID_NONE) {
|
ff_guess_image2_codec(filename) != CODEC_ID_NONE) {
|
||||||
return av_guess_format("image2", NULL, NULL);
|
return av_guess_format("image2", NULL, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -271,7 +271,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
|
|||||||
|
|
||||||
#if CONFIG_IMAGE2_MUXER
|
#if CONFIG_IMAGE2_MUXER
|
||||||
if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){
|
if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){
|
||||||
codec_id= av_guess_image2_codec(filename);
|
codec_id= ff_guess_image2_codec(filename);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(codec_id == CODEC_ID_NONE)
|
if(codec_id == CODEC_ID_NONE)
|
||||||
|
@ -104,5 +104,8 @@
|
|||||||
#ifndef FF_API_PKT_DUMP
|
#ifndef FF_API_PKT_DUMP
|
||||||
#define FF_API_PKT_DUMP (LIBAVFORMAT_VERSION_MAJOR < 54)
|
#define FF_API_PKT_DUMP (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FF_API_GUESS_IMG2_CODEC
|
||||||
|
#define FF_API_GUESS_IMG2_CODEC (LIBAVFORMAT_VERSION_MAJOR < 54)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif //AVFORMAT_VERSION_H
|
#endif //AVFORMAT_VERSION_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user