libgpac
Documentation of the core library of GPAC
Loading...
Searching...
No Matches
reframe_img.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/avparse.h>
#include <gpac/internal/isomedia_dev.h>

Data Structures

struct  BITMAPFILEHEADER
 
struct  BITMAPINFOHEADER
 
struct  GF_ReframeImgCtx
 

Macros

#define BI_RGB   0L
 
#define OFFS(_n)   #_n, offsetof(GF_ReframeImgCtx, _n)
 

Functions

GF_Err img_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
Bool img_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
GF_Err img_process (GF_Filter *filter)
 
static const char * img_probe_data (const u8 *data, u32 size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * img_reframe_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability ReframeImgCaps []
 
static const GF_FilterArgs ReframeImgArgs []
 
GF_FilterRegister ReframeImgRegister
 

Data Structure Documentation

◆ BITMAPFILEHEADER

struct BITMAPFILEHEADER
Data Fields
u16 bfType
u32 bfSize
u16 bfReserved1
u16 bfReserved2
u32 bfOffBits

◆ BITMAPINFOHEADER

struct BITMAPINFOHEADER
Data Fields
u32 biSize
s32 biWidth
s32 biHeight
u16 biPlanes
u16 biBitCount
u32 biCompression
u32 biSizeImage
s32 biXPelsPerMeter
s32 biYPelsPerMeter
u32 biClrUsed
u32 biClrImportant

◆ GF_ReframeImgCtx

struct GF_ReframeImgCtx
Data Fields
GF_Fraction fps
GF_FilterPid * ipid
GF_FilterPid * opid
u32 src_timescale
Bool is_bmp
Bool owns_timescale
u32 codec_id
Bool initial_play_done
Bool is_playing

Macro Definition Documentation

◆ BI_RGB

#define BI_RGB   0L

◆ OFFS

#define OFFS (   _n)    #_n, offsetof(GF_ReframeImgCtx, _n)

Function Documentation

◆ img_configure_pid()

GF_Err img_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)

◆ img_process_event()

Bool img_process_event ( GF_Filter *  filter,
const GF_FilterEvent *  evt 
)

◆ img_process()

GF_Err img_process ( GF_Filter *  filter)

◆ img_probe_data()

static const char * img_probe_data ( const u8 data,
u32  size,
GF_FilterProbeScore score 
)
static

◆ img_reframe_register()

const GF_FilterRegister * img_reframe_register ( GF_FilterSession *  session)

Variable Documentation

◆ ReframeImgCaps

const GF_FilterCapability ReframeImgCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_FILE_EXT, "jpg|jpeg|jp2|j2k|bmp|png"),
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_MIME, "image/jpg|image/jp2|image/bmp|image/png"),
}
@ GF_CODECID_J2K
Definition constants.h:441
@ GF_CODECID_PNG
Definition constants.h:436
@ GF_CODECID_RAW
Definition constants.h:577
@ GF_CODECID_JPEG
Definition constants.h:434
@ GF_STREAM_FILE
Definition constants.h:104
@ GF_STREAM_VISUAL
Definition constants.h:64
#define GF_CAPS_OUTPUT
Definition filters.h:2013
#define CAP_UINT(_f, _a, _b)
Definition filters.h:1955
#define CAP_STRING(_f, _a, _b)
Definition filters.h:1977
#define GF_CAPS_INPUT
Definition filters.h:2001
@ GF_PROP_PID_CODECID
Definition filters.h:1020
@ GF_PROP_PID_STREAM_TYPE
Definition filters.h:1016
@ GF_PROP_PID_FILE_EXT
Definition filters.h:1092
@ GF_PROP_PID_MIME
Definition filters.h:1091

◆ ReframeImgArgs

const GF_FilterArgs ReframeImgArgs[]
static
Initial value:
=
{
{ OFFS(fps), "import frame rate (0 default to 1 Hz)", GF_PROP_FRACTION, "0/1000", NULL, GF_FS_ARG_HINT_HIDE},
{0}
}
@ GF_FS_ARG_HINT_HIDE
Definition filters.h:1891
@ GF_PROP_FRACTION
Definition filters.h:769
#define OFFS(_n)
Definition reframe_img.c:410

◆ ReframeImgRegister

GF_FilterRegister ReframeImgRegister
Initial value:
= {
.name = "rfimg",
GF_FS_SET_HELP("This filter parses JPG/J2K/PNG/BMP files/data and outputs corresponding visual PID and frames.\n"
"\n"
"The following extensions for PNG change the pixel format for RGBA images:\n"
"- pngd: use RGB+depth map pixel format\n"
"- pngds: use RGB+depth(7bits)+shape(MSB of alpha channel) pixel format\n"
"")
.private_size = sizeof(GF_ReframeImgCtx),
.configure_pid = img_configure_pid,
.probe_data = img_probe_data,
.process = img_process,
.process_event = img_process_event
}
#define GF_FS_SET_HELP(_help)
Definition filters.h:2152
#define SETCAPS(__struct)
Definition filters.h:2144
attribute Array args
Definition jsf.idl:24
static const GF_FilterArgs ReframeImgArgs[]
Definition reframe_img.c:411
static const GF_FilterCapability ReframeImgCaps[]
Definition reframe_img.c:397
Bool img_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition reframe_img.c:115
GF_Err img_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition reframe_img.c:85
static const char * img_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition reframe_img.c:362
GF_Err img_process(GF_Filter *filter)
Definition reframe_img.c:146
Definition reframe_img.c:67