1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-20 18:28:01 +00:00

Merge svn changes up to r30643

This commit is contained in:
Uoti Urpala 2010-03-10 00:00:06 +02:00
commit c37f09693d
57 changed files with 483 additions and 171 deletions

View File

@ -10100,8 +10100,15 @@ This is not recommended and wastes bitrate as scenecuts encoded as P-frames
are just as big as I-frames, but do not reset the "keyint counter".
.
.TP
.B (no)intra_refresh
Periodic intra block refresh instead of keyframes (default: disabled).
This option disables IDR-frames, and, instead, uses a moving vertical bar
of intra-coded blocks. This reduces compression efficiency but benefits
low-latency streaming and resilience to packet loss.
.
.TP
.B frameref=<1\-16>
Number of previous frames used as predictors in B- and P-frames (default: 1).
Number of previous frames used as predictors in B- and P-frames (default: 3).
This is effective in anime, but in live-action material the improvements
usually drop off very rapidly above 6 or so reference frames.
This has no effect on decoding speed, but does increase the memory needed for
@ -10110,7 +10117,7 @@ Some decoders can only handle a maximum of 15 reference frames.
.
.TP
.B bframes=<0\-16>
maximum number of consecutive B-frames between I- and P-frames (default: 0)
maximum number of consecutive B-frames between I- and P-frames (default: 3)
.
.TP
.B (no)b_adapt
@ -10186,6 +10193,20 @@ maximum value by which the quantizer may be incremented/decremented between
frames (default: 4)
.
.TP
.B (no)mbtree
Enable macroblock tree ratecontrol (default: enabled).
Use a large lookahead to track temporal propagation of data and weight quality
accordingly.
In multi-pass mode, this writes to a separate stats file named
<passlogfile>.mbtree.
.
.TP
.B rc_lookahead=<0\-250>
Adjust the mbtree lookahead distance (default: 40).
Larger values will be slower and cause x264 to consume more memory, but can
yield higher quality.
.
.TP
.B ratetol=<0.1\-100.0> (ABR or two pass)
allowed variance in average bitrate (no particular units) (default: 1.0)
.
@ -10278,6 +10299,20 @@ direct_pred=none is both slower and lower quality.
.RE
.
.TP
.B weightp
Weighted P-frame prediction mode (default: 2).
.PD 0
.RSs
.IPs 0
disabled (fastest)
.IPs 1
blind mode (slightly better quality)
.IPs 2
smart mode (best)
.RE
.PD 1
.
.TP
.B (no)weight_b
Use weighted prediction in B-frames.
Without this option, bidirectionally predicted macroblocks give
@ -10381,9 +10416,9 @@ SATD metric, rather than reusing vectors from the forward and backward
searches.
.IPs 6
Enables rate-distortion optimization of macroblock types in
I- and P-frames (default).
I- and P-frames.
.IPs 7
Enables rate-distortion optimization of macroblock types in all frames.
Enables rate-distortion optimization of macroblock types in all frames (default).
.IPs 8
Enables rate-distortion optimization of motion vectors and intra prediction modes in I- and P-frames.
.IPs 9
@ -10414,9 +10449,9 @@ rate-distortion optimal quantization
.PD 0
.RSs
.IPs 0
disabled (default)
disabled
.IPs 1
enabled only for the final encode
enabled only for the final encode (default)
.IPs 2
enabled during all mode decisions (slow, requires subq>=6)
.RE
@ -10435,6 +10470,11 @@ trellis (requires trellis, experimental) (default: 0.0)
.PD 1
.
.TP
.B (no)psy
Enable psychovisual optimizations that hurt PSNR and SSIM but ought to look
better (default: enabled).
.
.TP
.B deadzone_inter=<0\-32>
Set the size of the inter luma quantization deadzone for non-trellis
quantization (default: 21).
@ -10566,12 +10606,43 @@ and you have a need to set it.
.
.TP
.B threads=<0\-16>
Spawn threads to encode in parallel on multiple CPUs (default: 1).
Spawn threads to encode in parallel on multiple CPUs (default: 0).
This has a slight penalty to compression quality.
0 or 'auto' tells x264 to detect how many CPUs you have and pick an
appropriate number of threads.
.
.TP
.B (no)sliced_threads
Use slice-based threading (default: disabled).
Unlike normal threading, this option adds no encoding latency, but is slightly
slower and less effective at compression.
.
.TP
.B slice_max_size=<0 or positive integer>
Maximum slice size in bytes (default:0).
A value of zero disables the maximum.
.
.TP
.B slice_max_mbs=<0 or positive integer>
Maximum slice size in number of macroblocks (default:0).
A value of zero disables the maximum.
.
.TP
.B slices=<0 or positive integer>
Maximum number of slices per frame (default:0).
A value of zero disables the maximum.
.
.TP
.B sync_lookahead=<0\-250>
Adjusts the size of the threaded lookahead buffer (default: 0).
0 or 'auto' tells x264 to automatically determine buffer size.
.
.TP
.B (no)deterministic
Use only deterministic optimizations with multithreaded encoding (default:
enabled).
.
.TP
.B (no)global_header
Causes SPS and PPS to appear only once, at the beginning of the bitstream
(default: disabled).
@ -10583,6 +10654,16 @@ The default behavior causes SPS and PPS to repeat prior to each IDR frame.
Treat the video content as interlaced.
.
.TP
.B (no)constrained_intra
Enable constrained intra prediction (default: disabled).
This significantly reduces compression, but is required for the base layer of
SVC encodes.
.
.TP
.B (no)aud
Write access unit delimeters to the stream (default: disabled).
.
.TP
.B log=<\-1\-3>
Adjust the amount of logging info printed to the screen.
.PD 0
@ -10624,6 +10705,11 @@ If the x264 on your system supports it, a new window will be opened during
the encoding process, in which x264 will attempt to present an overview of
how each frame gets encoded.
Each block type on the visualized movie will be colored as follows:
.
.TP
.B dump_yuv=<file name>
Dump YUV frames to the specified file.
For debugging use.
.PD 0
.RSs
.IPs red/pink

View File

@ -34,7 +34,7 @@
////// List utils
void
static void
asx_list_add(void* list_ptr,void* entry){
void** list = *(void***)list_ptr;
int c = 0;
@ -51,7 +51,7 @@ asx_list_add(void* list_ptr,void* entry){
}
void
static void
asx_list_remove(void* list_ptr,void* entry,ASX_FreeFunc free_func) {
void** list = *(void***)list_ptr;
int c,e = -1;

View File

@ -26,8 +26,6 @@
#include "cfg-common.h"
extern int sws_flags;
int readPPOpt(void *, char *arg);
void revertPPOpt(void *conf, char* opt);
extern char *pp_help;
extern m_option_t lameopts_conf[];

View File

@ -26,6 +26,7 @@
#include <stddef.h>
#include "cfg-common.h"
#include "libvo/vo_zr.h"
#include "options.h"
extern char *fb_mode_cfgfile;
@ -52,14 +53,9 @@ extern int menu_fribidi_flip_commas;
extern char *unrar_executable;
int vo_zr_parseoption(const m_option_t* conf, char *opt, char * param);
void vo_zr_revertoption(const m_option_t* opt,char* pram);
extern m_option_t dxr2_opts[];
extern int sws_flags;
int readPPOpt(void *conf, char *arg);
void revertPPOpt(void *conf, char* opt);
extern char* pp_help;
const m_option_t vd_conf[]={

View File

@ -4031,6 +4031,13 @@ audiocodec ffwmapro
driver ffmpeg
dll "wmapro"
audiocodec ffwmavoice
info "WMA Voice audio (FFmpeg)"
status untested
format 0xA
driver ffmpeg
dll "wmavoice"
audiocodec ffmac3
info "Macintosh Audio Compression and Expansion 3:1"
status untested

View File

@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "mp_msg.h"
#include "get_path.h"

View File

@ -120,7 +120,8 @@ static int control(int cmd,void *arg){
}
// SDL Callback function
static void outputaudio(void *unused, Uint8 *stream, int len) {
static void outputaudio(void *unused, Uint8 *stream, int len)
{
//SDL_MixAudio(stream, read_buffer(buffers, len), len, SDL_MIX_MAXVOLUME);
//if(!full_buffers) printf("SDL: Buffer underrun!\n");

View File

@ -96,7 +96,8 @@ static menu_cmd_bindings_t *cmd_bindings = NULL;
static int cmd_bindings_num = 0;
static menu_cmd_bindings_t *get_cmd_bindings(const char *name) {
static menu_cmd_bindings_t *get_cmd_bindings(const char *name)
{
int i;
for (i = 0; i < cmd_bindings_num; ++i)
if (!strcasecmp(cmd_bindings[i].name, name))
@ -735,7 +736,8 @@ int menu_text_num_lines(char* txt, int max_width) {
return l;
}
static char* menu_text_get_next_line(char* txt, int max_width) {
static char* menu_text_get_next_line(char* txt, int max_width)
{
int i = 0;
render_txt(txt);
while (*txt) {

View File

@ -23,7 +23,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "libmpdemux/aviprint.h"
#include "loader/wineacm.h"
#include "ad_internal.h"
@ -56,8 +56,6 @@ static int init(sh_audio_t *sh_audio)
return 1;
}
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
static int preinit(sh_audio_t *sh_audio)
{
HRESULT ret;

View File

@ -96,7 +96,6 @@ static int init(sh_audio_t *sh)
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: codecdata extracted from WAVEFORMATEX\n");
}
if(!sh->codecdata_len) {
#if 1
faacDecConfigurationPtr faac_conf;
/* Set the default object type and samplerate */
/* This is useful for RAW AAC files */
@ -125,7 +124,6 @@ static int init(sh_audio_t *sh)
//faac_conf->defObjectType = LTP; // => MAIN, LC, SSR, LTP available.
faacDecSetConfiguration(faac_hdec, faac_conf);
#endif
sh->a_in_buffer_len = demux_read_data(sh->ds, sh->a_in_buffer, sh->a_in_buffer_size);
pos = aac_probe(sh->a_in_buffer, sh->a_in_buffer_len);

View File

@ -118,7 +118,6 @@ static int loader_init(void)
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"failed loading qtmlClient.dll\n" );
return 1;
}
#if 1
InitializeQTML = (LPFUNC1)GetProcAddress(qtml_dll,"InitializeQTML");
if ( InitializeQTML == NULL )
{
@ -173,7 +172,6 @@ static int loader_init(void)
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"failed getting proc address SoundConverterBeginConversion\n");
return 1;
}
#endif
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"loader_init DONE???\n");
return 0;
}
@ -207,7 +205,6 @@ static int preinit(sh_audio_t *sh){
}
#endif
#if 1
OutputFormatInfo.flags = InputFormatInfo.flags = 0;
OutputFormatInfo.sampleCount = InputFormatInfo.sampleCount = 0;
OutputFormatInfo.buffer = InputFormatInfo.buffer = NULL;
@ -257,8 +254,6 @@ static int preinit(sh_audio_t *sh){
sh->i_bps=sh->wf->nAvgBytesPerSec;
//InputBufferSize*WantedBufferSize/OutputBufferSize;
#endif
if(sh->format==0x3343414D){
// MACE 3:1
sh->ds->ss_div = 2*3; // 1 samples/packet

View File

@ -23,6 +23,7 @@
#include "ad_internal.h"
#include "vqf.h"
#include "libmpdemux/aviprint.h"
#include "loader/ldt_keeper.h"
#include "loader/wine/windef.h"
#include "libaf/af_format.h"
@ -106,7 +107,6 @@ static int load_dll( char *libname )
TvqGetNumFixedBitsPerFrame;
}
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
static int init_vqf_audio_codec(sh_audio_t *sh_audio){
WAVEFORMATEX *in_fmt=sh_audio->wf;
vqf_priv_t*priv=sh_audio->context;

View File

@ -952,7 +952,6 @@ static void render2text(tt_page* pt,FILE* f,int colored){
color=-1;bkg=-1;
fprintf(f,"|\n");
}
#if 1
//for debug
fprintf(f,"+====================raw=================+\n");
for(i=0;i<VBI_ROWS;i++){
@ -966,7 +965,6 @@ static void render2text(tt_page* pt,FILE* f,int colored){
fprintf(f,"%02x ",dp[i*VBI_COLUMNS+j].lng);
fprintf(f,"\n");
}
#endif
fprintf(f,"+========================================+\n");
}

View File

@ -410,6 +410,7 @@ static void draw_slice(struct AVCodecContext *s,
int y, int type, int height){
sh_video_t *sh = s->opaque;
uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]};
int strides[MP_MAX_PLANES] = {src->linesize[0], src->linesize[1], src->linesize[2]};
#if 0
int start=0, i;
int width= s->width;
@ -433,8 +434,19 @@ static void draw_slice(struct AVCodecContext *s,
}
}else
#endif
if (height < 0)
{
int i;
height = -height;
y -= height;
for (i = 0; i < MP_MAX_PLANES; i++)
{
strides[i] = -strides[i];
source[i] -= strides[i];
}
}
if (y < sh->disp_h) {
mpcodecs_draw_slice (sh, source, src->linesize, sh->disp_w, (y+height)<=sh->disp_h?height:sh->disp_h-y, 0, y);
mpcodecs_draw_slice (sh, source, strides, sh->disp_w, (y+height)<=sh->disp_h?height:sh->disp_h-y, 0, y);
}
}

View File

@ -24,7 +24,7 @@
#include "help_mp.h"
#include "vd_internal.h"
#include "libmpdemux/aviprint.h"
#include "loader/wine/driver.h"
#include "loader/wine/vfw.h"
@ -127,7 +127,6 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
case VDCTRL_SET_PP_LEVEL:
vfw_set_postproc(sh,10*(*((int*)arg)));
return CONTROL_OK;
#if 1
// FIXME: make this optional...
case VDCTRL_QUERY_FORMAT:
{
@ -147,13 +146,10 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
}
return CONTROL_TRUE;
}
#endif
}
return CONTROL_UNKNOWN;
}
void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
// init driver
static int init(sh_video_t *sh){
HRESULT ret;
@ -230,7 +226,6 @@ static int init(sh_video_t *sh){
priv->o_bih->biCompression = 0;
// sanity check:
#if 1
#ifdef BUILD_VFWEX
ret = ICDecompressQueryEx(priv->handle, sh->bih, priv->o_bih);
#else
@ -242,7 +237,6 @@ static int init(sh_video_t *sh){
// return 0;
} else
mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressQuery OK\n");
#endif
#ifdef BUILD_VFWEX
ret = ICDecompressBeginEx(priv->handle, sh->bih, priv->o_bih);

View File

@ -96,7 +96,6 @@ static BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, char *compdatafile, BI
}
mp_msg(MSGT_WIN32,MSGL_INFO,"HIC: %x\n", encoder_hic);
#if 1
{
ICINFO icinfo;
@ -118,7 +117,6 @@ if (icinfo.dwFlags & VIDCF_QUALITYTIME)
mp_msg(MSGT_WIN32,MSGL_INFO," temp-quality");
mp_msg(MSGT_WIN32,MSGL_INFO,"\n");
}
#endif
if(compdatafile){
if (!strncmp(compdatafile, "dialog", 6)){

View File

@ -287,13 +287,11 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){
mpi->type, mpi->flags,
FFMAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x),
FFMAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y));
#if 1
if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) &&
!(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){
mp_tmsg(MSGT_VFILTER, MSGL_INFO, "Full DR not possible, trying SLICES instead!\n");
return;
}
#endif
// set up mpi as a cropped-down image of dmpi:
if(mpi->flags&MP_IMGFLAG_PLANAR){
mpi->planes[0]=vf->dmpi->planes[0]+

View File

@ -19,6 +19,7 @@
*/
#include <stdint.h>
#include "aac_hdr.h"
/// \param srate (out) sample rate
/// \param num (out) number of audio frames in this ADTS frame

26
libmpdemux/aac_hdr.h Normal file
View File

@ -0,0 +1,26 @@
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_AAC_HDR_H
#define MPLAYER_AAC_HDR_H
#include <stdint.h>
int aac_parse_frame(uint8_t *buf, int *srate, int *num);
#endif /* MPLAYER_AAC_HDR_H */

View File

@ -29,12 +29,13 @@
#include "help_mp.h"
#include "stream/stream.h"
#include "aviprint.h"
#include "demuxer.h"
#include "stheader.h"
#include "asf.h"
#include "asfguid.h"
#include "asfheader.h"
typedef struct {
// must be 0 for metadata record, might be non-zero for metadata lib record
@ -135,10 +136,6 @@ int asf_check_header(demuxer_t *demuxer){
return DEMUXER_TYPE_ASF;
}
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
static int get_ext_stream_properties(char *buf, int buf_len, int stream_num, struct asf_priv* asf, int is_video)
{
int pos=0;

28
libmpdemux/asfheader.h Normal file
View File

@ -0,0 +1,28 @@
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_ASFHEADER_H
#define MPLAYER_ASFHEADER_H
#include "asf.h"
#include "demuxer.h"
int asf_check_header(demuxer_t *demuxer);
int read_asf_header(demuxer_t *demuxer, struct asf_priv *asf);
#endif /* MPLAYER_ASFHEADER_H */

View File

@ -28,22 +28,12 @@
#include "stream/stream.h"
#include "demuxer.h"
#include "stheader.h"
#include "aviprint.h"
#include "aviheader.h"
#include "libavutil/common.h"
static MainAVIHeader avih;
void print_avih(MainAVIHeader *h, int verbose_level);
void print_avih_flags(MainAVIHeader *h, int verbose_level);
void print_strh(AVIStreamHeader *h, int verbose_level);
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
void print_index(AVIINDEXENTRY *idx,int idx_size, int verbose_level);
void print_avistdindex_chunk(avistdindex_chunk *h, int verbose_level);
void print_avisuperindex_chunk(avisuperindex_chunk *h, int verbose_level);
void print_vprp(VideoPropHeader *vprp, int verbose_level);
static int odml_get_vstream_id(int id, unsigned char res[])
{
unsigned char *p = (unsigned char *)&id;
@ -59,7 +49,8 @@ static int odml_get_vstream_id(int id, unsigned char res[])
return 0;
}
static int avi_idx_cmp(const void *elem1,const void *elem2) {
static int avi_idx_cmp(const void *elem1, const void *elem2)
{
register off_t a = AVI_IDX_OFFSET((AVIINDEXENTRY *)elem1);
register off_t b = AVI_IDX_OFFSET((AVIINDEXENTRY *)elem2);
return (a > b) - (b > a);

View File

@ -24,6 +24,7 @@
#include "config.h" /* get correct definition of HAVE_BIGENDIAN */
#include "libavutil/common.h"
#include "mpbswap.h"
#include "demuxer.h"
#ifndef mmioFOURCC
#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
@ -374,4 +375,6 @@ typedef struct {
#define AVI_IDX_OFFSET(x) ((((uint64_t)(x)->dwFlags&0xffff0000)<<16)+(x)->dwChunkOffset)
void read_avi_header(demuxer_t *demuxer, int index_mode);
#endif /* MPLAYER_AVIHEADER_H */

View File

@ -29,6 +29,7 @@
#include "aviheader.h"
#include "ms_hdr.h"
#include "aviprint.h"
//#include "codec-cfg.h"
//#include "stheader.h"

34
libmpdemux/aviprint.h Normal file
View File

@ -0,0 +1,34 @@
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_AVIPRINT_H
#define MPLAYER_AVIPRINT_H
#include "ms_hdr.h"
#include "aviheader.h"
void print_avih_flags(MainAVIHeader *h, int verbose_level);
void print_avih(MainAVIHeader *h, int verbose_level);
void print_strh(AVIStreamHeader *h, int verbose_level);
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
void print_index(AVIINDEXENTRY *idx, int idx_size, int verbose_level);
void print_avistdindex_chunk(avistdindex_chunk *h, int verbose_level);
void print_avisuperindex_chunk(avisuperindex_chunk *h, int verbose_level);
#endif /* MPLAYER_AVIPRINT_H */

View File

@ -28,7 +28,7 @@
#include "demuxer.h"
#include "parse_es.h"
#include "stheader.h"
#include "aac_hdr.h"
#include "ms_hdr.h"
typedef struct {
@ -39,12 +39,6 @@ typedef struct {
int bitrate; /// bitrate computed as size/time
} aac_priv_t;
/// \param srate (out) sample rate
/// \param num (out) number of audio frames in this ADTS frame
/// \return size of the ADTS frame in bytes
/// aac_parse_frames needs a buffer at least 8 bytes long
int aac_parse_frame(uint8_t *buf, int *srate, int *num);
static int demux_aac_init(demuxer_t *demuxer)
{
aac_priv_t *priv;

View File

@ -30,16 +30,12 @@
#include "stream/stream.h"
#include "asf.h"
#include "asfheader.h"
#include "demuxer.h"
#include "libmpcodecs/dec_audio.h"
#include "libvo/fastmemcpy.h"
#include "ffmpeg_files/intreadwrite.h"
// defined at asfheader.c:
int asf_check_header(demuxer_t *demuxer);
int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf);
// based on asf file-format doc by Eugene [http://divx.euro.ru]
/**
@ -550,8 +546,6 @@ static int demux_asf_fill_buffer(demuxer_t *demux, demux_stream_t *ds){
#include "stheader.h"
void skip_audio_frame(sh_audio_t *sh_audio);
static void demux_seek_asf(demuxer_t *demuxer,float rel_seek_secs,float audio_delay,int flags){
struct asf_priv* asf = demuxer->priv;
demux_stream_t *d_audio=demuxer->audio;

View File

@ -23,6 +23,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "stream/stream.h"
#include "aviprint.h"
#include "demuxer.h"
#include "stheader.h"
#include "genres.h"
@ -62,8 +63,6 @@ typedef struct mp3_hdr {
struct mp3_hdr *next;
} mp3_hdr_t;
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
int hr_mp3_seek = 0;
/**

View File

@ -30,12 +30,9 @@
#include "stream/stream.h"
#include "demuxer.h"
#include "stheader.h"
#include "demux_ogg.h"
#include "aviheader.h"
demuxer_t* init_avi_with_ogg(demuxer_t* demuxer);
int demux_ogg_open(demuxer_t* demuxer);
extern const demuxer_desc_t demuxer_desc_avi_ni;
extern const demuxer_desc_t demuxer_desc_avi_nini;
@ -43,7 +40,7 @@ extern const demuxer_desc_t demuxer_desc_avi_nini;
int pts_from_bps=1;
// Select ds from ID
static demux_stream_t* demux_avi_select_stream(demuxer_t *demux,
static demux_stream_t *demux_avi_select_stream(demuxer_t *demux,
unsigned int id)
{
int stream_id=avi_stream_id(id);
@ -308,7 +305,8 @@ do{
// return value:
// 0 = EOF or no stream found
// 1 = successfully read a packet
static int demux_avi_fill_buffer_ni(demuxer_t *demux,demux_stream_t* ds){
static int demux_avi_fill_buffer_ni(demuxer_t *demux, demux_stream_t *ds)
{
avi_priv_t *priv=demux->priv;
unsigned int id=0;
unsigned int len;
@ -376,7 +374,8 @@ do{
// return value:
// 0 = EOF or no stream found
// 1 = successfully read a packet
static int demux_avi_fill_buffer_nini(demuxer_t *demux,demux_stream_t* ds){
static int demux_avi_fill_buffer_nini(demuxer_t *demux, demux_stream_t *ds)
{
avi_priv_t *priv=demux->priv;
unsigned int id=0;
unsigned int len;
@ -432,8 +431,6 @@ int index_mode=-1; // -1=untouched 0=don't use index 1=use (generate) index
char *index_file_save = NULL, *index_file_load = NULL;
int force_ni=0; // force non-interleaved AVI parsing
void read_avi_header(demuxer_t *demuxer,int index_mode);
static demuxer_t* demux_open_avi(demuxer_t* demuxer){
demux_stream_t *d_audio=demuxer->audio;
demux_stream_t *d_video=demuxer->video;
@ -592,7 +589,9 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){
}
static void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,float audio_delay,int flags){
static void demux_seek_avi(demuxer_t *demuxer, float rel_seek_secs,
float audio_delay, int flags)
{
avi_priv_t *priv=demuxer->priv;
demux_stream_t *d_audio=demuxer->audio;
demux_stream_t *d_video=demuxer->video;
@ -765,7 +764,8 @@ static void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,float audio_de
}
static void demux_close_avi(demuxer_t *demuxer) {
static void demux_close_avi(demuxer_t *demuxer)
{
avi_priv_t* priv=demuxer->priv;
if(!priv)

View File

@ -47,7 +47,8 @@ typedef struct {
#ifndef CONFIG_GIF_TVT_HACK
// not supported by certain versions of the library
int my_read_gif(GifFileType *gif, uint8_t *buf, int len) {
static int my_read_gif(GifFileType *gif, uint8_t *buf, int len)
{
return stream_read(gif->UserData, buf, len);
}
#endif

View File

@ -31,6 +31,7 @@
#include "av_opts.h"
#include "stream/stream.h"
#include "aviprint.h"
#include "demuxer.h"
#include "stheader.h"
#include "m_option.h"
@ -79,9 +80,6 @@ typedef struct lavf_priv_t{
int cur_program;
}lavf_priv_t;
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
static int mp_read(void *opaque, uint8_t *buf, int size) {
stream_t *stream = opaque;
int ret;

View File

@ -36,6 +36,7 @@
#include "stheader.h"
#include "ebml.h"
#include "matroska.h"
#include "demux_real.h"
#include "mp_msg.h"
#include "help_mp.h"
@ -1886,10 +1887,6 @@ static void handle_subtitles(demuxer_t *demuxer, mkv_track_t *track,
ds_add_packet(demuxer->sub, dp);
}
double real_fix_timestamp(unsigned char *buf, unsigned int timestamp,
unsigned int format, int64_t *kf_base, int *kf_pts,
double *pts);
static void handle_realvideo(demuxer_t *demuxer, mkv_track_t *track,
uint8_t *buffer, uint32_t size, int block_bref)
{

View File

@ -67,6 +67,7 @@
#include "libvo/sub.h"
#include "demux_mov.h"
#include "qtpalette.h"
#include "parse_mp4.h" // .MP4 specific stuff

24
libmpdemux/demux_mov.h Normal file
View File

@ -0,0 +1,24 @@
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_DEMUX_MOV_H
#define MPLAYER_DEMUX_MOV_H
unsigned int store_ughvlc(unsigned char *s, unsigned int v);
#endif /* MPLAYER_DEMUX_MOV_H */

View File

@ -815,7 +815,8 @@ static int demux_mpg_gxf_fill_buffer(demuxer_t *demux, demux_stream_t *ds) {
return 1;
}
static int demux_mpg_fill_buffer(demuxer_t *demux, demux_stream_t *ds){
static int demux_mpg_fill_buffer(demuxer_t *demux, demux_stream_t *ds)
{
unsigned int head=0;
int skipped=0;
int max_packs=256; // 512kbyte
@ -824,11 +825,9 @@ int ret=0;
// System stream
do{
demux->filepos=stream_tell(demux->stream);
#if 1
//lame workaround: this is needed to show the progress bar when playing dvdnav://
//(ths poor guy doesn't know teh length of the stream at startup)
demux->movi_end = demux->stream->end_pos;
#endif
head=stream_read_dword(demux->stream);
if((head&0xFFFFFF00)!=0x100){
// sync...
@ -902,7 +901,9 @@ do{
void skip_audio_frame(sh_audio_t *sh_audio);
static void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,float audio_delay, int flags){
static void demux_seek_mpg(demuxer_t *demuxer, float rel_seek_secs,
float audio_delay, int flags)
{
demux_stream_t *d_audio=demuxer->audio;
demux_stream_t *d_video=demuxer->video;
sh_audio_t *sh_audio=d_audio->sh;
@ -1008,7 +1009,8 @@ static void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,float audio_de
}
}
static int demux_mpg_control(demuxer_t *demuxer,int cmd, void *arg){
static int demux_mpg_control(demuxer_t *demuxer, int cmd, void *arg)
{
mpg_demuxer_t *mpg_d=(mpg_demuxer_t*)demuxer->priv;
switch(cmd) {

View File

@ -32,6 +32,9 @@
#include "demuxer.h"
#include "stheader.h"
#include "ffmpeg_files/intreadwrite.h"
#include "aviprint.h"
#include "demux_mov.h"
#include "demux_ogg.h"
#define FOURCC_VORBIS mmioFOURCC('v', 'r', 'b', 's')
#define FOURCC_SPEEX mmioFOURCC('s', 'p', 'x', ' ')
@ -177,7 +180,8 @@ extern char *dvdsub_lang, *audio_lang;
static subtitle ogg_sub;
//FILE* subout;
static void demux_ogg_add_sub (ogg_stream_t* os,ogg_packet* pack) {
static void demux_ogg_add_sub(ogg_stream_t *os, ogg_packet *pack)
{
int lcv;
char *packet = pack->packet;
@ -365,7 +369,32 @@ static int demux_ogg_check_lang(const char *clang, const char *langlist)
return 0;
}
static int demux_ogg_sub_reverse_id(demuxer_t *demuxer, int id);
/** \brief Change the current subtitle stream and return its ID.
\param demuxer The demuxer whose subtitle stream will be changed.
\param new_num The number of the new subtitle track. The number must be
between 0 and ogg_d->n_text - 1.
\returns The Ogg stream number ( = page serial number) of the newly selected
track.
*/
static int demux_ogg_sub_id(demuxer_t *demuxer, int index)
{
ogg_demuxer_t *ogg_d = demuxer->priv;
return (index < 0) ? index : (index >= ogg_d->n_text) ? -1 : ogg_d->text_ids[index];
}
/** \brief Translate the ogg track number into the subtitle number.
* \param demuxer The demuxer about whose subtitles we are inquiring.
* \param id The ogg track number of the subtitle track.
*/
static int demux_ogg_sub_reverse_id(demuxer_t *demuxer, int id) {
ogg_demuxer_t *ogg_d = demuxer->priv;
int i;
for (i = 0; i < ogg_d->n_text; i++)
if (ogg_d->text_ids[i] == id) return i;
return -1;
}
/// Try to print out comments and also check for LANGUAGE= tag
static void demux_ogg_check_comments(demuxer_t *d, ogg_stream_t *os, int id, vorbis_comment *vc)
@ -513,7 +542,8 @@ static int demux_ogg_add_packet(demux_stream_t* ds,ogg_stream_t* os,int id,ogg_p
/// if -forceidx build a table of all syncpoints to make seeking easier
/// otherwise try to get at least the final_granulepos
static void demux_ogg_scan_stream(demuxer_t* demuxer) {
static void demux_ogg_scan_stream(demuxer_t *demuxer)
{
ogg_demuxer_t* ogg_d = demuxer->priv;
stream_t *s = demuxer->stream;
ogg_sync_state* sync = &ogg_d->sync;
@ -635,40 +665,6 @@ static void demux_ogg_scan_stream(demuxer_t* demuxer) {
}
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
/* defined in demux_mov.c */
unsigned int store_ughvlc(unsigned char *s, unsigned int v);
/** \brief Change the current subtitle stream and return its ID.
\param demuxer The demuxer whose subtitle stream will be changed.
\param new_num The number of the new subtitle track. The number must be
between 0 and ogg_d->n_text - 1.
\returns The Ogg stream number ( = page serial number) of the newly selected
track.
*/
int demux_ogg_sub_id(demuxer_t *demuxer, int index) {
ogg_demuxer_t *ogg_d = demuxer->priv;
return (index < 0) ? index : (index >= ogg_d->n_text) ? -1 : ogg_d->text_ids[index];
}
/** \brief Translate the ogg track number into the subtitle number.
* \param demuxer The demuxer about whose subtitles we are inquiring.
* \param id The ogg track number of the subtitle track.
*/
static int demux_ogg_sub_reverse_id(demuxer_t *demuxer, int id) {
ogg_demuxer_t *ogg_d = demuxer->priv;
int i;
for (i = 0; i < ogg_d->n_text; i++)
if (ogg_d->text_ids[i] == id) return i;
return -1;
}
static void demux_close_ogg(demuxer_t* demuxer);
static void fixup_vorbis_wf(sh_audio_t *sh, ogg_demuxer_t *od)
{
int i, offset;

27
libmpdemux/demux_ogg.h Normal file
View File

@ -0,0 +1,27 @@
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_DEMUX_OGG_H
#define MPLAYER_DEMUX_OGG_H
#include "demuxer.h"
int demux_ogg_open(demuxer_t *demuxer);
demuxer_t *init_avi_with_ogg(demuxer_t *demuxer);
#endif /* MPLAYER_DEMUX_OGG_H */

View File

@ -45,8 +45,10 @@
#include "mpbswap.h"
#include "stream/stream.h"
#include "aviprint.h"
#include "demuxer.h"
#include "stheader.h"
#include "demux_real.h"
//#define mp_dbg(mod,lev, args... ) mp_msg_c((mod<<8)|lev, ## args )
@ -495,7 +497,6 @@ double real_fix_timestamp(unsigned char *buf, unsigned int timestamp, unsigned i
int pict_type;
unsigned int orig_kf;
#if 1
if(format==mmioFOURCC('R','V','3','0') || format==mmioFOURCC('R','V','4','0')){
if(format==mmioFOURCC('R','V','3','0')){
SKIP_BITS(3);
@ -530,7 +531,6 @@ double real_fix_timestamp(unsigned char *buf, unsigned int timestamp, unsigned i
}
mp_msg(MSGT_DEMUX, MSGL_DBG2,"\nTS: %08X -> %08X (%04X) %d %02X %02X %02X %02X %5u\n",timestamp,kf,orig_kf,pict_type,s[0],s[1],s[2],s[3],pts?kf-(unsigned int)(*pts*1000.0):0);
}
#endif
v_pts=kf*0.001f;
// if(pts && (v_pts<*pts || !kf)) v_pts=*pts+frametime;
if(pts) *pts=v_pts;
@ -1090,8 +1090,6 @@ discard:
return 0;
}
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
static demuxer_t* demux_open_real(demuxer_t* demuxer)
{
real_priv_t* priv = demuxer->priv;

28
libmpdemux/demux_real.h Normal file
View File

@ -0,0 +1,28 @@
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_DEMUX_REAL_H
#define MPLAYER_DEMUX_REAL_H
#include <stdint.h>
double real_fix_timestamp(unsigned char *buf, unsigned int timestamp,
unsigned int format, int64_t *kf_base,
int *kf_pts, double *pts);
#endif /* MPLAYER_DEMUX_REAL_H */

View File

@ -28,6 +28,7 @@
#include "help_mp.h"
#include "stream/stream.h"
#include "aviprint.h"
#include "demuxer.h"
#include "stheader.h"
@ -157,10 +158,6 @@ static int demux_ra_fill_buffer(demuxer_t *demuxer, demux_stream_t *dsds)
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
static demuxer_t* demux_open_ra(demuxer_t* demuxer)
{
ra_priv_t* ra_priv = demuxer->priv;

View File

@ -34,9 +34,9 @@
#include "demuxer.h"
#include "parse_es.h"
#include "stheader.h"
#include "ms_hdr.h"
#include "mpeg_hdr.h"
#include "demux_ts.h"
#define TS_PH_PACKET_SIZE 192
#define TS_FEC_PACKET_SIZE 204
@ -1115,7 +1115,6 @@ static void demux_close_ts(demuxer_t * demuxer)
}
unsigned char mp_getbits(unsigned char*, unsigned int, unsigned char);
#define getbits mp_getbits
static int mp4_parse_sl_packet(pmt_t *pmt, uint8_t *buf, uint16_t packet_len, int pid, ES_stream_t *pes_es)

26
libmpdemux/demux_ts.h Normal file
View File

@ -0,0 +1,26 @@
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_DEMUX_TS_H
#define MPLAYER_DEMUX_TS_H
#include <stdint.h>
int mp_a52_framesize(uint8_t *buf, int *srate);
#endif /* MPLAYER_DEMUX_TS_H */

View File

@ -41,6 +41,7 @@
#include "stream/stream.h"
#include "demuxer.h"
#include "demux_ty_osd.h"
#include "parse_es.h"
#include "stheader.h"
#include "sub_cc.h"
@ -105,7 +106,6 @@ typedef struct
} TiVoInfo;
off_t vstream_streamsize( );
void ty_ClearOSD( int start );
// ===========================================================================
#define TMF_SIG "showing.xml"

View File

@ -26,6 +26,7 @@
//#include "subreader.h"
#include "sub_cc.h"
#include "libvo/sub.h"
#include "demux_ty_osd.h"
//#include "dvdauth.h"

25
libmpdemux/demux_ty_osd.h Normal file
View File

@ -0,0 +1,25 @@
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_DEMUX_TY_OSD_H
#define MPLAYER_DEMUX_TY_OSD_H
void ty_ClearOSD(int start);
void ty_processuserdata(unsigned char *buf, int len);
#endif /* MPLAYER_DEMUX_TY_OSD_H */

View File

@ -432,12 +432,6 @@ char* demux_info_get(demuxer_t *demuxer, const char *opt);
int demux_info_print(demuxer_t *demuxer);
int demux_control(demuxer_t *demuxer, int cmd, void *arg);
#ifdef CONFIG_OGGVORBIS
/* Found in demux_ogg.c */
int demux_ogg_num_subs(demuxer_t *demuxer);
int demux_ogg_sub_id(demuxer_t *demuxer, int index);
#endif
int demuxer_get_current_time(demuxer_t *demuxer);
double demuxer_get_time_length(demuxer_t *demuxer);
int demuxer_get_percent_pos(demuxer_t *demuxer);

View File

@ -65,13 +65,11 @@ int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* srate, int* spf, int*
// printf("head=0x%08X\n",newhead);
#if 1
// head_check:
if( (newhead & 0xffe00000) != 0xffe00000 ){
mp_msg(MSGT_DEMUXER,MSGL_DBG2,"head_check failed\n");
return -1;
}
#endif
layer = 4-((newhead>>17)&3);
if(layer==4){

View File

@ -48,4 +48,6 @@ void mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer);
int h264_parse_sps(mp_mpeg_header_t * picture, unsigned char * buf, int len);
int mp_vc1_decode_sequence_header(mp_mpeg_header_t * picture, unsigned char * buf, int len);
unsigned char mp_getbits(unsigned char *buffer, unsigned int from, unsigned char len);
#endif /* MPLAYER_MPEG_HDR_H */

View File

@ -19,6 +19,8 @@
#ifndef MPLAYER_MS_HDR_H
#define MPLAYER_MS_HDR_H
#include "config.h"
#ifndef _WAVEFORMATEX_
#define _WAVEFORMATEX_
typedef struct __attribute__((__packed__)) _WAVEFORMATEX {

View File

@ -32,8 +32,10 @@
#include "stream/stream.h"
#include "muxer.h"
#include "demuxer.h"
#include "demux_ts.h"
#include "stheader.h"
#include "m_option.h"
#include "aac_hdr.h"
#include "mpeg_hdr.h"
#include "mp3_hdr.h"
#include "liba52/a52.h"
@ -231,8 +233,6 @@ m_option_t mpegopts_conf[] = {
{NULL, NULL, 0, 0, 0, 0, NULL}
};
int mp_a52_framesize(uint8_t *buf, int *srate);
static void fix_audio_sys_header(muxer_priv_t *priv, uint8_t id, uint8_t newid, uint32_t size)
{
uint8_t i;
@ -2067,8 +2067,6 @@ static int analyze_mpa(muxer_stream_t *s)
return layer; //actual layer with the highest score
}
int aac_parse_frame(uint8_t *buf, int *srate, int *num);
static int parse_audio(muxer_stream_t *s, int finalize, unsigned int *nf, double *timer, double delay, int drop)
{
int i, j, len, chans, srate, spf, layer, dummy, tot, num, frm_idx;

View File

@ -33,7 +33,8 @@
#define MP4_DL MSGL_V
#define freereturn(a,b) free(a); return b
static int mp4_read_descr_len(stream_t *s) {
static int mp4_read_descr_len(stream_t *s)
{
uint8_t b;
uint8_t numBytes = 0;
uint32_t length = 0;

View File

@ -33,6 +33,7 @@
#include "stream/stream.h"
#include "demuxer.h"
#include "demux_ty_osd.h"
#include "stheader.h"
#include "parse_es.h"
#include "mpeg_hdr.h"
@ -405,8 +406,6 @@ mpeg_header_parser:
return 1;
}
void ty_processuserdata( unsigned char* buf, int len );
static void process_userdata(unsigned char* buf,int len){
int i;
/* if the user data starts with "CC", assume it is a CC info packet */

View File

@ -41,8 +41,8 @@
#include "mp_msg.h"
#include "m_option.h"
#include "fastmemcpy.h"
#include "jpeg_enc.h"
#include "vo_zr.h"
static const vo_info_t info =
{

29
libvo/vo_zr.h Normal file
View File

@ -0,0 +1,29 @@
/*
* playback on Zoran cards
*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_VO_ZR_H
#define MPLAYER_VO_ZR_H
#include "m_option.h"
int vo_zr_parseoption(const m_option_t *conf, const char *opt, const char *param);
void vo_zr_revertoption(const m_option_t *opt, const char *param);
#endif /* MPLAYER_VO_ZR_H */

View File

@ -29,9 +29,9 @@ struct DMO_AudioDecoder
#include <stdlib.h>
#include "mp_msg.h"
#include "libmpdemux/aviprint.h"
typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**);
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf,int out_channels)
//DMO_AudioDecoder * DMO_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf)

View File

@ -596,6 +596,19 @@ static HMODULE WINAPI expGetModuleHandleA(const char* name)
return result;
}
static HMODULE WINAPI expGetModuleHandleW(const uint16_t* name)
{
char aname[256];
int pos = 0;
while (*name) {
if (*name > 256 || pos >= sizeof(aname) - 1)
return NULL;
aname[pos++] = *name++;
}
aname[pos] = 0;
return expGetModuleHandleA(aname);
}
static void* WINAPI expCreateThread(void* pSecAttr, long dwStackSize,
void* lpStartAddress, void* lpParameter,
long dwFlags, long* dwThreadId)
@ -1335,6 +1348,11 @@ static void WINAPI expInitializeCriticalSection(CRITICAL_SECTION* c)
return;
}
static void WINAPI expInitializeCriticalSectionAndSpinCount(CRITICAL_SECTION* c, DWORD spin)
{
expInitializeCriticalSection(c);
}
static void WINAPI expEnterCriticalSection(CRITICAL_SECTION* c)
{
#ifdef CRITSECS_NEWTYPE
@ -4971,6 +4989,7 @@ struct exports exp_kernel32[]=
FF(VirtualAlloc, -1)
FF(VirtualFree, -1)
FF(InitializeCriticalSection, -1)
FF(InitializeCriticalSectionAndSpinCount, -1)
FF(EnterCriticalSection, -1)
FF(LeaveCriticalSection, -1)
FF(DeleteCriticalSection, -1)
@ -5030,6 +5049,7 @@ struct exports exp_kernel32[]=
FF(UnmapViewOfFile, -1)
FF(Sleep, -1)
FF(GetModuleHandleA, -1)
FF(GetModuleHandleW, -1)
FF(GetProfileIntA, -1)
FF(GetPrivateProfileIntA, -1)
FF(GetPrivateProfileStringA, -1)
@ -5516,7 +5536,7 @@ void* LookupExternal(const char* library, int ordinal)
no_dll:
if(pos>150)return 0;
sprintf(export_names[pos], "%s:%d", library, ordinal);
snprintf(export_names[pos], sizeof(export_names[pos]), "%s:%d", library, ordinal);
return add_stub();
}
@ -5583,7 +5603,7 @@ void* LookupExternalByName(const char* library, const char* name)
no_dll_byname:
if(pos>150)return 0;// to many symbols
strcpy(export_names[pos], name);
snprintf(export_names[pos], sizeof(export_names[pos]), "%s", name);
return add_stub();
}

View File

@ -67,6 +67,7 @@
#include "get_path.h"
#include "stream/stream.h"
#include "libmpdemux/aviprint.h"
#include "libmpdemux/demuxer.h"
#include "libmpdemux/stheader.h"
#include "libmpdemux/mp3_hdr.h"
@ -374,8 +375,6 @@ static void exit_sighandler(int x){
static muxer_t* muxer=NULL;
void print_wave_header(WAVEFORMATEX *h, int verbose_level);
int main(int argc,char* argv[]){
stream_t* stream=NULL;