xine-lib: xine-lib-1.2.12/src/video_dec/libjpeg.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
libjpeg.c File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/types.h>`
`#include <unistd.h>`
`#include <stdio.h>`
`#include <jpeglib.h>`
`#include <xine/xine_internal.h>`
`#include <xine/video_out.h>`
`#include <xine/buffer.h>`
`#include <xine/xine_buffer.h>`

## Data Structures
struct | jpeg_decoder_s

## Macros
#define | LOG_MODULE "jpeg_video_decoder"
#define | LOG_VERBOSE

## Typedefs
typedef struct jpeg_decoder_s | jpeg_decoder_t

## Functions
| mem_init_source (j_decompress_ptr cinfo)
| mem_fill_input_buffer (j_decompress_ptr cinfo)
| mem_skip_input_data (j_decompress_ptr cinfo, long num_bytes)
| mem_term_source (j_decompress_ptr cinfo)
static void | jpeg_memory_src (j_decompress_ptr cinfo, const JOCTET *data, size_t size)
static vo_frame_t * | _jpeg_decode_data (jpeg_decoder_t *this, const char *data, size_t size)
static void | jpeg_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
static void | jpeg_flush (video_decoder_t *this_gen)
static void | jpeg_reset (video_decoder_t *this_gen)
static void | jpeg_discontinuity (video_decoder_t *this_gen)
static void | jpeg_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_class (xine_t *xine, const void *data)

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

## Macro Definition Documentation

## ◆ LOG_MODULE

#define LOG_MODULE "jpeg_video_decoder"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Typedef Documentation

## ◆ jpeg_decoder_t

typedef struct jpeg_decoder_s jpeg_decoder_t

## Function Documentation

## ◆ _jpeg_decode_data()

static vo_frame_t * _jpeg_decode_data | ( | jpeg_decoder_t * | this,
|  | const char * | data,
|  | size_t | size
| ) |  |
| static

References _x_meta_info_set_utf8(), _x_stream_info_set(), vo_frame_s::bad_frame, vo_frame_s::base, vo_frame_s::duration, vo_frame_s::format, vo_frame_s::height, height, jpeg_memory_src(), LOG_MODULE, lprintf, NULL, vo_frame_s::pitches, vo_frame_s::proc_slice, VO_BOTH_FIELDS, VO_CAP_FULLRANGE, VO_CAP_YUY2, VO_GET_FRAME_MAY_FAIL, VO_PROP_MAX_VIDEO_HEIGHT, VO_PROP_MAX_VIDEO_WIDTH, VO_SET_FLAGS_CM, vo_frame_s::width, width, XINE_IMGFMT_YUY2, XINE_IMGFMT_YV12, XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_FRAME_DURATION, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_WIDTH, XINE_VERBOSITY_LOG, and xprintf.

Referenced by jpeg_decode_data().

## ◆ init_class()

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

References _, xine_s::config, lprintf, N_, NULL, open_plugin(), video_decoder_class_s::open_plugin, and config_values_s::register_bool.

## ◆ jpeg_decode_data()

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

References _jpeg_decode_data(), BUF_FLAG_FRAME_END, BUF_FLAG_PREVIEW, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::mem, NULL, buf_element_s::pts, buf_element_s::size, and xine_buffer_copyin.

Referenced by open_plugin().

## ◆ jpeg_discontinuity()

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

Referenced by open_plugin().

## ◆ jpeg_dispose()

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

References lprintf, NULL, and xine_buffer_free.

Referenced by open_plugin().

## ◆ jpeg_flush()

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

References NULL.

Referenced by open_plugin().

## ◆ jpeg_memory_src()

static void jpeg_memory_src | ( | j_decompress_ptr | cinfo,
|  | const JOCTET * | data,
|  | size_t | size
| ) |  |
| static

References mem_fill_input_buffer(), mem_init_source(), mem_skip_input_data(), and mem_term_source().

Referenced by _jpeg_decode_data().

## ◆ jpeg_reset()

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

References NULL.

Referenced by open_plugin().

## ◆ mem_fill_input_buffer()

mem_fill_input_buffer | ( | j_decompress_ptr | cinfo | ) |

Referenced by jpeg_memory_src(), and mem_skip_input_data().

## ◆ mem_init_source()

mem_init_source | ( | j_decompress_ptr | cinfo | ) |

Referenced by jpeg_memory_src().

## ◆ mem_skip_input_data()

mem_skip_input_data | ( | j_decompress_ptr | cinfo,
|  | long | num_bytes
| ) |  |

References mem_fill_input_buffer().

Referenced by jpeg_memory_src().

## ◆ mem_term_source()

mem_term_source | ( | j_decompress_ptr | cinfo | ) |

Referenced by jpeg_memory_src().

## ◆ open_plugin()

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

References xine_s::config, jpeg_decode_data(), jpeg_discontinuity(), jpeg_dispose(), jpeg_flush(), jpeg_reset(), config_values_s::lookup_entry, lprintf, NULL, cfg_entry_s::num_value, xine_stream_s::xine, and xine_buffer_init().

Referenced by init_class().

## Variable Documentation

## ◆ dec_info_jpeg

const decoder_info_t dec_info_jpeg
| static

Initial value:
= {
.supported_types = supported_types,
.priority = 10,
}
supported_types
static const uint32_t supported_types[]
Definition: libjpeg.c:531

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_VIDEO_DECODER, 19, "jpeg", XINE_VERSION_CODE, &dec_info_jpeg, init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_class
static void * init_class(xine_t *xine, const void *data)
Definition: libjpeg.c:499
dec_info_jpeg
static const decoder_info_t dec_info_jpeg
Definition: libjpeg.c:533
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_VIDEO_DECODER
#define PLUGIN_VIDEO_DECODER
Definition: xine_plugin.h:33

## ◆ supported_types

const uint32_t supported_types[] = { BUF_VIDEO_JPEG, 0 }
| static