xine-lib: xine-lib-1.2.13/src/post/goom/xine_goom.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
xine_goom.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <time.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/post.h>`
`#include "goom.h"`

## Data Structures
struct | post_class_goom_s
struct | post_plugin_goom_s

## Macros
#define | LOG_MODULE "goom"
#define | LOG_VERBOSE
#define | BENCHMARK 1
#define | NUMSAMPLES 512 /* hardcoded into goom api */
#define | FPS 14
#define | GOOM_WIDTH 320
#define | GOOM_HEIGHT 240

## Typedefs
typedef struct post_plugin_goom_s | post_plugin_goom_t
typedef struct post_class_goom_s | post_class_goom_t

## Functions
static post_plugin_t * | goom_open_plugin (post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target)
static void | goom_class_dispose (post_class_t *class_gen)
static void | goom_dispose (post_plugin_t *this_gen)
static int | goom_rewire_video (xine_post_out_t *output, void *data)
static int | goom_port_open (xine_audio_port_t *this, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode)
static void | goom_port_close (xine_audio_port_t *this, xine_stream_t *stream)
static void | goom_port_put_buffer (xine_audio_port_t *this, audio_buffer_t *buf, xine_stream_t *stream)
static void | fps_changed_cb (void *data, xine_cfg_entry_t *cfg)
static void | width_changed_cb (void *data, xine_cfg_entry_t *cfg)
static void | height_changed_cb (void *data, xine_cfg_entry_t *cfg)
static void | csc_method_changed_cb (void *data, xine_cfg_entry_t *cfg)
static void * | goom_init_plugin (xine_t *xine, const void *data)
static int | now (void)

## Variables
static const char *const | goom_csc_methods []
static const post_info_t | goom_special_info
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ BENCHMARK

#define BENCHMARK 1

## ◆ FPS

#define FPS 14

Referenced by goom_init_plugin().

## ◆ GOOM_HEIGHT

#define GOOM_HEIGHT 240

Referenced by goom_init_plugin().

## ◆ GOOM_WIDTH

#define GOOM_WIDTH 320

Referenced by goom_init_plugin().

## ◆ LOG_MODULE

#define LOG_MODULE "goom"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ NUMSAMPLES

#define NUMSAMPLES 512 /* hardcoded into goom api */

Referenced by goom_port_open(), and goom_port_put_buffer().

## Typedef Documentation

## ◆ post_class_goom_t

typedef struct post_class_goom_s post_class_goom_t

## ◆ post_plugin_goom_t

typedef struct post_plugin_goom_s post_plugin_goom_t

## Function Documentation

## ◆ csc_method_changed_cb()

static void csc_method_changed_cb | ( | void * | data,
|  | xine_cfg_entry_t * | cfg )
| static

References post_class_goom_s::csc_method, and xine_cfg_entry_s::num_value.

Referenced by goom_init_plugin().

## ◆ fps_changed_cb()

static void fps_changed_cb | ( | void * | data,
|  | xine_cfg_entry_t * | cfg )
| static

References post_class_goom_s::fps, and xine_cfg_entry_s::num_value.

Referenced by goom_init_plugin().

## ◆ goom_class_dispose()

static void goom_class_dispose | ( | post_class_t * | class_gen | ) |
| static

References NULL.

Referenced by goom_init_plugin().

## ◆ goom_dispose()

static void goom_dispose | ( | post_plugin_t * | this_gen | ) |
| static

References _x_post_dispose(), goom_close(), and rgb2yuy2_free().

Referenced by goom_open_plugin().

## ◆ goom_init_plugin()

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

References _, xine_s::config, csc_method_changed_cb(), FPS, fps_changed_cb(), goom_class_dispose(), goom_csc_methods, GOOM_HEIGHT, goom_open_plugin(), GOOM_WIDTH, height, height_changed_cb(), N_, NULL, config_values_s::register_enum, config_values_s::register_num, width, and width_changed_cb().

## ◆ goom_open_plugin()

static post_plugin_t * goom_open_plugin | ( | post_class_t * | class_gen,
|  | int | inputs,
|  | xine_audio_port_t ** | audio_target,
|  | xine_video_port_t ** | video_target )
| static

References _x_metronom_init(), _x_post_init(), _x_post_intercept_audio_port(), xine_audio_port_s::close, xine_post_out_s::data, goom_dispose(), goom_init(), goom_port_close(), goom_port_open(), goom_port_put_buffer(), goom_rewire_video(), input(), lprintf, xine_post_out_s::name, post_audio_port_s::new_port, NULL, xine_audio_port_s::open, post_out_s::post, xine_audio_port_s::put_buffer, xine_post_out_s::rewire, rgb2yuy2_alloc(), xine_post_out_s::type, xine_list_push_back(), post_out_s::xine_out, and XINE_POST_DATA_VIDEO.

Referenced by goom_init_plugin().

## ◆ goom_port_close()

static void goom_port_close | ( | xine_audio_port_t * | this,
|  | xine_stream_t * | stream )
| static

References _x_post_dec_usage, xine_audio_port_s::close, free_yuv_planes(), NULL, post_audio_port_s::original_port, post_audio_port_s::post, post_audio_port_s::stream, and XINE_ANON_STREAM.

Referenced by goom_open_plugin().

## ◆ goom_port_open()

static int goom_port_open | ( | xine_audio_port_t * | this,
|  | xine_stream_t * | stream,
|  | uint32_t | bits,
|  | uint32_t | rate,
|  | int | mode )
| static

References _x_ao_mode2channels(), _x_post_inc_usage, _x_post_rewire(), bits, post_audio_port_s::bits, init_yuv_planes(), xine_stream_s::metronom, mode(), post_audio_port_s::mode, NUMSAMPLES, xine_audio_port_s::open, post_audio_port_s::original_port, post_audio_port_s::post, post_audio_port_s::rate, post_audio_port_s::stream, and XINE_ANON_STREAM.

Referenced by goom_open_plugin().

## ◆ goom_port_put_buffer()

static void goom_port_put_buffer | ( | xine_audio_port_t * | this,
|  | audio_buffer_t * | buf,
|  | xine_stream_t * | stream )
| static

References _x_assert, vo_frame_s::bad_frame, vo_frame_s::base, post_audio_port_s::bits, COMPUTE_U, COMPUTE_V, COMPUTE_Y, vo_frame_s::draw, vo_frame_s::duration, vo_frame_s::extra_info, vo_frame_s::free, free_yuv_planes(), goom_close(), goom_init(), goom_update(), height, vo_frame_s::height, init_yuv_planes(), extra_info_s::invalid, audio_buffer_s::mem, audio_buffer_s::mem_size, MM_ACCEL_X86_MMX, now(), NULL, audio_buffer_s::num_frames, NUMSAMPLES, post_audio_port_s::original_port, vo_frame_s::pitches, post_audio_port_s::post, vo_frame_s::proc_slice, vo_frame_s::pts, xine_audio_port_s::put_buffer, rgb2yuy2_slice(), VO_BOTH_FIELDS, audio_buffer_s::vpts, width, XINE_ANON_STREAM, XINE_IMGFMT_YUY2, xine_mm_accel(), XINE_VERBOSITY_DEBUG, xprintf, and yuv444_to_yuy2.

Referenced by goom_open_plugin().

## ◆ goom_rewire_video()

static int goom_rewire_video | ( | xine_post_out_t * | output,
|  | void * | data )
| static

References xine_video_port_s::close, xine_post_out_s::data, xine_video_port_s::open, post_out_s::post, and XINE_ANON_STREAM.

Referenced by goom_open_plugin().

## ◆ height_changed_cb()

static void height_changed_cb | ( | void * | data,
|  | xine_cfg_entry_t * | cfg )
| static

References post_class_goom_s::height, and xine_cfg_entry_s::num_value.

Referenced by goom_init_plugin().

## ◆ now()

static int now | ( | void |  | ) |
| static

References NULL.

Referenced by ao_alsa_delay(), ao_alsa_write(), ao_file_delay(), cdda_plugin_open(), cdda_plugin_seek(), demux_ts_parse_pat(), demux_ts_tbre_update(), file_input_open(), goom_port_put_buffer(), hls_live_wait(), metronom_got_spu_packet(), metronom_unregister_scr(), mpd_set_frag_index(), seek_flv_file(), vdr_execute_rpc_command(), vdr_plugin_dispose(), xine_event_send(), xine_get_next_audio_frame(), and xine_get_next_video_frame().

## ◆ width_changed_cb()

static void width_changed_cb | ( | void * | data,
|  | xine_cfg_entry_t * | cfg )
| static

References xine_cfg_entry_s::num_value, and post_class_goom_s::width.

Referenced by goom_init_plugin().

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_POST | PLUGIN_MUST_PRELOAD, 10, "goom", XINE_VERSION_CODE, &goom_special_info, &goom_init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
goom_special_info
static const post_info_t goom_special_info
Definition xine_goom.c:623
goom_init_plugin
static void * goom_init_plugin(xine_t *xine, const void *data)
Definition xine_goom.c:167
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_MUST_PRELOAD
#define PLUGIN_MUST_PRELOAD
Definition xine_plugin.h:46
PLUGIN_POST
#define PLUGIN_POST
Definition xine_plugin.h:37

## ◆ goom_csc_methods

const char* const goom_csc_methods[]
| static

Initial value:
={
"Fast but not photorealistic",
"Slow but looks better",
"Mostly fast and good quality",
NULL
}

Referenced by goom_init_plugin().

## ◆ goom_special_info

const post_info_t goom_special_info
| static

Initial value:
= {
.type = XINE_POST_TYPE_AUDIO_VISUALIZATION,
}
XINE_POST_TYPE_AUDIO_VISUALIZATION
#define XINE_POST_TYPE_AUDIO_VISUALIZATION
Definition xine.h:825