mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 19:37:30 +01:00
Merge svn changes up to r30917
This commit is contained in:
commit
95fba94860
90
configure
vendored
90
configure
vendored
@ -1670,12 +1670,13 @@ fi
|
||||
|
||||
def_fast_64bit='#define HAVE_FAST_64BIT 0'
|
||||
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 0'
|
||||
_arch_all='X86 X86_32 X86_64 IA64 SPARC ARM AVR32 SH4 PPC PPC64 ALPHA MIPS SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC'
|
||||
arch_all='X86 X86_32 X86_64 IA64 SPARC ARM AVR32 SH4 PPC PPC64 ALPHA MIPS SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA TOMI GENERIC'
|
||||
case "$host_arch" in
|
||||
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
|
||||
_arch='X86 X86_32'
|
||||
_target_arch="ARCH_X86 = yes"
|
||||
_target_subarch="ARCH_X86_32 = yes"
|
||||
arch='X86 X86_32'
|
||||
libavcodec_arch="x86"
|
||||
target_arch="ARCH_X86 = yes"
|
||||
target_subarch="ARCH_X86_32 = yes"
|
||||
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
|
||||
iproc=486
|
||||
proc=i486
|
||||
@ -1912,16 +1913,17 @@ EOF
|
||||
;;
|
||||
|
||||
ia64)
|
||||
_arch='IA64'
|
||||
_target_arch='ARCH_IA64 = yes'
|
||||
arch='IA64'
|
||||
target_arch='ARCH_IA64 = yes'
|
||||
def_fast_64bit='#define HAVE_FAST_64BIT 1'
|
||||
iproc='ia64'
|
||||
;;
|
||||
|
||||
x86_64|amd64)
|
||||
_arch='X86 X86_64'
|
||||
_target_subarch='ARCH_X86_64 = yes'
|
||||
_target_arch="ARCH_X86 = yes"
|
||||
arch='X86 X86_64'
|
||||
libavcodec_arch="x86"
|
||||
target_subarch='ARCH_X86_64 = yes'
|
||||
target_arch="ARCH_X86 = yes"
|
||||
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
|
||||
def_fast_64bit='#define HAVE_FAST_64BIT 1'
|
||||
iproc='x86_64'
|
||||
@ -2014,8 +2016,9 @@ EOF
|
||||
;;
|
||||
|
||||
sparc|sparc64)
|
||||
_arch='SPARC'
|
||||
_target_arch='ARCH_SPARC = yes'
|
||||
arch='SPARC'
|
||||
libavcodec_arch="sparc"
|
||||
target_arch='ARCH_SPARC = yes'
|
||||
iproc='sparc'
|
||||
if test "$host_arch" = "sparc64" ; then
|
||||
_vis='yes'
|
||||
@ -2042,35 +2045,39 @@ EOF
|
||||
;;
|
||||
|
||||
arm*)
|
||||
_arch='ARM'
|
||||
_target_arch='ARCH_ARM = yes'
|
||||
arch='ARM'
|
||||
libavcodec_arch="arm"
|
||||
target_arch='ARCH_ARM = yes'
|
||||
iproc='arm'
|
||||
;;
|
||||
|
||||
avr32)
|
||||
_arch='AVR32'
|
||||
_target_arch='ARCH_AVR32 = yes'
|
||||
arch='AVR32'
|
||||
libavcodec_arch="avr32"
|
||||
target_arch='ARCH_AVR32 = yes'
|
||||
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
|
||||
iproc='avr32'
|
||||
test $_fast_clz = "auto" && _fast_clz=yes
|
||||
;;
|
||||
|
||||
sh|sh4)
|
||||
_arch='SH4'
|
||||
_target_arch='ARCH_SH4 = yes'
|
||||
arch='SH4'
|
||||
libavcodec_arch="sh4"
|
||||
target_arch='ARCH_SH4 = yes'
|
||||
iproc='sh4'
|
||||
;;
|
||||
|
||||
ppc|ppc64|powerpc|powerpc64)
|
||||
_arch='PPC'
|
||||
arch='PPC'
|
||||
def_dcbzl='#define HAVE_DCBZL 0'
|
||||
_target_arch='ARCH_PPC = yes'
|
||||
libavcodec_arch="ppc"
|
||||
target_arch='ARCH_PPC = yes'
|
||||
def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
|
||||
iproc='ppc'
|
||||
|
||||
if test "$host_arch" = "ppc64" -o "$host_arch" = "powerpc64" ; then
|
||||
_arch='PPC PPC64'
|
||||
_target_subarch='ARCH_PPC64 = yes'
|
||||
arch='PPC PPC64'
|
||||
target_subarch='ARCH_PPC64 = yes'
|
||||
def_fast_64bit='#define HAVE_FAST_64BIT 1'
|
||||
fi
|
||||
echocheck "CPU type"
|
||||
@ -2178,8 +2185,9 @@ EOF
|
||||
;;
|
||||
|
||||
alpha*)
|
||||
_arch='ALPHA'
|
||||
_target_arch='ARCH_ALPHA = yes'
|
||||
arch='ALPHA'
|
||||
libavcodec_arch="alpha"
|
||||
target_arch='ARCH_ALPHA = yes'
|
||||
iproc='alpha'
|
||||
def_fast_64bit='#define HAVE_FAST_64BIT 1'
|
||||
|
||||
@ -2222,8 +2230,9 @@ EOF
|
||||
;;
|
||||
|
||||
mips)
|
||||
_arch='SGI_MIPS'
|
||||
_target_arch='ARCH_SGI_MIPS = yes'
|
||||
arch='SGI_MIPS'
|
||||
libavcodec_arch="mips"
|
||||
target_arch='ARCH_SGI_MIPS = yes'
|
||||
iproc='sgi-mips'
|
||||
|
||||
if irix ; then
|
||||
@ -2249,38 +2258,38 @@ EOF
|
||||
;;
|
||||
|
||||
hppa)
|
||||
_arch='PA_RISC'
|
||||
_target_arch='ARCH_PA_RISC = yes'
|
||||
arch='PA_RISC'
|
||||
target_arch='ARCH_PA_RISC = yes'
|
||||
iproc='PA-RISC'
|
||||
;;
|
||||
|
||||
s390)
|
||||
_arch='S390'
|
||||
_target_arch='ARCH_S390 = yes'
|
||||
arch='S390'
|
||||
target_arch='ARCH_S390 = yes'
|
||||
iproc='390'
|
||||
;;
|
||||
|
||||
s390x)
|
||||
_arch='S390X'
|
||||
_target_arch='ARCH_S390X = yes'
|
||||
arch='S390X'
|
||||
target_arch='ARCH_S390X = yes'
|
||||
iproc='390x'
|
||||
;;
|
||||
|
||||
vax)
|
||||
_arch='VAX'
|
||||
_target_arch='ARCH_VAX = yes'
|
||||
arch='VAX'
|
||||
target_arch='ARCH_VAX = yes'
|
||||
iproc='vax'
|
||||
;;
|
||||
|
||||
xtensa)
|
||||
_arch='XTENSA'
|
||||
_target_arch='ARCH_XTENSA = yes'
|
||||
arch='XTENSA'
|
||||
target_arch='ARCH_XTENSA = yes'
|
||||
iproc='xtensa'
|
||||
;;
|
||||
|
||||
generic)
|
||||
_arch='GENERIC'
|
||||
_target_arch='ARCH_GENERIC = yes'
|
||||
arch='GENERIC'
|
||||
target_arch='ARCH_GENERIC = yes'
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -7864,8 +7873,9 @@ TIMER = $_timer
|
||||
EXESUF = $_exesuf
|
||||
EXESUFS_ALL = .exe
|
||||
|
||||
$_target_arch
|
||||
$_target_subarch
|
||||
$target_arch
|
||||
ARCH = $libavcodec_arch
|
||||
$target_subarch
|
||||
$(echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/')
|
||||
|
||||
MENCODER = $_mencoder
|
||||
@ -8229,7 +8239,7 @@ $def_pthread_cache
|
||||
#define __CPU__ $iproc
|
||||
$def_words_endian
|
||||
$def_bigendian
|
||||
$(ff_config_enable "$_arch_all" "$_arch" "ARCH")
|
||||
$(ff_config_enable "$arch_all" "$arch" "ARCH")
|
||||
$(ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE")
|
||||
|
||||
|
||||
|
@ -4316,7 +4316,7 @@ audiocodec musepack
|
||||
format 0x2b4d
|
||||
driver mpcdec
|
||||
|
||||
audiocodec ffamrnb
|
||||
audiocodec libopencoreamrnb
|
||||
info "AMR Narrowband"
|
||||
status working
|
||||
fourcc samr
|
||||
@ -4324,7 +4324,7 @@ audiocodec ffamrnb
|
||||
driver ffmpeg
|
||||
dll "libopencore_amrnb"
|
||||
|
||||
audiocodec ffamrwb
|
||||
audiocodec libopencoreamrwb
|
||||
info "AMR Wideband"
|
||||
status working
|
||||
fourcc sawb
|
||||
|
@ -24,10 +24,4 @@
|
||||
char *get_path(const char *filename);
|
||||
void set_path_env(void);
|
||||
|
||||
#ifdef CONFIG_WIN32DLL
|
||||
extern void SetCodecPath(const char *); // in loader/drv.c
|
||||
|
||||
static char *codec_path=NULL;
|
||||
#endif
|
||||
|
||||
#endif /* MPLAYER_GET_PATH_H */
|
||||
|
@ -59,7 +59,7 @@ static HINSTANCE qtime_qts; // handle to the preloaded quicktime.qts
|
||||
static HMODULE handler;
|
||||
static OSErr (*InitializeQTML)(long flags);
|
||||
static OSErr (*EnterMovies)(void);
|
||||
static OSErr (*ExitMovies)(void);
|
||||
static void (*ExitMovies)(void);
|
||||
static OSErr (*DecompressSequenceBegin)(ImageSequence *seqID,
|
||||
ImageDescriptionHandle desc,
|
||||
CGrafPtr port,
|
||||
@ -99,9 +99,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
|
||||
|
||||
// init driver
|
||||
static int init(sh_video_t *sh){
|
||||
#ifndef CONFIG_QUICKTIME
|
||||
OSErr result = 1;
|
||||
#endif
|
||||
|
||||
if (sh->ImageDesc == NULL) {
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"sh->ImageDesc not set, cannot use binary QuickTime codecs (try -demuxer mov?)\n");
|
||||
@ -128,7 +126,7 @@ static int init(sh_video_t *sh){
|
||||
|
||||
InitializeQTML = (OSErr (*)(long))GetProcAddress(handler, "InitializeQTML");
|
||||
EnterMovies = (OSErr (*)(void))GetProcAddress(handler, "EnterMovies");
|
||||
ExitMovies = (OSErr (*)(void))GetProcAddress(handler, "ExitMovies");
|
||||
ExitMovies = (void (*)(void))GetProcAddress(handler, "ExitMovies");
|
||||
DecompressSequenceBegin = (OSErr (*)(ImageSequence*,ImageDescriptionHandle,CGrafPtr,void *,const Rect *,MatrixRecordPtr,short,RgnHandle,CodecFlags,CodecQ,DecompressorComponent))GetProcAddress(handler, "DecompressSequenceBegin");
|
||||
DecompressSequenceFrameS = (OSErr (*)(ImageSequence,Ptr,long,CodecFlags,CodecFlags*,ICMCompletionProcRecordPtr))GetProcAddress(handler, "DecompressSequenceFrameS");
|
||||
GetGWorldPixMap = (PixMapHandle (*)(GWorldPtr))GetProcAddress(handler, "GetGWorldPixMap");
|
||||
@ -241,7 +239,6 @@ static int init(sh_video_t *sh){
|
||||
|
||||
// uninit driver
|
||||
static void uninit(sh_video_t *sh){
|
||||
OSErr result;
|
||||
if(OutBufferGWorld) {
|
||||
DisposeGWorld(OutBufferGWorld);
|
||||
OutBufferGWorld = NULL;
|
||||
@ -254,8 +251,7 @@ static void uninit(sh_video_t *sh){
|
||||
CDSequenceEnd(imageSeq);
|
||||
imageSeq = 0;
|
||||
}
|
||||
result=ExitMovies();
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ExitMovies returned %d\n",result);
|
||||
ExitMovies();
|
||||
}
|
||||
|
||||
// decode a frame
|
||||
|
@ -1412,9 +1412,10 @@ static void WINAPI expInitializeCriticalSection(CRITICAL_SECTION* c)
|
||||
return;
|
||||
}
|
||||
|
||||
static void WINAPI expInitializeCriticalSectionAndSpinCount(CRITICAL_SECTION* c, DWORD spin)
|
||||
static WIN_BOOL WINAPI expInitializeCriticalSectionAndSpinCount(CRITICAL_SECTION* c, DWORD spin)
|
||||
{
|
||||
expInitializeCriticalSection(c);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void WINAPI expEnterCriticalSection(CRITICAL_SECTION* c)
|
||||
|
104
mencoder.c
104
mencoder.c
@ -65,6 +65,10 @@
|
||||
#include "mp_fifo.h"
|
||||
#include "get_path.h"
|
||||
|
||||
#ifdef CONFIG_WIN32DLL
|
||||
#include "loader/drv.h" // for SetCodecPath()
|
||||
#endif
|
||||
|
||||
#include "stream/stream.h"
|
||||
#include "libmpdemux/aviprint.h"
|
||||
#include "libmpdemux/demuxer.h"
|
||||
@ -141,12 +145,6 @@ static int out_audio_codec=-1;
|
||||
static int out_video_codec=-1;
|
||||
|
||||
int out_file_format=MUXER_TYPE_AVI; // default to AVI
|
||||
|
||||
// audio stream skip/resync functions requires only for seeking.
|
||||
// (they should be implemented in the audio codec layer)
|
||||
//void skip_audio_frame(sh_audio_t *sh_audio){}
|
||||
//void resync_audio_stream(sh_audio_t *sh_audio){}
|
||||
|
||||
int quiet=0;
|
||||
double video_time_usage=0;
|
||||
double vout_time_usage=0;
|
||||
@ -247,14 +245,6 @@ void set_osd_subtitle(struct MPContext *mpctx, subtitle *subs) {
|
||||
vo_osd_changed(OSDTYPE_SUBTITLE);
|
||||
}
|
||||
|
||||
//char *out_audio_codec=NULL; // override audio codec
|
||||
//char *out_video_codec=NULL; // override video codec
|
||||
|
||||
//#include "libmpeg2/mpeg2.h"
|
||||
//#include "libmpeg2/mpeg2_internal.h"
|
||||
|
||||
//static int vo_w=0, vo_h=0;
|
||||
|
||||
//-------------------------- config stuff:
|
||||
|
||||
m_config_t* mconfig;
|
||||
@ -279,29 +269,12 @@ typedef struct {
|
||||
int already_read;
|
||||
} s_frame_data;
|
||||
|
||||
/// Returns a_pts
|
||||
static float calc_a_pts(demux_stream_t *d_audio);
|
||||
/** \brief Seeks audio forward to pts by dumping audio packets
|
||||
\return The current audio pts.
|
||||
*/
|
||||
static float forward_audio(float pts, demux_stream_t *d_audio, muxer_stream_t* mux_a);
|
||||
/** \brief Seeks slowly by dumping frames.
|
||||
\return 1 for success, 2 for EOF.
|
||||
*/
|
||||
static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy, int print_info);
|
||||
/// Deletes audio or video as told by -delay to sync
|
||||
static void fixdelay(demux_stream_t *d_video, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy);
|
||||
|
||||
#include "edl.h"
|
||||
static edl_record_ptr edl_records = NULL; ///< EDL entries memory area
|
||||
static edl_record_ptr next_edl_record = NULL; ///< only for traversing edl_records
|
||||
static short edl_muted; ///< Stores whether EDL is currently in muted mode.
|
||||
static short edl_seeking; ///< When non-zero, stream is seekable.
|
||||
static short edl_seek_type; ///< When non-zero, frames are discarded instead of seeking.
|
||||
/** \brief Seeks for EDL
|
||||
\return 1 for success, 0 for failure, 2 for EOF.
|
||||
*/
|
||||
static int edl_seek(edl_record_ptr next_edl_record, demuxer_t* demuxer, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy);
|
||||
|
||||
#include "cfg-mencoder.h"
|
||||
|
||||
@ -358,10 +331,6 @@ static int dec_audio(sh_audio_t *sh_audio,unsigned char* buffer,int total){
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// this function returns the absoloute time for which MEncoder will switch files or move in the file.
|
||||
// so audio can be cut correctly. -1 if there is no limit.
|
||||
static float stop_time(demuxer_t* demuxer, muxer_stream_t* mux_v);
|
||||
|
||||
static volatile int at_eof=0;
|
||||
static volatile int interrupted=0;
|
||||
|
||||
@ -410,7 +379,10 @@ void add_subtitles(char *filename, float fps, int silent)
|
||||
subdata = subd;
|
||||
}
|
||||
|
||||
static float stop_time(demuxer_t* demuxer, muxer_stream_t* mux_v) {
|
||||
/* This function returns the absolute time for which MEncoder will switch files
|
||||
* or move in the file so audio can be cut correctly. -1 if there is no limit. */
|
||||
static float stop_time(demuxer_t* demuxer, muxer_stream_t* mux_v)
|
||||
{
|
||||
float timeleft = -1;
|
||||
if (play_n_frames >= 0) timeleft = mux_v->timer + play_n_frames * (double)(mux_v->h.dwScale) / mux_v->h.dwRate;
|
||||
if (end_at.type == END_AT_TIME && (timeleft > end_at.pos || timeleft == -1)) timeleft = end_at.pos;
|
||||
@ -429,7 +401,9 @@ static float stop_time(demuxer_t* demuxer, muxer_stream_t* mux_v) {
|
||||
return timeleft;
|
||||
}
|
||||
|
||||
static float calc_a_pts(demux_stream_t *d_audio) {
|
||||
/// Returns a_pts
|
||||
static float calc_a_pts(demux_stream_t *d_audio)
|
||||
{
|
||||
sh_audio_t * sh_audio = d_audio ? d_audio->sh : NULL;
|
||||
float a_pts = 0.;
|
||||
if (sh_audio)
|
||||
@ -437,7 +411,10 @@ static float calc_a_pts(demux_stream_t *d_audio) {
|
||||
return a_pts;
|
||||
}
|
||||
|
||||
static float forward_audio(float pts, demux_stream_t *d_audio, muxer_stream_t* mux_a) {
|
||||
/** \brief Seeks audio forward to pts by dumping audio packets
|
||||
* \return The current audio pts. */
|
||||
static float forward_audio(float pts, demux_stream_t *d_audio, muxer_stream_t* mux_a)
|
||||
{
|
||||
sh_audio_t * sh_audio = d_audio ? d_audio->sh : NULL;
|
||||
int samplesize, avg;
|
||||
float a_pts = calc_a_pts(d_audio);
|
||||
@ -472,7 +449,12 @@ static float forward_audio(float pts, demux_stream_t *d_audio, muxer_stream_t* m
|
||||
return a_pts;
|
||||
}
|
||||
|
||||
static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy, int print_info) {
|
||||
/** \brief Seeks slowly by dumping frames.
|
||||
* \return 1 for success, 2 for EOF. */
|
||||
static int slowseek(float end_pts, demux_stream_t *d_video,
|
||||
demux_stream_t *d_audio, muxer_stream_t *mux_a,
|
||||
s_frame_data *frame_data, int framecopy, int print_info)
|
||||
{
|
||||
sh_video_t * sh_video = d_video->sh;
|
||||
vf_instance_t * vfilter = sh_video ? sh_video->vfilter : NULL;
|
||||
int done = 0;
|
||||
@ -520,7 +502,11 @@ static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_au
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void fixdelay(demux_stream_t *d_video, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy) {
|
||||
/// Deletes audio or video as told by -delay to sync
|
||||
static void fixdelay(demux_stream_t *d_video, demux_stream_t *d_audio,
|
||||
muxer_stream_t *mux_a, s_frame_data *frame_data,
|
||||
int framecopy)
|
||||
{
|
||||
// TODO: Find a way to encode silence instead of deleting video
|
||||
sh_video_t * sh_video = d_video->sh;
|
||||
float a_pts;
|
||||
@ -541,7 +527,12 @@ static void fixdelay(demux_stream_t *d_video, demux_stream_t *d_audio, muxer_str
|
||||
slowseek(a_pts - audio_delay, d_video, d_audio, mux_a, frame_data, framecopy, 0);
|
||||
}
|
||||
|
||||
static int edl_seek(edl_record_ptr next_edl_record, demuxer_t* demuxer, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy) {
|
||||
/** \brief Seeks for EDL
|
||||
* \return 1 for success, 0 for failure, 2 for EOF. */
|
||||
static int edl_seek(edl_record_ptr next_edl_record, demuxer_t *demuxer,
|
||||
demux_stream_t *d_audio, muxer_stream_t *mux_a,
|
||||
s_frame_data *frame_data, int framecopy)
|
||||
{
|
||||
sh_video_t * sh_video = demuxer->video ? demuxer->video->sh : NULL;
|
||||
|
||||
if (!sh_video) return 0;
|
||||
@ -768,7 +759,6 @@ if(stream->type==STREAMTYPE_DVDNAV){
|
||||
|
||||
if(demuxer2) opts.audio_id=-2; /* do NOT read audio packets... */
|
||||
|
||||
//demuxer=demux_open(stream,file_format,opts.video_id,opts.audio_id,opts.sub_id);
|
||||
demuxer=demux_open(&opts, stream,file_format,opts.audio_id,opts.video_id,opts.sub_id,filename);
|
||||
if(!demuxer){
|
||||
mp_tmsg(MSGT_DEMUXER, MSGL_FATAL, FormatNotRecognized);
|
||||
@ -1516,7 +1506,6 @@ if(demuxer2){ // 3-pass encoding, read control file (frameno.avi)
|
||||
if(len==4) next_frameno=start[0];
|
||||
}
|
||||
if(at_eof) break;
|
||||
// if(skip_flag) printf("!!!!!!!!!!!!\n");
|
||||
skip_flag=next_frameno-decoded_frameno;
|
||||
// find next frame:
|
||||
while(next_frameno<=decoded_frameno){
|
||||
@ -1526,13 +1515,10 @@ if(demuxer2){ // 3-pass encoding, read control file (frameno.avi)
|
||||
if(len==0) --skip_flag; else // duplicate
|
||||
if(len==4) next_frameno=start[0];
|
||||
}
|
||||
// if(at_eof) break;
|
||||
// printf("Current fno=%d requested=%d skip=%d \n",decoded_frameno,fno,skip_flag);
|
||||
} else {
|
||||
|
||||
// check frame duplicate/drop:
|
||||
|
||||
//printf("\r### %5.3f ###\n",v_timer_corr);
|
||||
float mux_frametime = (float)mux_v->h.dwScale/mux_v->h.dwRate;
|
||||
|
||||
if (v_timer_corr >= mux_frametime && (skip_limit<0 || skip_flag < skip_limit)) {
|
||||
@ -1640,7 +1626,6 @@ if(sh_audio && !demuxer2){
|
||||
unsigned int samples=(sh_audio->audio.dwSampleSize)?
|
||||
((ds_tell(d_audio)-sh_audio->a_in_buffer_len)/sh_audio->audio.dwSampleSize) :
|
||||
(d_audio->block_no); // <- used for VBR audio
|
||||
// printf("samples=%d \n",samples);
|
||||
a_pts=samples*(float)sh_audio->audio.dwScale/(float)sh_audio->audio.dwRate;
|
||||
delay_corrected=1;
|
||||
} else
|
||||
@ -1649,7 +1634,6 @@ if(sh_audio && !demuxer2){
|
||||
// PTS = (last timestamp) + (bytes after last timestamp)/(bytes per sec)
|
||||
a_pts=d_audio->pts;
|
||||
if(!delay_corrected) if(a_pts) delay_corrected=1;
|
||||
//printf("*** %5.3f ***\n",a_pts);
|
||||
a_pts+=(ds_tell_pts(d_audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps;
|
||||
}
|
||||
v_pts=sh_video ? sh_video->pts : d_video->pts;
|
||||
@ -1674,23 +1658,6 @@ if(sh_audio && !demuxer2){
|
||||
v_pts_corr+=x;
|
||||
}
|
||||
|
||||
// printf("A:%6.1f V:%6.1f A-V:%7.3f oAV:%7.3f diff:%7.3f ct:%7.3f vpc:%7.3f \r",
|
||||
// a_pts,v_pts,a_pts-v_pts,
|
||||
// (float)(mux_a->timer-mux_v->timer),
|
||||
// AV_delay, c_total, v_pts_corr );
|
||||
// printf("V:%6.1f \r", d_video->pts );
|
||||
|
||||
#if 0
|
||||
mp_msg(MSGT_AVSYNC,MSGL_STATUS,"A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f %3d/%3d %2d%% %2d%% %4.1f%% %d%%\r",
|
||||
a_pts,v_pts,a_pts-v_pts,c_total,
|
||||
(int)sh_video->num_frames,(int)sh_video->num_frames_decoded,
|
||||
(sh_video->timer>0.5)?(int)(100.0*video_time_usage/(double)sh_video->timer):0,
|
||||
(sh_video->timer>0.5)?(int)(100.0*vout_time_usage/(double)sh_video->timer):0,
|
||||
(sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0
|
||||
,cache_fill_status
|
||||
);
|
||||
#endif
|
||||
|
||||
{ float t=(GetTimerMS()-timer_start)*0.001f;
|
||||
float len=(demuxer->movi_end-demuxer->movi_start);
|
||||
off_t pos = demuxer->filepos >= 0 ? demuxer->filepos : stream_tell(demuxer->stream);
|
||||
@ -1702,12 +1669,6 @@ if(sh_audio && !demuxer2){
|
||||
/ (float)(sh_audio->audio.dwLength);
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
mp_msg(MSGT_AVSYNC,MSGL_STATUS,"%d < %d < %d \r",
|
||||
(int)demuxer->movi_start,
|
||||
(int)demuxer->filepos,
|
||||
(int)demuxer->movi_end);
|
||||
#else
|
||||
if(!quiet) {
|
||||
if( mp_msg_test(MSGT_STATUSLINE,MSGL_V) ) {
|
||||
mp_msg(MSGT_STATUSLINE,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %3dfps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d] A/Vms %d/%d D/B/S %d/%d/%d \r",
|
||||
@ -1732,7 +1693,6 @@ if(sh_audio && !demuxer2){
|
||||
(mux_a && mux_a->timer>1) ? (int)(mux_a->size/mux_a->timer/125) : 0
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
fflush(stdout);
|
||||
|
||||
|
@ -314,3 +314,8 @@ const m_option_t noconfig_opts[] = {
|
||||
{"user", &disable_user_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL},
|
||||
{NULL, NULL, 0, 0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
#ifdef CONFIG_WIN32DLL
|
||||
char *codec_path = NULL;
|
||||
#endif
|
||||
|
||||
|
@ -39,4 +39,8 @@ void set_osd_subtitle(struct MPContext *mpctx, subtitle *subs);
|
||||
extern int disable_system_conf;
|
||||
extern int disable_user_conf;
|
||||
|
||||
#ifdef CONFIG_WIN32DLL
|
||||
extern char *codec_path;
|
||||
#endif
|
||||
|
||||
#endif /* MPLAYER_MPCOMMON_H */
|
||||
|
Loading…
Reference in New Issue
Block a user