xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions
stretch.c File Reference
#include <stdio.h>
#include <pthread.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/post.h>
#include "dsp.h"
#include <xine/resample.h>
#include "audio_filters.h"

Data Structures

struct  stretchscr_s
 
struct  stretch_parameters_s
 

Macros

#define AUDIO_FRAGMENT   120/1000 /* ms of audio */
 
#define CLIP_INT16(s)
 

Typedefs

typedef struct stretchscr_s stretchscr_t
 
typedef struct post_plugin_stretch_s post_plugin_stretch_t
 
typedef struct stretch_parameters_s stretch_parameters_t
 

Functions

static int stretchscr_get_priority (scr_plugin_t *scr)
 
static void stretchscr_set_pivot (stretchscr_t *this)
 
static int stretchscr_set_speed (scr_plugin_t *scr, int speed)
 
static void stretchscr_adjust (scr_plugin_t *scr, int64_t vpts)
 
static void stretchscr_start (scr_plugin_t *scr, int64_t start_vpts)
 
static int64_t stretchscr_get_current (scr_plugin_t *scr)
 
static void stretchscr_exit (scr_plugin_t *scr)
 
static stretchscr_tstretchscr_init (double *stretch_factor)
 
 PARAM_ITEM (POST_PARAM_TYPE_BOOL, preserve_pitch, PARAM_ITEM(NULL, PARAM_ITEM(0, 1, PARAM_ITEM(0, "Preserve pitch")
 
static int set_parameters (xine_post_t *this_gen, const void *param_gen)
 
static int get_parameters (xine_post_t *this_gen, void *param_gen)
 
static xine_post_api_descr_tget_param_descr (void)
 
static char * get_help (void)
 
static int stretch_port_open (xine_audio_port_t *port_gen, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode)
 
static void stretch_port_close (xine_audio_port_t *port_gen, xine_stream_t *stream)
 
static void stretch_process_fragment (post_audio_port_t *port, xine_stream_t *stream, extra_info_t *extra_info)
 
static void stretch_port_put_buffer (xine_audio_port_t *port_gen, audio_buffer_t *buf, xine_stream_t *stream)
 
static void stretch_dispose (post_plugin_t *this_gen)
 
static post_plugin_tstretch_open_plugin (post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target)
 
void * stretch_init_plugin (xine_t *xine, const void *data)
 

Macro Definition Documentation

◆ AUDIO_FRAGMENT

#define AUDIO_FRAGMENT   120/1000 /* ms of audio */

◆ CLIP_INT16

#define CLIP_INT16 (   s)
Value:
((s) < INT16_MIN) ? INT16_MIN : \
(((s) > INT16_MAX) ? INT16_MAX : (s))
#define INT16_MAX
Definition: goomsl_lex.c:65
#define INT16_MIN
Definition: goomsl_lex.c:56

Typedef Documentation

◆ post_plugin_stretch_t

typedef struct post_plugin_stretch_s post_plugin_stretch_t

◆ stretch_parameters_t

◆ stretchscr_t

typedef struct stretchscr_s stretchscr_t

Function Documentation

◆ get_help()

static char * get_help ( void  )
static

References _.

Referenced by stretch_open_plugin().

◆ get_param_descr()

static xine_post_api_descr_t * get_param_descr ( void  )
static

Referenced by stretch_open_plugin().

◆ get_parameters()

static int get_parameters ( xine_post_t this_gen,
void *  param_gen 
)
static

Referenced by stretch_open_plugin().

◆ PARAM_ITEM()

PARAM_ITEM ( POST_PARAM_TYPE_BOOL  ,
preserve_pitch  ,
PARAM_ITEM(  NULL,
PARAM_ITEM(  0,
,
PARAM_ITEM(  0,
"Preserve pitch"   
)

References _ftype_t, and RESAMPLE_MAX_CHANNELS.

◆ set_parameters()

static int set_parameters ( xine_post_t this_gen,
const void *  param_gen 
)
static

Referenced by stretch_open_plugin().

◆ stretch_dispose()

static void stretch_dispose ( post_plugin_t this_gen)
static

References _x_post_dispose().

Referenced by stretch_open_plugin().

◆ stretch_init_plugin()

void * stretch_init_plugin ( xine_t xine,
const void *  data 
)

◆ stretch_open_plugin()

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

◆ stretch_port_close()

static void stretch_port_close ( xine_audio_port_t port_gen,
xine_stream_t stream 
)
static

◆ stretch_port_open()

static int stretch_port_open ( xine_audio_port_t port_gen,
xine_stream_t stream,
uint32_t  bits,
uint32_t  rate,
int  mode 
)
static

◆ stretch_port_put_buffer()

static void stretch_port_put_buffer ( xine_audio_port_t port_gen,
audio_buffer_t buf,
xine_stream_t stream 
)
static

◆ stretch_process_fragment()

static void stretch_process_fragment ( post_audio_port_t port,
xine_stream_t stream,
extra_info_t extra_info 
)
static

◆ stretchscr_adjust()

static void stretchscr_adjust ( scr_plugin_t scr,
int64_t  vpts 
)
static

References NULL, and xine_monotonic_clock().

Referenced by stretchscr_init().

◆ stretchscr_exit()

static void stretchscr_exit ( scr_plugin_t scr)
static

Referenced by stretchscr_init().

◆ stretchscr_get_current()

static int64_t stretchscr_get_current ( scr_plugin_t scr)
static

References NULL, and xine_monotonic_clock().

Referenced by stretchscr_init().

◆ stretchscr_get_priority()

static int stretchscr_get_priority ( scr_plugin_t scr)
static

References stretchscr_s::scr.

Referenced by stretchscr_init().

◆ stretchscr_init()

static stretchscr_t * stretchscr_init ( double *  stretch_factor)
static

◆ stretchscr_set_pivot()

static void stretchscr_set_pivot ( stretchscr_t this)
static

References NULL, and xine_monotonic_clock().

Referenced by stretchscr_set_speed().

◆ stretchscr_set_speed()

static int stretchscr_set_speed ( scr_plugin_t scr,
int  speed 
)
static

◆ stretchscr_start()

static void stretchscr_start ( scr_plugin_t scr,
int64_t  start_vpts 
)
static