FFmpeg
Data Structures | Macros | Functions | Variables
fitsdec.c File Reference
#include "libavutil/avassert.h"
#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 (const 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
 
const 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 34 of file fitsdec.c.

Function Documentation

◆ fits_probe()

static int fits_probe ( const AVProbeData p)
static

Definition at line 43 of file fitsdec.c.

◆ fits_read_header()

static int fits_read_header ( AVFormatContext s)
static

Definition at line 51 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 79 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 144 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 },
}

Definition at line 214 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,
}

Definition at line 219 of file fitsdec.c.

◆ ff_fits_demuxer

const 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,
}

Definition at line 226 of file fitsdec.c.

fits_demuxer_class
static const AVClass fits_demuxer_class
Definition: fitsdec.c:219
AV_OPT_TYPE_VIDEO_RATE
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
Definition: opt.h:238
FITSContext
Definition: fitsdec.c:43
fits_options
static const AVOption fits_options[]
Definition: fitsdec.c:214
fits_probe
static int fits_probe(const AVProbeData *p)
Definition: fitsdec.c:43
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:41
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:545
NULL
#define NULL
Definition: coverity.c:32
AV_CODEC_ID_FITS
@ AV_CODEC_ID_FITS
Definition: codec_id.h:289
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
fits_read_packet
static int fits_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: fitsdec.c:144
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:115
fits_read_header
static int fits_read_header(AVFormatContext *s)
Definition: fitsdec.c:51
AV_OPT_FLAG_DECODING_PARAM
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:282
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:29