xine-lib 1.2.11
|
#include <time.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <sys/time.h>
#include <xine/xine_internal.h>
#include <xine/metronom.h>
#include <xine/xineutils.h>
#include "xine_private.h"
Data Structures | |
struct | unixscr_values_t |
struct | unixscr_t |
struct | metronom_clock_private_t |
struct | metronom_impl_t |
Macros | |
#define | LOG_MODULE "metronom" |
#define | LOG_VERBOSE |
#define | METRONOM_CLOCK_INTERNAL |
#define | AUDIO_SAMPLE_LD 15 |
#define | AUDIO_SAMPLE_NUM (1 << AUDIO_SAMPLE_LD) |
#define | AUDIO_SAMPLE_MASK (AUDIO_SAMPLE_NUM - 1) |
#define | MAX_SCR_PROVIDERS 10 |
#define | MAX_SPEED_CHANGE_CALLBACKS 16 |
#define | VIDEO_DRIFT_TOLERANCE 45000 |
#define | AUDIO_DRIFT_TOLERANCE 45000 |
#define | VIDEO_PREDICTION_MODE 0 /* use pts + frame duration */ |
#define | VIDEO_PTS_MODE 1 /* use only pts */ |
#define | abs(x) ( ((x)<0) ? -(x) : (x) ) |
#define | START_PTS 0 |
#define | STOP_PTS ~0 |
#define | MASK_PTS (1 << 19) /* 5.825 s */ |
#define | BOUNCE_MAX 360000 |
#define abs | ( | x | ) | ( ((x)<0) ? -(x) : (x) ) |
#define AUDIO_DRIFT_TOLERANCE 45000 |
#define AUDIO_SAMPLE_LD 15 |
#define AUDIO_SAMPLE_MASK (AUDIO_SAMPLE_NUM - 1) |
#define AUDIO_SAMPLE_NUM (1 << AUDIO_SAMPLE_LD) |
#define BOUNCE_MAX 360000 |
#define LOG_MODULE "metronom" |
#define LOG_VERBOSE |
#define MASK_PTS (1 << 19) /* 5.825 s */ |
#define MAX_SCR_PROVIDERS 10 |
#define MAX_SPEED_CHANGE_CALLBACKS 16 |
#define METRONOM_CLOCK_INTERNAL |
#define START_PTS 0 |
#define STOP_PTS ~0 |
#define VIDEO_DRIFT_TOLERANCE 45000 |
#define VIDEO_PREDICTION_MODE 0 /* use pts + frame duration */ |
#define VIDEO_PTS_MODE 1 /* use only pts */ |
metronom_clock_t * _x_metronom_clock_init | ( | xine_t * | xine | ) |
References _, metronom_clock_s::adjust_clock, metronom_clock_s::get_current_time, metronom_clock_s::get_option, metronom_clock_private_t::mct, metronom_adjust_clock(), metronom_clock_exit(), metronom_clock_get_option(), metronom_clock_set_option(), metronom_get_current_time(), metronom_register_scr(), metronom_register_speed_change_callback(), metronom_resume_clock(), metronom_set_speed(), metronom_start_clock(), metronom_stop_clock(), metronom_sync_hook(), metronom_unregister_scr(), metronom_unregister_speed_change_callback(), metronom_clock_private_t::next_sync_pts, NULL, metronom_clock_private_t::providers, metronom_clock_s::register_scr, metronom_clock_s::register_speed_change_callback, metronom_clock_s::set_option, metronom_clock_private_t::speed_change_callbacks, metronom_clock_private_t::speed_change_used, STOP_PTS, metronom_clock_private_t::sync_thread_state, unixscr_init(), metronom_clock_s::unregister_scr, metronom_clock_s::unregister_speed_change_callback, and metronom_clock_private_t::uscr.
Referenced by xine_init().
metronom_t * _x_metronom_init | ( | int | have_video, |
int | have_audio, | ||
xine_t * | xine | ||
) |
References _, xine_s::config, metronom_base_av_offs_hook(), metronom_exit(), metronom_get_option(), metronom_got_audio_samples(), metronom_got_spu_packet(), metronom_got_video_frame(), metronom_handle_audio_discontinuity(), metronom_handle_video_discontinuity(), metronom_set_audio_rate(), metronom_set_master(), metronom_set_option(), NULL, PREBUFFER_PTS_OFFSET, and config_values_s::register_num.
Referenced by fftgraph_port_open(), fftscope_port_open(), fooviz_open_plugin(), goom_open_plugin(), oscope_port_open(), tdaan_port_open(), and xine_stream_new().
|
static |
References MAX_SCR_PROVIDERS, metronom_clock_private_t::mct, NULL, metronom_clock_private_t::providers, XINE_VERBOSITY_NONE, and xprintf.
Referenced by metronom_register_scr(), and metronom_unregister_scr().
|
static |
References MASK_PTS, metronom_clock_private_t::mct, metronom_clock_private_t::next_sync_pts, and STOP_PTS.
Referenced by _x_metronom_clock_init().
|
static |
References metronom_impl_t::base_av_offset, and xine_cfg_entry_s::num_value.
Referenced by _x_metronom_init().
|
static |
References MAX_SCR_PROVIDERS, metronom_clock_private_t::mct, metronom_stop_sync_thread(), NULL, and metronom_clock_private_t::providers.
Referenced by _x_metronom_clock_init().
|
static |
References CLOCK_SCR_ADJUSTABLE, XINE_VERBOSITY_NONE, and xprintf.
Referenced by _x_metronom_clock_init().
|
static |
References CLOCK_SCR_ADJUSTABLE, XINE_VERBOSITY_NONE, and xprintf.
Referenced by _x_metronom_clock_init().
|
static |
References NULL.
Referenced by _x_metronom_init().
|
static |
References MASK_PTS, MAX_SCR_PROVIDERS, metronom_clock_private_t::mct, metronom_clock_private_t::next_sync_pts, and metronom_clock_private_t::providers.
Referenced by _x_metronom_clock_init().
|
static |
|
static |
References abs, AUDIO_DRIFT_TOLERANCE, AUDIO_SAMPLE_LD, AUDIO_SAMPLE_MASK, AUDIO_SAMPLE_NUM, BOUNCE_MAX, lprintf, METRONOM_LOCK, METRONOM_NO_LOCK, METRONOM_VPTS, METRONOM_VPTS_OFFSET, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by _x_metronom_init().
|
static |
References METRONOM_LOCK, METRONOM_NO_LOCK, METRONOM_SPU_OFFSET, and METRONOM_VPTS_OFFSET.
Referenced by _x_metronom_init().
|
static |
References abs, BOUNCE_MAX, vo_frame_s::duration, lprintf, METRONOM_AV_OFFSET, METRONOM_LOCK, METRONOM_NO_LOCK, METRONOM_VPTS, METRONOM_VPTS_OFFSET, vo_frame_s::pts, VIDEO_DRIFT_TOLERANCE, VIDEO_PREDICTION_MODE, VIDEO_PTS_MODE, vo_frame_s::vpts, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by _x_metronom_init().
|
static |
References DISC_ABSOLUTE, DISC_GAPLESS, metronom_handle_discontinuity(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by _x_metronom_init().
|
static |
References BOUNCE_MAX, DISC_ABSOLUTE, DISC_GAPLESS, DISC_RELATIVE, DISC_STREAMSEEK, DISC_STREAMSTART, lprintf, metronom_vdr_hack_disc(), mode(), xine_uint_mul_div(), xine_usec_sleep(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by metronom_handle_audio_discontinuity(), and metronom_handle_video_discontinuity().
|
static |
References XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by metronom_set_option().
|
static |
References _x_assert, DISC_ABSOLUTE, DISC_GAPLESS, metronom_handle_discontinuity(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by _x_metronom_init().
|
static |
|
static |
|
static |
|
static |
References AUDIO_SAMPLE_NUM, and lprintf.
Referenced by _x_metronom_init().
|
static |
References METRONOM_LOCK, and metronom_s::set_option.
Referenced by _x_metronom_init().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
References metronom_clock_private_t::mct, metronom_clock_private_t::next_sync_pts, NULL, STOP_PTS, and metronom_clock_private_t::sync_thread_state.
Referenced by metronom_clock_exit(), metronom_sync_hook(), and metronom_unregister_scr().
|
static |
|
static |
References MAX_SCR_PROVIDERS, metronom_clock_private_t::mct, NULL, metronom_clock_private_t::providers, and xine_gettime().
Referenced by metronom_start_sync_thread().
|
static |
References get_master_scr(), MAX_SCR_PROVIDERS, metronom_clock_private_t::mct, metronom_stop_sync_thread(), now(), NULL, and metronom_clock_private_t::providers.
Referenced by _x_metronom_clock_init().
|
static |
|
static |
Referenced by metronom_handle_discontinuity().
|
static |
Referenced by metronom_set_option().
|
static |
References NULL, xine_monotonic_clock(), xine_refs_add(), xine_rwlock_unlock, and xine_rwlock_wrlock.
Referenced by unixscr_init().
|
static |
References xine_refs_get(), xine_refs_sub(), and xine_rwlock_destroy.
Referenced by unixscr_init().
|
static |
|
static |
Referenced by unixscr_init().
|
static |
References lprintf, NULL, unixscr_adjust(), unixscr_exit(), unixscr_get_current(), unixscr_get_priority(), unixscr_set_speed(), unixscr_start(), xine_refs_init(), and xine_rwlock_init_default.
Referenced by _x_metronom_clock_init().
|
static |
References NULL, and xine_monotonic_clock().
Referenced by unixscr_set_speed().
|
static |
References unixscr_set_pivot(), XINE_FINE_SPEED_NORMAL, xine_refs_add(), xine_rwlock_unlock, and xine_rwlock_wrlock.
Referenced by unixscr_init().
|
static |
References NULL, xine_monotonic_clock(), xine_refs_add(), xine_rwlock_unlock, and xine_rwlock_wrlock.
Referenced by unixscr_init().