xine-lib: xine-lib-1.2.12/src/dxr3/dxr3_decode_video.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions
dxr3_decode_video.c File Reference
`#include <sys/types.h>`
`#include <sys/ioctl.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <pthread.h>`
`#include <fcntl.h>`
`#include <errno.h>`
`#include <xine/xine_internal.h>`
`#include <xine/buffer.h>`
`#include "video_out_dxr3.h"`
`#include "dxr3.h"`
`#include "group_dxr3.h"`

## Data Structures
struct | dxr3_decoder_class_s
struct | dxr3_decoder_s

## Macros
#define | LOG_MODULE "dxr3_decode_video"
#define | LOG_VID 0
#define | LOG_PTS 0
#define | PAN_SCAN_WINDOW_SIZE 50
#define | RESYNC_WINDOW_SIZE 50
#define | SKIP_TOLERANCE 200
#define | FORCE_DURATION_WINDOW_SIZE 100

## Typedefs
typedef struct dxr3_decoder_class_s | dxr3_decoder_class_t
typedef struct dxr3_decoder_s | dxr3_decoder_t

## Functions
static video_decoder_t * | dxr3_open_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream)
static void | dxr3_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
static void | dxr3_reset (video_decoder_t *this_gen)
static void | dxr3_discontinuity (video_decoder_t *this_gen)
static void | dxr3_flush (video_decoder_t *this_gen)
static void | dxr3_dispose (video_decoder_t *this_gen)
static int | dxr3_mvcommand (int fd_control, int command)
static void | parse_mpeg_header (dxr3_decoder_t *this, uint8_t *buffer)
static int | get_duration (dxr3_decoder_t *this)
static void | frame_format_change (dxr3_decoder_t *this)
static void | dxr3_update_panscan (void *this_gen, xine_cfg_entry_t *entry)
static void | dxr3_update_sync_mode (void *this_gen, xine_cfg_entry_t *entry)
static void | dxr3_update_enhanced_mode (void *this_gen, xine_cfg_entry_t *entry)
static void | dxr3_update_correct_durations (void *this_gen, xine_cfg_entry_t *entry)
void * | dxr3_video_init_plugin (xine_t *xine, const void *data)

## Macro Definition Documentation

## ◆ FORCE_DURATION_WINDOW_SIZE

#define FORCE_DURATION_WINDOW_SIZE 100

## ◆ LOG_MODULE

#define LOG_MODULE "dxr3_decode_video"

## ◆ LOG_PTS

#define LOG_PTS 0

## ◆ LOG_VID

#define LOG_VID 0

## ◆ PAN_SCAN_WINDOW_SIZE

#define PAN_SCAN_WINDOW_SIZE 50

## ◆ RESYNC_WINDOW_SIZE

#define RESYNC_WINDOW_SIZE 50

## ◆ SKIP_TOLERANCE

#define SKIP_TOLERANCE 200

## Typedef Documentation

## ◆ dxr3_decoder_class_t

typedef struct dxr3_decoder_class_s dxr3_decoder_class_t

## ◆ dxr3_decoder_t

typedef struct dxr3_decoder_s dxr3_decoder_t

## Function Documentation

## ◆ dxr3_decode_data()

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

References _, vo_frame_s::bad_frame, BUF_FLAG_PREVIEW, BUF_FLAG_SPECIAL, BUF_SPECIAL_ASPECT, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, vo_frame_s::draw, vo_frame_s::duration, dxr3_flush(), dxr3_mvcommand(), dxr3_video_setpts, frame_format_change(), vo_frame_s::free, metronom_clock_s::get_current_time, get_duration(), llprintf, LOG_PTS, LOG_VID, METRONOM_ADJ_VPTS_OFFSET, MVCOMMAND_START, MVCOMMAND_SYNC, PAN_SCAN_WINDOW_SIZE, parse_mpeg_header(), buf_element_s::pts, vo_frame_s::pts, metronom_clock_s::register_scr, RESYNC_WINDOW_SIZE, buf_element_s::size, SKIP_TOLERANCE, VO_BOTH_FIELDS, VO_PAN_SCAN_FLAG, vo_frame_s::vpts, XINE_IMGFMT_DXR3, xine_open_cloexec(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dxr3_open_plugin().

## ◆ dxr3_discontinuity()

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

Referenced by dxr3_open_plugin().

## ◆ dxr3_dispose()

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

References dxr3_mvcommand(), MVCOMMAND_FLUSHBUF, and metronom_clock_s::unregister_scr.

Referenced by dxr3_open_plugin().

## ◆ dxr3_flush()

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

References _, _x_stream_info_get(), XINE_STREAM_INFO_VIDEO_HAS_STILL, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dxr3_decode_data(), and dxr3_open_plugin().

## ◆ dxr3_mvcommand()

static int dxr3_mvcommand | ( | int | fd_control,
|  | int | command
| ) |  |
| inlinestatic

References EM8300_IOCTL_WRITEREG, em8300_register_t::microcode_register, em8300_register_t::reg, and em8300_register_t::val.

Referenced by dxr3_decode_data(), and dxr3_dispose().

## ◆ dxr3_open_plugin()

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

References _, xine_s::clock, CONF_HELP, CONF_KEY, CONF_NAME, xine_s::config, dxr3_decode_data(), dxr3_discontinuity(), dxr3_dispose(), dxr3_flush(), dxr3_present(), dxr3_reset(), dxr3_update_correct_durations(), dxr3_update_enhanced_mode(), dxr3_update_panscan(), dxr3_update_sync_mode(), FORCE_DURATION_WINDOW_SIZE, llprintf, LOG_VID, xine_stream_s::metronom, METRONOM_PREBUFFER, NULL, xine_video_port_s::open, metronom_s::set_option, xine_stream_s::video_out, xine_stream_s::xine, xine_open_cloexec(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by dxr3_video_init_plugin().

## ◆ dxr3_reset()

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

Referenced by dxr3_open_plugin().

## ◆ dxr3_update_correct_durations()

static void dxr3_update_correct_durations | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::num_value.

Referenced by dxr3_open_plugin().

## ◆ dxr3_update_enhanced_mode()

static void dxr3_update_enhanced_mode | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::num_value.

Referenced by dxr3_open_plugin().

## ◆ dxr3_update_panscan()

static void dxr3_update_panscan | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::num_value.

Referenced by dxr3_open_plugin().

## ◆ dxr3_update_sync_mode()

static void dxr3_update_sync_mode | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::num_value.

Referenced by dxr3_open_plugin().

## ◆ dxr3_video_init_plugin()

void * dxr3_video_init_plugin | ( | xine_t * | xine,
|  | const void * | data
| ) |  |

References default_video_decoder_class_dispose, dxr3_open_plugin(), N_, and NULL.

## ◆ frame_format_change()

static void frame_format_change | ( | dxr3_decoder_t * | this | ) |
| static

References _x_meta_info_set_utf8(), _x_stream_info_set(), xine_format_change_data_t::aspect, xine_format_change_data_t::height, height, xine_format_change_data_t::pan_scan, xine_format_change_data_t::width, width, XINE_EVENT_FRAME_FORMAT_CHANGE, xine_event_send(), XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_RATIO, and XINE_STREAM_INFO_VIDEO_WIDTH.

Referenced by dxr3_decode_data(), and parse_mpeg_header().

## ◆ get_duration()

static int get_duration | ( | dxr3_decoder_t * | this | ) |
| static

References _, _x_stream_info_set(), FORCE_DURATION_WINDOW_SIZE, metronom_s::get_option, METRONOM_AV_OFFSET, metronom_s::set_option, XINE_STREAM_INFO_FRAME_DURATION, XINE_VERBOSITY_LOG, and xprintf.

Referenced by dxr3_decode_data().

## ◆ parse_mpeg_header()

static void parse_mpeg_header | ( | dxr3_decoder_t * | this,
|  | uint8_t * | buffer
| ) |  |
| static

References frame_format_change(), height, and width.

Referenced by dxr3_decode_data().