FFmpeg
Data Structures | Macros | Functions | Variables
fitsdec.c File Reference
#include "demux.h"
#include "internal.h"
#include "libavutil/opt.h"
#include "libavcodec/fits.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 int is_image (AVFormatContext *s, FITSContext *fits, FITSHeader *header, AVPacket *pkt, 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 FFInputFormat 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 32 of file fitsdec.c.

Function Documentation

◆ fits_probe()

static int fits_probe ( const AVProbeData p)
static

Definition at line 40 of file fitsdec.c.

◆ fits_read_header()

static int fits_read_header ( AVFormatContext s)
static

Definition at line 48 of file fitsdec.c.

◆ is_image()

static int is_image ( AVFormatContext s,
FITSContext fits,
FITSHeader header,
AVPacket pkt,
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
pktpointer to AVPacket to store the header
data_sizeto store the size of data part
Returns
1 if image found, 0 if any other extension and AVERROR code otherwise

Definition at line 75 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 140 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 181 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 186 of file fitsdec.c.

◆ ff_fits_demuxer

const FFInputFormat ff_fits_demuxer
Initial value:
= {
.p.name = "fits",
.p.long_name = NULL_IF_CONFIG_SMALL("Flexible Image Transport System"),
.p.priv_class = &fits_demuxer_class,
.p.flags = AVFMT_NOTIMESTAMPS,
.priv_data_size = sizeof(FITSContext),
}

Definition at line 194 of file fitsdec.c.

fits_demuxer_class
static const AVClass fits_demuxer_class
Definition: fitsdec.c:186
AV_OPT_TYPE_VIDEO_RATE
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
Definition: opt.h:248
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:479
FITSContext
Definition: fitsdec.c:43
fits_options
static const AVOption fits_options[]
Definition: fitsdec.c:181
fits_probe
static int fits_probe(const AVProbeData *p)
Definition: fitsdec.c:40
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:41
AV_CLASS_CATEGORY_DEMUXER
@ AV_CLASS_CATEGORY_DEMUXER
Definition: log.h:33
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:550
NULL
#define NULL
Definition: coverity.c:32
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:140
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:106
fits_read_header
static int fits_read_header(AVFormatContext *s)
Definition: fitsdec.c:48
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:273
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30