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

FITS demuxer. More...

#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


#define FITS_BLOCK_SIZE   2880


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)


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

#define FITS_BLOCK_SIZE   2880

Definition at line 34 of file fitsdec.c.

Referenced by fits_read_packet(), and is_image().

Function Documentation

static int fits_probe ( const AVProbeData p)

Definition at line 43 of file fitsdec.c.

static int fits_read_header ( AVFormatContext s)

Definition at line 51 of file fitsdec.c.

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.

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
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().

static int fits_read_packet ( AVFormatContext s,
AVPacket pkt 

Definition at line 144 of file fitsdec.c.

Variable Documentation

const AVOption fits_options[]
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
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:279
offset must point to AVRational
Definition: opt.h:238

Definition at line 214 of file fitsdec.c.

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

Definition at line 219 of file fitsdec.c.

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(const AVProbeData *p)
Definition: fitsdec.c:43
static int fits_read_header(AVFormatContext *s)
Definition: fitsdec.c:51
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:115
static int fits_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: fitsdec.c:144
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
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:219
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55

Definition at line 226 of file fitsdec.c.