xine-lib 1.2.11
|
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include "wine/msacm.h"
#include "wine/driver.h"
#include "wine/avifmt.h"
#include "wine/vfw.h"
#include "wine/mmreg.h"
#include "wine/ldt_keeper.h"
#include "wine/win32.h"
#include "wine/wineacm.h"
#include "wine/loader.h"
#include "DirectShow/guids.h"
#include "DirectShow/DS_AudioDecoder.h"
#include "DirectShow/DS_VideoDecoder.h"
#include "dmo/DMO_AudioDecoder.h"
#include "dmo/DMO_VideoDecoder.h"
#include <xine/xine_internal.h>
#include <xine/video_out.h>
#include <xine/audio_out.h>
#include <xine/buffer.h>
#include <xine/xineutils.h>
#include "group_w32.h"
#include "common.c"
Data Structures | |
struct | w32v_decoder_s |
struct | w32a_decoder_s |
Macros | |
#define | NOAVIFILE_HEADERS |
#define | LOG_MODULE "w32codec" |
#define | LOG_VERBOSE |
#define | VIDEOBUFSIZE 128*1024 |
#define | DRIVER_STD 0 |
#define | DRIVER_DS 1 |
#define | DRIVER_DMO 2 |
#define | MAXSAMPLE 255 |
#define | CENTERSAMPLE 128 |
#define | SCALEBITS 16 |
#define | FIX(x) ( (int32_t) ( (x) * (1<<SCALEBITS) + 0.5 ) ) |
#define | ONE_HALF ( (int32_t) (1<< (SCALEBITS-1)) ) |
#define | CBCR_OFFSET (CENTERSAMPLE << SCALEBITS) |
#define | R_Y_OFF 0 /* offset to R => Y section */ |
#define | G_Y_OFF (1*(MAXSAMPLE+1)) /* offset to G => Y section */ |
#define | B_Y_OFF (2*(MAXSAMPLE+1)) /* etc. */ |
#define | R_CB_OFF (3*(MAXSAMPLE+1)) |
#define | G_CB_OFF (4*(MAXSAMPLE+1)) |
#define | B_CB_OFF (5*(MAXSAMPLE+1)) |
#define | R_CR_OFF B_CB_OFF /* B=>Cb, R=>Cr are the same */ |
#define | G_CR_OFF (6*(MAXSAMPLE+1)) |
#define | B_CR_OFF (7*(MAXSAMPLE+1)) |
#define | TABLE_SIZE (8*(MAXSAMPLE+1)) |
#define | HAS_SLOW_MULT 1 |
#define | IMGFMT_YUY2 mmioFOURCC('Y','U','Y','2') |
#define | IMGFMT_YV12 mmioFOURCC('Y','V','1','2') |
#define | IMGFMT_32RGB mmioFOURCC( 32,'R','G','B') |
#define | IMGFMT_24RGB mmioFOURCC( 24,'R','G','B') |
#define | IMGFMT_16RGB mmioFOURCC( 16,'R','G','B') |
#define | IMGFMT_15RGB mmioFOURCC( 15,'R','G','B') |
Typedefs | |
typedef struct w32v_decoder_s | w32v_decoder_t |
typedef struct w32a_decoder_s | w32a_decoder_t |
Variables | |
static GUID | CLSID_Voxware |
static GUID | CLSID_Acelp |
static GUID | wmv1_clsid |
static GUID | wmv2_clsid |
static GUID | wmv3_clsid |
static GUID | wmvdmo_clsid |
static GUID | dvsd_clsid |
static GUID | msmpeg4_clsid |
static GUID | mss1_clsid |
static GUID | wma3_clsid |
static GUID | wmav_clsid |
static pthread_mutex_t | win32_codec_mutex |
static pthread_once_t | once_control = PTHREAD_ONCE_INIT |
static const char * | win32_codec_name |
static int32_t * | rgb_ycc_tab |
#define B_CB_OFF (5*(MAXSAMPLE+1)) |
#define B_CR_OFF (7*(MAXSAMPLE+1)) |
#define B_Y_OFF (2*(MAXSAMPLE+1)) /* etc. */ |
#define CBCR_OFFSET (CENTERSAMPLE << SCALEBITS) |
#define CENTERSAMPLE 128 |
#define DRIVER_DMO 2 |
#define DRIVER_DS 1 |
#define DRIVER_STD 0 |
#define FIX | ( | x | ) | ( (int32_t) ( (x) * (1<<SCALEBITS) + 0.5 ) ) |
#define G_CB_OFF (4*(MAXSAMPLE+1)) |
#define G_CR_OFF (6*(MAXSAMPLE+1)) |
#define G_Y_OFF (1*(MAXSAMPLE+1)) /* offset to G => Y section */ |
#define HAS_SLOW_MULT 1 |
#define IMGFMT_15RGB mmioFOURCC( 15,'R','G','B') |
#define IMGFMT_16RGB mmioFOURCC( 16,'R','G','B') |
#define IMGFMT_24RGB mmioFOURCC( 24,'R','G','B') |
#define IMGFMT_32RGB mmioFOURCC( 32,'R','G','B') |
#define IMGFMT_YUY2 mmioFOURCC('Y','U','Y','2') |
#define IMGFMT_YV12 mmioFOURCC('Y','V','1','2') |
#define LOG_MODULE "w32codec" |
#define LOG_VERBOSE |
#define MAXSAMPLE 255 |
#define NOAVIFILE_HEADERS |
#define ONE_HALF ( (int32_t) (1<< (SCALEBITS-1)) ) |
#define R_CB_OFF (3*(MAXSAMPLE+1)) |
#define R_CR_OFF B_CB_OFF /* B=>Cb, R=>Cr are the same */ |
#define R_Y_OFF 0 /* offset to R => Y section */ |
#define SCALEBITS 16 |
#define TABLE_SIZE (8*(MAXSAMPLE+1)) |
#define VIDEOBUFSIZE 128*1024 |
typedef struct w32a_decoder_s w32a_decoder_t |
typedef struct w32v_decoder_s w32v_decoder_t |
|
static |
References _x_meta_info_set_utf8(), BUF_AUDIO_ACELPNET, BUF_AUDIO_IMC, BUF_AUDIO_LH, BUF_AUDIO_MSADPCM, BUF_AUDIO_MSGSM, BUF_AUDIO_MSIMAADPCM, BUF_AUDIO_VIVOG723, BUF_AUDIO_VOXWARE, BUF_AUDIO_WMALL, BUF_AUDIO_WMAPRO, BUF_AUDIO_WMAV, BUF_AUDIO_WMAV1, BUF_AUDIO_WMAV2, buf_type, CLSID_Acelp, CLSID_Voxware, DRIVER_DMO, DRIVER_DS, DRIVER_STD, NULL, wma3_clsid, wmav_clsid, XINE_META_INFO_AUDIOCODEC, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by w32a_init_audio().
|
static |
References buf_type, BUF_VIDEO_ATIVCR2, BUF_VIDEO_CINEPAK, BUF_VIDEO_DV, BUF_VIDEO_I263, BUF_VIDEO_IV31, BUF_VIDEO_IV32, BUF_VIDEO_IV41, BUF_VIDEO_IV50, BUF_VIDEO_MSMPEG4_V1, BUF_VIDEO_MSMPEG4_V2, BUF_VIDEO_MSMPEG4_V3, BUF_VIDEO_MSS1, BUF_VIDEO_MSVC, BUF_VIDEO_TSCC, BUF_VIDEO_UCOD, BUF_VIDEO_VP31, BUF_VIDEO_VP4, BUF_VIDEO_VP5, BUF_VIDEO_VP6, BUF_VIDEO_WMV7, BUF_VIDEO_WMV8, and BUF_VIDEO_WMV9.
Referenced by w32v_decode_data().
|
static |
References _x_meta_info_set_utf8(), buf_type, BUF_VIDEO_ATIVCR2, BUF_VIDEO_CINEPAK, BUF_VIDEO_DV, BUF_VIDEO_I263, BUF_VIDEO_IV31, BUF_VIDEO_IV32, BUF_VIDEO_IV41, BUF_VIDEO_IV50, BUF_VIDEO_MSMPEG4_V1, BUF_VIDEO_MSMPEG4_V2, BUF_VIDEO_MSMPEG4_V3, BUF_VIDEO_MSS1, BUF_VIDEO_MSVC, BUF_VIDEO_TSCC, BUF_VIDEO_UCOD, BUF_VIDEO_VP31, BUF_VIDEO_VP4, BUF_VIDEO_VP5, BUF_VIDEO_VP6, BUF_VIDEO_WMV7, BUF_VIDEO_WMV8, BUF_VIDEO_WMV9, DRIVER_DMO, DRIVER_DS, DRIVER_STD, dvsd_clsid, msmpeg4_clsid, mss1_clsid, NULL, wmv1_clsid, wmv2_clsid, wmv3_clsid, wmvdmo_clsid, XINE_META_INFO_VIDEOCODEC, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by w32v_decode_data().
|
static |
References NULL, w32v_init_rgb_ycc(), and win32_codec_mutex.
Referenced by w32a_init_class(), and w32v_init_class().
|
static |
References NULL, w32a_decode_data(), w32a_discontinuity(), w32a_dispose(), and w32a_reset().
Referenced by w32a_init_class().
|
static |
References NULL, w32v_decode_data(), w32v_discontinuity(), w32v_dispose(), w32v_flush(), and w32v_reset().
Referenced by w32v_init_class().
|
static |
References DMO_AudioDecoder_Convert(), DRIVER_DMO, DRIVER_DS, DRIVER_STD, DS_AudioDecoder_Convert(), lprintf, audio_buffer_s::mem, audio_buffer_s::mem_size, audio_buffer_s::num_frames, audio_buffer_s::stream, audio_buffer_s::vpts, w32a_ensure_buffer_size(), win32_codec_mutex, xine_fast_memcpy, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by w32a_decode_data().
|
static |
References _, _x_stream_info_set(), BUF_FLAG_FRAME_END, BUF_FLAG_PREVIEW, BUF_FLAG_STDHEADER, buf_element_s::content, buf_element_s::decoder_flags, lprintf, buf_element_s::pts, buf_element_s::size, buf_element_s::type, w32a_decode_audio(), w32a_ensure_buffer_size(), w32a_init_audio(), win32_codec_mutex, win32_codec_name, xine_log(), XINE_LOG_MSG, and XINE_STREAM_INFO_AUDIO_HANDLED.
Referenced by open_audio_decoder_plugin().
|
static |
Referenced by open_audio_decoder_plugin().
|
static |
References DMO_AudioDecoder_Destroy(), DRIVER_DMO, DRIVER_DS, DRIVER_STD, DS_AudioDecoder_Destroy(), NULL, and win32_codec_mutex.
Referenced by open_audio_decoder_plugin().
|
static |
References XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by w32a_decode_audio(), and w32a_decode_data().
|
static |
References _, _x_ao_channels2mode(), DMO_AudioDecoder_GetSrcSize(), DMO_AudioDecoder_Open(), DRIVER_DMO, DRIVER_DS, DRIVER_STD, DS_AudioDecoder_GetSrcSize(), DS_AudioDecoder_Open(), get_auds_codec_name(), audio_buffer_s::mem_size, NULL, audio_buffer_s::num_frames, audio_buffer_s::stream, audio_buffer_s::vpts, win32_codec_name, xine_log(), XINE_LOG_MSG, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by w32a_decode_data().
void * w32a_init_class | ( | xine_t * | xine, |
const void * | data | ||
) |
|
static |
Referenced by open_audio_decoder_plugin().
|
static |
References _, _x_message(), _x_stream_info_set(), B_CB_OFF, B_CR_OFF, B_Y_OFF, vo_frame_s::bad_frame, vo_frame_s::base, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_KEYFRAME, BUF_FLAG_PREVIEW, BUF_FLAG_STDHEADER, BUF_VIDEO_IV32, CBCR_OFFSET, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, DMO_VideoDecoder_DecodeInternal(), vo_frame_s::draw, DRIVER_DMO, DRIVER_DS, DRIVER_STD, DS_VideoDecoder_DecodeInternal(), vo_frame_s::duration, FIX, vo_frame_s::free, G_CB_OFF, G_CR_OFF, G_Y_OFF, get_vids_codec_n_name(), get_vids_codec_name(), IMGFMT_YUY2, lprintf, NULL, ONE_HALF, vo_frame_s::pitches, buf_element_s::pts, vo_frame_s::pts, R_CB_OFF, R_CR_OFF, R_Y_OFF, rgb_ycc_tab, SCALEBITS, buf_element_s::size, buf_element_s::type, VO_BOTH_FIELDS, w32v_init_codec(), w32v_init_ds_dmo_codec(), win32_codec_mutex, win32_codec_name, xine_fast_memcpy, xine_log(), XINE_LOG_MSG, XINE_MSG_LIBRARY_LOAD_ERROR, XINE_STREAM_INFO_FRAME_DURATION, XINE_STREAM_INFO_VIDEO_HANDLED, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_WIDTH, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by open_video_decoder_plugin().
|
static |
Referenced by open_video_decoder_plugin().
|
static |
References DMO_VideoDecoder_Destroy(), DRIVER_DMO, DRIVER_DS, DRIVER_STD, DS_VideoDecoder_Destroy(), NULL, and win32_codec_mutex.
Referenced by open_video_decoder_plugin().
|
static |
Referenced by open_video_decoder_plugin().
void * w32v_init_class | ( | xine_t * | xine, |
const void * | data | ||
) |
|
static |
References _, buf_type, IMGFMT_15RGB, IMGFMT_YUY2, lprintf, mmioFOURCC, VIDEOBUFSIZE, VO_CAP_YUY2, win32_codec_name, xine_log(), XINE_LOG_MSG, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by w32v_decode_data().
|
static |
References _, buf_type, BUF_VIDEO_DV, DMO_VideoDecoder_Open(), DMO_VideoDecoder_SetDestFmt(), DMO_VideoDecoder_StartInternal(), DRIVER_DS, DS_VideoDecoder_Open(), DS_VideoDecoder_SetDestFmt(), DS_VideoDecoder_StartInternal(), IMGFMT_15RGB, IMGFMT_YUY2, mmioFOURCC, VIDEOBUFSIZE, VO_CAP_YUY2, win32_codec_name, xine_log(), XINE_LOG_MSG, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by w32v_decode_data().
|
static |
References B_CB_OFF, B_CR_OFF, B_Y_OFF, CBCR_OFFSET, FIX, G_CB_OFF, G_CR_OFF, G_Y_OFF, MAXSAMPLE, ONE_HALF, R_CB_OFF, R_Y_OFF, rgb_ycc_tab, and TABLE_SIZE.
Referenced by init_routine().
|
static |
References DRIVER_DS, DRIVER_STD, and win32_codec_mutex.
Referenced by open_video_decoder_plugin().
|
static |
Referenced by get_auds_codec_name().
|
static |
Referenced by get_auds_codec_name().
|
static |
Referenced by get_vids_codec_name().
|
static |
Referenced by get_vids_codec_name().
|
static |
Referenced by get_vids_codec_name().
|
static |
Referenced by w32a_init_class(), and w32v_init_class().
|
static |
Referenced by w32v_decode_data(), and w32v_init_rgb_ycc().
|
static |
Referenced by init_routine(), w32a_decode_audio(), w32a_decode_data(), w32a_dispose(), w32v_decode_data(), w32v_dispose(), and w32v_reset().
|
static |
Referenced by w32a_decode_data(), w32a_init_audio(), w32v_decode_data(), w32v_init_codec(), and w32v_init_ds_dmo_codec().
|
static |
Referenced by get_auds_codec_name().
|
static |
Referenced by get_auds_codec_name().
|
static |
Referenced by get_vids_codec_name().
|
static |
Referenced by get_vids_codec_name().
|
static |
Referenced by get_vids_codec_name().
|
static |
Referenced by get_vids_codec_name().