FFmpeg
Loading...
Searching...
No Matches
fitsdec.c File Reference

FITS demuxer. More...

#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.
 
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.

Referenced by is_image().

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 },
}
#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:355
@ AV_OPT_TYPE_VIDEO_RATE
Underlying C type is AVRational.
Definition opt.h:314

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,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
static const AVOption fits_options[]
Definition fitsdec.c:309
@ AV_CLASS_CATEGORY_DEMUXER
Definition log.h:33

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),
}
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition avformat.h:498
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int read_probe(const AVProbeData *p)
Definition cdg.c:30
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
static int fits_read_header(AVCodecContext *avctx, const uint8_t **ptr, FITSHeader *header, const uint8_t *end, AVDictionary **metadata)
Read the fits header and store the values in FITSHeader pointed by header.
Definition fitsdec.c:106
static const AVClass fits_demuxer_class
Definition fitsdec.c:186
static int fits_probe(const AVProbeData *p)
Definition fitsdec.c:40
static int fits_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition fitsdec.c:140
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88

Definition at line 194 of file fitsdec.c.