FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
error.c File Reference
#include <stdio.h>
#include <string.h>
#include "config.h"
#include "avstring.h"
#include "error.h"
#include "macros.h"

Go to the source code of this file.

Data Structures

struct  ErrorEntry
 

Macros

#define _XOPEN_SOURCE   600 /* XSI-compliant version of strerror_r */
 
#define AVERROR_INPUT_AND_OUTPUT_CHANGED   (AVERROR_INPUT_CHANGED | AVERROR_OUTPUT_CHANGED)
 
#define AVERROR_LIST(E, E2)
 
#define STRERROR_LIST(E)
 
#define OFFSET(CODE, DESC)
 
#define NOTHING(CODE, CODE2, DESC)
 
#define STRING(CODE, DESC)   DESC "\0"
 
#define ENTRY(CODE, DESC)   { .num = AVERROR_ ## CODE, .offset = ERROR_ ## CODE ## _OFFSET },
 
#define ENTRY2(CODE, CODE2, DESC)   { .num = AVERROR_ ## CODE, .offset = ERROR_ ## CODE2 ## _OFFSET },
 
#define ENTRY(CODE, DESC)   { .num = AVERROR(CODE), .offset = ERROR_ ## CODE ## _OFFSET },
 

Enumerations

enum  { ERROR_LIST_SIZE }
 

Functions

int av_strerror (int errnum, char *errbuf, size_t errbuf_size)
 Put a description of the AVERROR code errnum in errbuf. More...
 

Variables

static const char error_stringtable [ERROR_LIST_SIZE] =
 
static const struct ErrorEntry error_entries []
 

Macro Definition Documentation

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   600 /* XSI-compliant version of strerror_r */

Definition at line 20 of file error.c.

◆ AVERROR_INPUT_AND_OUTPUT_CHANGED

#define AVERROR_INPUT_AND_OUTPUT_CHANGED   (AVERROR_INPUT_CHANGED | AVERROR_OUTPUT_CHANGED)

Definition at line 28 of file error.c.

◆ AVERROR_LIST

#define AVERROR_LIST (   E,
  E2 
)
Value:
E(BSF_NOT_FOUND, "Bitstream filter not found") \
E(BUG, "Internal bug, should not have happened") \
E2(BUG2, BUG, "Internal bug, should not have happened") \
E(BUFFER_TOO_SMALL, "Buffer too small") \
E(DECODER_NOT_FOUND, "Decoder not found") \
E(DEMUXER_NOT_FOUND, "Demuxer not found") \
E(ENCODER_NOT_FOUND, "Encoder not found") \
E(EOF, "End of file") \
E(EXIT, "Immediate exit requested") \
E(EXTERNAL, "Generic error in an external library") \
E(FILTER_NOT_FOUND, "Filter not found") \
E(INPUT_CHANGED, "Input changed") \
E(INVALIDDATA, "Invalid data found when processing input") \
E(MUXER_NOT_FOUND, "Muxer not found") \
E(OPTION_NOT_FOUND, "Option not found") \
E(OUTPUT_CHANGED, "Output changed") \
E(PATCHWELCOME, "Not yet implemented in FFmpeg, patches welcome") \
E(PROTOCOL_NOT_FOUND, "Protocol not found") \
E(STREAM_NOT_FOUND, "Stream not found") \
E(UNKNOWN, "Unknown error occurred") \
E(EXPERIMENTAL, "Experimental feature") \
E(INPUT_AND_OUTPUT_CHANGED, "Input and output changed") \
E(HTTP_BAD_REQUEST, "Server returned 400 Bad Request") \
E(HTTP_UNAUTHORIZED, "Server returned 401 Unauthorized (authorization failed)") \
E(HTTP_FORBIDDEN, "Server returned 403 Forbidden (access denied)") \
E(HTTP_NOT_FOUND, "Server returned 404 Not Found") \
E(HTTP_TOO_MANY_REQUESTS, "Server returned 429 Too Many Requests") \
E(HTTP_OTHER_4XX, "Server returned 4XX Client Error, but not one of 40{0,1,3,4}") \
E(HTTP_SERVER_ERROR, "Server returned 5XX Server Error reply") \

Definition at line 30 of file error.c.

◆ STRERROR_LIST

#define STRERROR_LIST (   E)

Definition at line 61 of file error.c.

◆ OFFSET

#define OFFSET (   CODE,
  DESC 
)
Value:
ERROR_ ## CODE ## _OFFSET, \
ERROR_ ## CODE ## _END_OFFSET = ERROR_ ## CODE ## _OFFSET + sizeof(DESC) - 1,

Definition at line 102 of file error.c.

◆ NOTHING

#define NOTHING (   CODE,
  CODE2,
  DESC 
)

Definition at line 105 of file error.c.

◆ STRING

#define STRING (   CODE,
  DESC 
)    DESC "\0"

Definition at line 113 of file error.c.

◆ ENTRY [1/2]

#define ENTRY (   CODE,
  DESC 
)    { .num = AVERROR_ ## CODE, .offset = ERROR_ ## CODE ## _OFFSET },

◆ ENTRY2

#define ENTRY2 (   CODE,
  CODE2,
  DESC 
)    { .num = AVERROR_ ## CODE, .offset = ERROR_ ## CODE2 ## _OFFSET },

◆ ENTRY [2/2]

#define ENTRY (   CODE,
  DESC 
)    { .num = AVERROR(CODE), .offset = ERROR_ ## CODE ## _OFFSET },

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ERROR_LIST_SIZE 

Definition at line 101 of file error.c.

Variable Documentation

◆ error_stringtable

const char error_stringtable[ERROR_LIST_SIZE] =
static

Definition at line 114 of file error.c.

Referenced by av_strerror().

◆ error_entries

const struct ErrorEntry error_entries[]
static
Initial value:
= {
#define ENTRY(CODE, DESC)
#define ENTRY2(CODE, CODE2, DESC)
#define ENTRY(CODE, DESC)
}

Referenced by av_strerror(), and main().

UNKNOWN
@ UNKNOWN
Definition: ftp.c:39
E
#define E
Definition: avdct.c:34