FFmpeg
Macros | Functions
fits.c File Reference
#include "avcodec.h"
#include "libavutil/dict.h"
#include "fits.h"

Go to the source code of this file.

Macros

#define CHECK_KEYWORD(key)
 
#define CHECK_VALUE(key, val)
 

Functions

int avpriv_fits_header_init (FITSHeader *header, FITSHeaderState state)
 Initialize a single header line. More...
 
static int dict_set_if_not_null (AVDictionary ***metadata, char *keyword, char *value)
 
static int read_keyword_value (const uint8_t *ptr8, char *keyword, char *value)
 Extract keyword and value from a header line (80 bytes) and store them in keyword and value strings respectively. More...
 
int avpriv_fits_header_parse_line (void *avcl, FITSHeader *header, const uint8_t line[80], AVDictionary ***metadata)
 Parse a single header line. More...
 

Macro Definition Documentation

#define CHECK_KEYWORD (   key)
Value:
if (strcmp(keyword, key)) { \
av_log(avcl, AV_LOG_ERROR, "expected %s keyword, found %s = %s\n", key, keyword, value); \
}
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
const char * key
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return

Definition at line 96 of file fits.c.

Referenced by avpriv_fits_header_parse_line().

#define CHECK_VALUE (   key,
  val 
)
Value:
if (sscanf(value, "%d", &header->val) != 1) { \
av_log(avcl, AV_LOG_ERROR, "invalid value of %s keyword, %s = %s\n", key, keyword, value); \
}
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
const char * key
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:108
static const uint8_t header[24]
Definition: sdr2.c:67
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return

Definition at line 102 of file fits.c.

Referenced by avpriv_fits_header_parse_line().

Function Documentation

int avpriv_fits_header_init ( FITSHeader header,
FITSHeaderState  state 
)

Initialize a single header line.

Parameters
headerpointer to the header
statecurrent state of parsing the header
Returns
0 if successful otherwise AVERROR_INVALIDDATA

Definition at line 26 of file fits.c.

Referenced by fits_read_header(), and fits_read_packet().

static int dict_set_if_not_null ( AVDictionary ***  metadata,
char *  keyword,
char *  value 
)
static

Definition at line 43 of file fits.c.

Referenced by avpriv_fits_header_parse_line().

static int read_keyword_value ( const uint8_t ptr8,
char *  keyword,
char *  value 
)
static

Extract keyword and value from a header line (80 bytes) and store them in keyword and value strings respectively.

Parameters
ptr8pointer to the data
keywordpointer to the char array in which keyword is to be stored
valuepointer to the char array in which value is to be stored
Returns
0 if calculated successfully otherwise AVERROR_INVALIDDATA

Definition at line 57 of file fits.c.

Referenced by avpriv_fits_header_parse_line().

int avpriv_fits_header_parse_line ( void avcl,
FITSHeader header,
const uint8_t  line[80],
AVDictionary ***  metadata 
)

Parse a single header line.

Parameters
avclused in av_log
headerpointer to the header
lineone header line
metadataused to store metadata while decoding
Returns
0 if successful otherwise AVERROR_INVALIDDATA

Definition at line 108 of file fits.c.

Referenced by fits_read_header(), and is_image().