xine-lib: xine-lib-1.2.13/src/video_dec/libpng.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
libpng.c File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/types.h>`
`#include <png.h>`
`#include <xine/xine_internal.h>`
`#include <xine/video_out.h>`
`#include <xine/buffer.h>`
`#include <xine/xine_buffer.h>`

## Data Structures
struct | dec_data
struct | png_decoder_s

## Macros
#define | LOG_MODULE "png_video_decoder"
#define | LOG_VERBOSE

## Typedefs
typedef struct png_decoder_s | png_decoder_t

## Functions
static void | _user_error (png_structp png, png_const_charp msg)
static void | _user_warning (png_structp png, png_const_charp msg)
static void | _user_read (png_structp png, png_bytep data, png_size_t length)
static vo_frame_t * | _png_decode_data (png_decoder_t *this, const uint8_t *data, size_t size)
static void | png_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
static void | png_flush (video_decoder_t *this_gen)
static void | png_reset (video_decoder_t *this_gen)
static void | png_discontinuity (video_decoder_t *this_gen)
static void | png_dispose (video_decoder_t *this_gen)
static video_decoder_t * | open_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream)
static void * | init_class (xine_t *xine, const void *data)

## Variables
static const uint32_t | supported_types [] = { BUF_VIDEO_PNG, 0 }
static const decoder_info_t | dec_info_png
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ LOG_MODULE

#define LOG_MODULE "png_video_decoder"

Referenced by _png_decode_data(), _user_error(), _user_read(), and _user_warning().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Typedef Documentation

## ◆ png_decoder_t

typedef struct png_decoder_s png_decoder_t

## Function Documentation

## ◆ _png_decode_data()

static vo_frame_t * _png_decode_data | ( | png_decoder_t * | this,
|  | const uint8_t * | data,
|  | size_t | size )
| static

References _user_error(), _user_read(), _user_warning(), _x_meta_info_set_utf8(), _x_stream_info_set(), vo_frame_s::bad_frame, vo_frame_s::base, vo_frame_s::duration, vo_frame_s::format, height, vo_frame_s::height, LOG_MODULE, NULL, vo_frame_s::pitches, vo_frame_s::proc_slice, rgb2yuy2_alloc(), rgb2yuy2_free(), rgb2yuy2_slice(), rgb2yv12_slice(), VO_BOTH_FIELDS, VO_CAP_FULLRANGE, VO_CAP_YUY2, VO_GET_FRAME_MAY_FAIL, VO_PROP_MAX_VIDEO_HEIGHT, VO_PROP_MAX_VIDEO_WIDTH, VO_SET_FLAGS_CM, width, XINE_IMGFMT_YUY2, XINE_IMGFMT_YV12, XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_FRAME_DURATION, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_WIDTH, XINE_VERBOSITY_LOG, and xprintf.

Referenced by png_decode_data().

## ◆ _user_error()

static void _user_error | ( | png_structp | png,
|  | png_const_charp | msg )
| static

References LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _png_decode_data().

## ◆ _user_read()

static void _user_read | ( | png_structp | png,
|  | png_bytep | data,
|  | png_size_t | length )
| static

References LOG_MODULE, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _png_decode_data().

## ◆ _user_warning()

static void _user_warning | ( | png_structp | png,
|  | png_const_charp | msg )
| static

References LOG_MODULE, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _png_decode_data().

## ◆ init_class()

static void * init_class | ( | xine_t * | xine,
|  | const void * | data )
| static

References video_decoder_s::dispose, N_, NULL, open_plugin(), and video_decoder_class_s::open_plugin.

## ◆ open_plugin()

static video_decoder_t * open_plugin | ( | video_decoder_class_t * | class_gen,
|  | xine_stream_t * | stream )
| static

References NULL, png_decode_data(), png_discontinuity(), png_dispose(), png_flush(), png_reset(), and xine_buffer_init().

Referenced by init_class().

## ◆ png_decode_data()

static void png_decode_data | ( | video_decoder_t * | this_gen,
|  | buf_element_t * | buf )
| static

References _png_decode_data(), BUF_FLAG_FRAME_END, BUF_FLAG_PREVIEW, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::mem, NULL, buf_element_s::pts, vo_frame_s::pts, buf_element_s::size, xine_buffer_copyin, and xine_container_of.

Referenced by open_plugin().

## ◆ png_discontinuity()

static void png_discontinuity | ( | video_decoder_t * | this_gen | ) |
| static

References xine_container_of.

Referenced by open_plugin().

## ◆ png_dispose()

static void png_dispose | ( | video_decoder_t * | this_gen | ) |
| static

References NULL, xine_buffer_free, and xine_container_of.

Referenced by open_plugin().

## ◆ png_flush()

static void png_flush | ( | video_decoder_t * | this_gen | ) |
| static

References NULL, and xine_container_of.

Referenced by open_plugin().

## ◆ png_reset()

static void png_reset | ( | video_decoder_t * | this_gen | ) |
| static

References NULL, and xine_container_of.

Referenced by open_plugin().

## Variable Documentation

## ◆ dec_info_png

const decoder_info_t dec_info_png
| static

Initial value:
= {
.supported_types = supported_types,
.priority = 10,
}
supported_types
static const uint32_t supported_types[]
Definition libpng.c:466

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_VIDEO_DECODER, 19, "png", XINE_VERSION_CODE, &dec_info_png, init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_class
static void * init_class(xine_t *xine, const void *data)
Definition libpng.c:447
dec_info_png
static const decoder_info_t dec_info_png
Definition libpng.c:468
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
NULL
Definition xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition xine_plugin.h:29
PLUGIN_VIDEO_DECODER
#define PLUGIN_VIDEO_DECODER
Definition xine_plugin.h:33

## ◆ supported_types

const uint32_t supported_types[] = { BUF_VIDEO_PNG, 0 }
| static