Go to the documentation of this file.
62 #define OFFSET(x) offsetof(TestContext, x)
64 #define TEST_FLAG_COOL 01
65 #define TEST_FLAG_LAME 02
66 #define TEST_FLAG_MU 04
112 vfprintf(stdout, fmt, vl);
122 printf(
"Testing default values\n");
135 printf(
"width=%d height=%d\n", test_ctx.
w, test_ctx.
h);
153 printf(
"\nTesting av_opt_is_set_to_default()\n");
174 printf(
"\nTesting av_opt_get/av_opt_set()\n");
203 printf(
"name: %-11s get: %-16s set: %-16s get: %-16s %s\n", o->
name,
207 ret1 >= 0 && ret2 >= 0 && ret3 >= 0 && !strcmp(value1, value2) ?
"OK" :
"Mismatch");
215 printf(
"\nTest av_opt_serialize()\n");
227 memset(&test_ctx, 0,
sizeof(test_ctx));
239 printf(
"\nTesting av_set_options_string()\n");
242 static const char *
const options[] = {
258 "flags=+mu-lame : num=42: toggle=0",
259 "num=42 : string=blahblah",
260 "rational=0 : rational=1/2 : rational=1/-1",
273 "video_rate=30000/1001",
274 "video_rate=30/1.001",
278 "duration=1\\:23\\:45.67",
304 "dict1='happy=\\:-):sad=\\:-('",
313 int silence_log = !strcmp(
options[
i],
"rational=-1/0");
326 printf(
"\nTesting av_opt_set_from_string()\n");
329 static const char *
const options[] = {
337 " 5 : hello : size = pal ",
338 "a_very_long_option_name_that_will_need_to_be_ellipsized_around_here=42"
340 static const char *
const shorthand[] = {
"num",
"string",
NULL };
AVPixelFormat
Pixel format.
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
#define AV_LOG_QUIET
Print no output.
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
int av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_flags)
Check if given option is set to its default value.
#define AV_CH_LAYOUT_HEXAGONAL
static const char * test_get_name(void *ctx)
int av_set_options_string(void *ctx, const char *opts, const char *key_val_sep, const char *pairs_sep)
Parse the key/value pairs list in opts.
@ AV_OPT_TYPE_BINARY
offset must point to a pointer immediately followed by an int for the length
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static enum AVPixelFormat pix_fmt
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
int av_opt_set_from_string(void *ctx, const char *opts, const char *const *shorthand, const char *key_val_sep, const char *pairs_sep)
Parse the key-value pairs list in opts.
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
enum AVPixelFormat pix_fmt
void av_opt_free(void *obj)
Free all allocated objects in obj.
const OptionDef options[]
void av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
Set the logging callback.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
printf("static const uint8_t my_array[100] = {\n")
@ AV_OPT_TYPE_CHANNEL_LAYOUT
void av_log_set_level(int level)
Set the log level.
#define i(width, name, range_min, range_max)
AVSampleFormat
Audio sample formats.
@ AV_SAMPLE_FMT_S16
signed 16 bits
const AVOption * av_opt_next(const void *obj, const AVOption *last)
Iterate over all AVOptions belonging to obj.
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo ug o o w
#define FF_ARRAY_ELEMS(a)
static void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)
int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, const char key_val_sep, const char pairs_sep)
Serialize object's options.
static const AVClass test_class
#define flags(name, subs,...)
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val)
int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags)
Show the obj options.
static const AVOption test_options[]
enum AVSampleFormat sample_fmt
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.