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

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions | Variables
xine_mpeg2new_decoder.c File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <inttypes.h>`
`#include <assert.h>`
`#include "./include/mpeg2.h"`
`#include <xine/xine_internal.h>`
`#include <xine/video_out.h>`
`#include <xine/buffer.h>`

## Data Structures
struct | img_state_t
struct | mpeg2_video_decoder_s

## Macros
#define | _x_abort() do {} while (0)

## Typedefs
typedef struct mpeg2_video_decoder_s | mpeg2_video_decoder_t

## Functions
static void | mpeg2_video_print_bad_state (img_state_t *img_state)
static void | mpeg2_video_free_all (img_state_t *img_state)
static void | mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *buf_element)
static void | mpeg2_video_flush (video_decoder_t *this_gen)
static void | mpeg2_video_reset (video_decoder_t *this_gen)
static void | mpeg2_video_discontinuity (video_decoder_t *this_gen)
static void | mpeg2_video_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_plugin (xine_t *xine, const void *data)

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

## Macro Definition Documentation

## ◆ _x_abort

#define _x_abort | ( |  | ) | do {} while (0)

Referenced by buffer_pool_free(), mpeg2_video_decode_data(), mpeg2_video_reset(), pgx32_gui_data_exchange(), pgx32_update_frame_format(), pgx64_gui_data_exchange(), pgx64_update_frame_format(), qta_init_driver(), and xxmc_do_update_frame().

## Typedef Documentation

## ◆ mpeg2_video_decoder_t

typedef struct mpeg2_video_decoder_s mpeg2_video_decoder_t

## Function Documentation

## ◆ init_plugin()

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

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

## ◆ mpeg2_video_decode_data()

static void mpeg2_video_decode_data | ( | video_decoder_t * | this_gen,
|  | buf_element_t * | buf_element )
| static

References _x_abort, _x_meta_info_set_utf8(), _x_stream_info_set(), vo_frame_s::base, BUF_FLAG_SPECIAL, BUF_SPECIAL_ASPECT, mpeg2_sequence_s::byte_rate, buf_element_s::content, mpeg2_info_s::current_fbuf, mpeg2_info_s::current_picture, buf_element_s::decoder_flags, buf_element_s::decoder_info, mpeg2_info_s::discard_fbuf, mpeg2_info_s::display_fbuf, vo_frame_s::draw, vo_frame_s::duration, mpeg2_picture_s::flags, mpeg2_sequence_s::flags, mpeg2_sequence_s::frame_period, vo_frame_s::free, img_state_t::id, mpeg2_fbuf_s::id, vo_frame_s::id, img_state_t::img, mpeg2_buffer(), mpeg2_info(), mpeg2_parse(), mpeg2_set_buf(), mpeg2_video_print_bad_state(), mpeg2_picture_s::nb_fields, PIC_FLAG_TOP_FIELD_FIRST, mpeg2_sequence_s::picture_height, mpeg2_sequence_s::picture_width, mpeg2_sequence_s::pixel_width, buf_element_s::pts, vo_frame_s::pts, vo_frame_s::repeat_first_field, SEQ_FLAG_MPEG2, mpeg2_info_s::sequence, buf_element_s::size, STATE_BUFFER, STATE_END, STATE_GOP, STATE_PICTURE, STATE_SEQUENCE, STATE_SLICE, vo_frame_s::top_field_first, VO_BOTH_FIELDS, VO_BOTTOM_FIELD, VO_TOP_FIELD, XINE_IMGFMT_YV12, XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_FRAME_DURATION, XINE_STREAM_INFO_VIDEO_BITRATE, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_RATIO, and XINE_STREAM_INFO_VIDEO_WIDTH.

Referenced by open_plugin().

## ◆ mpeg2_video_discontinuity()

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

Referenced by open_plugin().

## ◆ mpeg2_video_dispose()

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

References mpeg2_close().

Referenced by open_plugin().

## ◆ mpeg2_video_flush()

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

Referenced by open_plugin().

## ◆ mpeg2_video_free_all()

static void mpeg2_video_free_all | ( | img_state_t * | img_state | ) |
| static

References vo_frame_s::free, img_state_t::id, and img_state_t::img.

Referenced by mpeg2_video_reset().

## ◆ mpeg2_video_print_bad_state()

static void mpeg2_video_print_bad_state | ( | img_state_t * | img_state | ) |
| inlinestatic

Referenced by mpeg2_video_decode_data().

## ◆ mpeg2_video_reset()

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

References _x_abort, mpeg2_info_s::discard_fbuf, mpeg2_info_s::display_fbuf, vo_frame_s::draw, vo_frame_s::free, mpeg2_fbuf_s::id, vo_frame_s::id, mpeg2_info(), mpeg2_parse(), mpeg2_reset(), and mpeg2_video_free_all().

Referenced by open_plugin().

## ◆ open_plugin()

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

References mpeg2_custom_fbuf(), mpeg2_init(), mpeg2_video_decode_data(), mpeg2_video_discontinuity(), mpeg2_video_dispose(), mpeg2_video_flush(), mpeg2_video_reset(), xine_video_port_s::open, and xine_stream_s::video_out.

Referenced by init_plugin().

## Variable Documentation

## ◆ dec_info_mpeg2

const decoder_info_t dec_info_mpeg2
| static

Initial value:
= {
.supported_types = supported_types,
.priority = 6,
}
supported_types
static const uint32_t supported_types[]
Definition xine_mpeg2new_decoder.c:495

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_VIDEO_DECODER, 19, "mpeg2new", XINE_VERSION_CODE, &dec_info_mpeg2, init_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition xine_mpeg2new_decoder.c:480
dec_info_mpeg2
static const decoder_info_t dec_info_mpeg2
Definition xine_mpeg2new_decoder.c:497
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_MPEG, 0 }
| static