Go to the documentation of this file.
40 int ret, n, reply_code;
46 if (resource && strlen(resource))
53 if (resource && resource[0] ==
'/' && !strcmp((resource + 1), in_uri)) {
69 fprintf(stderr,
"Handshake performed.\n");
70 if (reply_code != 200)
72 fprintf(stderr,
"Opening input file.\n");
91 fprintf(stderr,
"Flushing client\n");
93 fprintf(stderr,
"Closing client\n");
95 fprintf(stderr,
"Closing input\n");
100 int main(
int argc,
char **argv)
104 const char *in_uri, *out_uri;
108 printf(
"usage: %s input http://hostname[:port]\n"
109 "API example program to serve http to multiple clients.\n"
120 fprintf(stderr,
"Failed to set listen mode for server: %s\n",
av_err2str(
ret));
124 fprintf(stderr,
"Failed to open server: %s\n",
av_err2str(
ret));
127 fprintf(stderr,
"Entering main loop.\n");
131 fprintf(stderr,
"Accepted client, forking process.\n");
136 perror(
"Fork failed");
141 fprintf(stderr,
"In child.\n");
152 fprintf(stderr,
"Some errors occurred: %s\n",
av_err2str(
ret));
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int avio_close(AVIOContext *s)
Close the resource accessed by the AVIOContext s and free it.
#define AVERROR_EOF
End of file.
static av_cold int end(AVCodecContext *avctx)
int main(int argc, char **argv)
int avio_handshake(AVIOContext *c)
Perform one step of the protocol handshake to accept a new client.
int avio_open2(AVIOContext **s, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options)
Create and initialize a AVIOContext for accessing the resource indicated by url.
int avformat_network_init(void)
Do global initialization of network libraries.
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AVERROR_HTTP_NOT_FOUND
#define AVIO_FLAG_WRITE
write-only
void avio_flush(AVIOContext *s)
Force flushing of buffered data.
int avio_accept(AVIOContext *s, AVIOContext **c)
Accept and allocate a client context on a server context.
int av_opt_set_int(void *obj, const char *name, int64_t val, int search_flags)
const OptionDef options[]
#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")
#define AV_OPT_SEARCH_CHILDREN
Search in possible children of the given object first.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
void av_log_set_level(int level)
Set the log level.
static void process_client(AVIOContext *client, const char *in_uri)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#define AVIO_FLAG_READ
read-only
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 client
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val)