FFmpeg  4.0
Data Structures | Macros | Functions | Variables
fitsdec.c File Reference

FITS demuxer. More...

#include "libavutil/intreadwrite.h"
#include "internal.h"
#include "libavutil/opt.h"
#include "libavcodec/fits.h"
#include "libavutil/bprint.h"

Go to the source code of this file.

Data Structures

struct  FITSContext
 

Macros

#define FITS_BLOCK_SIZE   2880
 

Functions

static int fits_probe (AVProbeData *p)
 
static int fits_read_header (AVFormatContext *s)
 
static int64_t is_image (AVFormatContext *s, FITSContext *fits, FITSHeader *header, AVBPrint *avbuf, uint64_t *data_size)
 Parses header and checks that the current HDU contains image or not It also stores the header in the avbuf and stores the size of data part in data_size. More...
 
static int fits_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption fits_options []
 
static const AVClass fits_demuxer_class
 
AVInputFormat ff_fits_demuxer
 

Detailed Description

FITS demuxer.

Definition in file fitsdec.c.

Macro Definition Documentation

◆ FITS_BLOCK_SIZE

#define FITS_BLOCK_SIZE   2880

Definition at line 33 of file fitsdec.c.

Referenced by fits_read_packet(), and is_image().

Function Documentation

◆ fits_probe()

static int fits_probe ( AVProbeData p)
static

Definition at line 42 of file fitsdec.c.

◆ fits_read_header()

static int fits_read_header ( AVFormatContext s)
static

Definition at line 50 of file fitsdec.c.

◆ is_image()

static int64_t is_image ( AVFormatContext s,
FITSContext fits,
FITSHeader header,
AVBPrint *  avbuf,
uint64_t *  data_size 
)
static

Parses header and checks that the current HDU contains image or not It also stores the header in the avbuf and stores the size of data part in data_size.

Parameters
spointer to AVFormat Context
fitspointer to FITSContext
headerpointer to FITSHeader
avbufpointer to AVBPrint to store the header
data_sizeto store the size of data part
Returns
1 if image found, 0 if any other extension and AVERROR_INVALIDDATA otherwise

Definition at line 78 of file fitsdec.c.

Referenced by fits_read_packet().

◆ fits_read_packet()

static int fits_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 143 of file fitsdec.c.

Variable Documentation

◆ fits_options

const AVOption fits_options[]
static
Initial value:
= {
{ "framerate", "set the framerate", 0x42, AV_OPT_TYPE_VIDEO_RATE, {.str = "1"}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM},
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:277
offset must point to AVRational
Definition: opt.h:236

Definition at line 210 of file fitsdec.c.

◆ fits_demuxer_class

const AVClass fits_demuxer_class
static
Initial value:
= {
.class_name = "FITS demuxer",
.item_name = av_default_item_name,
.option = fits_options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption fits_options[]
Definition: fitsdec.c:210

Definition at line 215 of file fitsdec.c.

◆ ff_fits_demuxer

AVInputFormat ff_fits_demuxer
Initial value:
= {
.name = "fits",
.long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"),
.priv_data_size = sizeof(FITSContext),
.priv_class = &fits_demuxer_class,
.raw_codec_id = AV_CODEC_ID_FITS,
}
static int fits_probe(AVProbeData *p)
Definition: fitsdec.c:42
static int fits_read_header(AVFormatContext *s)
Definition: fitsdec.c:50
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int fits_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: fitsdec.c:143
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
static const AVClass fits_demuxer_class
Definition: fitsdec.c:215

Definition at line 222 of file fitsdec.c.