libgpac
Documentation of the core library of GPAC
reframe_img.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/avparse.h>
#include <gpac/network.h>
#include <gpac/internal/isomedia_dev.h>
+ Include dependency graph for reframe_img.c:

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 * rfimg_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
+ Collaboration diagram for 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 
)
+ Here is the call graph for this function:

◆ img_process_event()

Bool img_process_event ( GF_Filter *  filter,
const GF_FilterEvent *  evt 
)
+ Here is the call graph for this function:

◆ img_process()

GF_Err img_process ( GF_Filter *  filter)
+ Here is the call graph for this function:

◆ img_probe_data()

static const char* img_probe_data ( const u8 data,
u32  size,
GF_FilterProbeScore score 
)
static
+ Here is the call graph for this function:

◆ rfimg_register()

const GF_FilterRegister* rfimg_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:457
@ GF_CODECID_PNG
Definition: constants.h:452
@ GF_CODECID_RAW
Definition: constants.h:600
@ GF_CODECID_JPEG
Definition: constants.h:450
@ GF_STREAM_FILE
Definition: constants.h:104
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define GF_CAPS_OUTPUT
Definition: filters.h:2232
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#define GF_CAPS_INPUT
Definition: filters.h:2220
@ GF_PROP_PID_CODECID
Definition: filters.h:1116
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_MIME
Definition: filters.h:1189

◆ 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:2106
@ GF_PROP_FRACTION
Definition: filters.h:860
#define OFFS(_n)
Definition: reframe_img.c:423

◆ 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,
.hint_class_type = GF_FS_CLASS_FRAMING
}
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_CLASS_FRAMING
Definition: filters.h:2459
attribute Array args
Definition: jsf.idl:24
static const char * img_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition: reframe_img.c:375
static const GF_FilterArgs ReframeImgArgs[]
Definition: reframe_img.c:424
static const GF_FilterCapability ReframeImgCaps[]
Definition: reframe_img.c:410
Bool img_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: reframe_img.c:117
GF_Err img_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: reframe_img.c:87
GF_Err img_process(GF_Filter *filter)
Definition: reframe_img.c:148
Definition: reframe_img.c:69