Skip to content

Commit

Permalink
Move log_callback_help to cmdutils.[hc], for allowing sharing.
Browse files Browse the repository at this point in the history
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@25149 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
  • Loading branch information
stefano committed Sep 20, 2010
1 parent 735bbae commit 35ce15b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 5 additions & 0 deletions cmdutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ struct SwsContext *sws_opts;

const int this_year = 2010;

void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
{
vfprintf(stdout, fmt, vl);
}

double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max)
{
char *tail;
Expand Down
6 changes: 6 additions & 0 deletions cmdutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
extern AVFormatContext *avformat_opts;
extern struct SwsContext *sws_opts;

/**
* Trivial log callback.
* Only suitable for show_help and similar since it lacks prefix handling.
*/
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);

/**
* Fallback for options that are not explicitly handled, these will be
* parsed through AVOptions.
Expand Down
9 changes: 0 additions & 9 deletions ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3870,15 +3870,6 @@ static void opt_intra_matrix(const char *arg)
parse_matrix_coeffs(intra_matrix, arg);
}

/**
* Trivial log callback.
* Only suitable for show_help and similar since it lacks prefix handling.
*/
static void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
{
vfprintf(stdout, fmt, vl);
}

static void show_usage(void)
{
printf("Hyper fast Audio and Video encoder\n");
Expand Down

0 comments on commit 35ce15b

Please sign in to comment.