mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 13:17:13 +00:00
Providing new tune info
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4454 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
61ceb9cf6d
commit
aec5dcc834
10
dec_video.c
10
dec_video.c
@ -413,8 +413,10 @@ void uninit_video(sh_video_t *sh_video){
|
|||||||
sh_video->inited=0;
|
sh_video->inited=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int init_video(sh_video_t *sh_video){
|
int init_video(sh_video_t *sh_video,int *pitches)
|
||||||
|
{
|
||||||
unsigned int out_fmt=sh_video->codec->outfmt[sh_video->outfmtidx];
|
unsigned int out_fmt=sh_video->codec->outfmt[sh_video->outfmtidx];
|
||||||
|
pitches[0] = pitches[1] =pitches[2] = 0; /* fake unknown */
|
||||||
|
|
||||||
sh_video->our_out_buffer=NULL;
|
sh_video->our_out_buffer=NULL;
|
||||||
|
|
||||||
@ -581,6 +583,9 @@ switch(sh_video->codec->driver){
|
|||||||
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoLAVCsupport);
|
mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_NoLAVCsupport);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
|
/* Just because we know that */
|
||||||
|
pitches[0] = 16;
|
||||||
|
pitches[1] = pitches[2] = 8;
|
||||||
mp_msg(MSGT_DECVIDEO,MSGL_V,"FFmpeg's libavcodec video codec\n");
|
mp_msg(MSGT_DECVIDEO,MSGL_V,"FFmpeg's libavcodec video codec\n");
|
||||||
if(!avcodec_inited){
|
if(!avcodec_inited){
|
||||||
avcodec_init();
|
avcodec_init();
|
||||||
@ -620,6 +625,9 @@ switch(sh_video->codec->driver){
|
|||||||
#else
|
#else
|
||||||
if(divx_quality) mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_MpegPPhint);
|
if(divx_quality) mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_MpegPPhint);
|
||||||
#endif
|
#endif
|
||||||
|
/* Just because we know that */
|
||||||
|
pitches[0] = 16;
|
||||||
|
pitches[1] = pitches[2] = 8;
|
||||||
// send seq header to the decoder:
|
// send seq header to the decoder:
|
||||||
mpeg2_decode_data(NULL,videobuffer,videobuffer+videobuf_len,0);
|
mpeg2_decode_data(NULL,videobuffer,videobuffer+videobuf_len,0);
|
||||||
mpeg2_allocate_image_buffers (picture);
|
mpeg2_allocate_image_buffers (picture);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// dec_video.c:
|
// dec_video.c:
|
||||||
extern int video_read_properties(sh_video_t *sh_video);
|
extern int video_read_properties(sh_video_t *sh_video);
|
||||||
|
|
||||||
extern int init_video(sh_video_t *sh_video);
|
extern int init_video(sh_video_t *sh_video, int *pitches);
|
||||||
void uninit_video(sh_video_t *sh_video);
|
void uninit_video(sh_video_t *sh_video);
|
||||||
|
|
||||||
#ifdef USE_LIBVO2
|
#ifdef USE_LIBVO2
|
||||||
|
@ -323,7 +323,7 @@ demux_stream_t *d_dvdsub=NULL;
|
|||||||
sh_audio_t *sh_audio=NULL;
|
sh_audio_t *sh_audio=NULL;
|
||||||
sh_video_t *sh_video=NULL;
|
sh_video_t *sh_video=NULL;
|
||||||
int file_format=DEMUXER_TYPE_UNKNOWN;
|
int file_format=DEMUXER_TYPE_UNKNOWN;
|
||||||
int i;
|
int i,pitches[3];
|
||||||
unsigned int out_fmt;
|
unsigned int out_fmt;
|
||||||
|
|
||||||
aviwrite_t* muxer=NULL;
|
aviwrite_t* muxer=NULL;
|
||||||
@ -569,7 +569,7 @@ if (IMGFMT_IS_BGR(out_fmt))
|
|||||||
if (IMGFMT_IS_RGB(out_fmt))
|
if (IMGFMT_IS_RGB(out_fmt))
|
||||||
vo_image_ptr = vo_image = malloc(vo_w*vo_h*IMGFMT_RGB_DEPTH(out_fmt)/8);
|
vo_image_ptr = vo_image = malloc(vo_w*vo_h*IMGFMT_RGB_DEPTH(out_fmt)/8);
|
||||||
|
|
||||||
if(!init_video(sh_video)){
|
if(!init_video(sh_video,pitches)){
|
||||||
mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec);
|
mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -477,10 +477,12 @@ int use_stdin=0; //int f; // filedes
|
|||||||
|
|
||||||
int gui_no_filename=0;
|
int gui_no_filename=0;
|
||||||
|
|
||||||
|
vo_tune_info_t vtune;
|
||||||
|
|
||||||
mp_msg_init(MSGL_STATUS);
|
mp_msg_init(MSGL_STATUS);
|
||||||
|
|
||||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s",banner_text);
|
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s",banner_text);
|
||||||
|
memset(&vtune,0,sizeof(vo_tune_info_t));
|
||||||
/* Test for cpu capabilities (and corresponding OS support) for optimizing */
|
/* Test for cpu capabilities (and corresponding OS support) for optimizing */
|
||||||
#ifdef ARCH_X86
|
#ifdef ARCH_X86
|
||||||
GetCpuCaps(&gCpuCaps);
|
GetCpuCaps(&gCpuCaps);
|
||||||
@ -1239,7 +1241,7 @@ if(flip==-1){
|
|||||||
|
|
||||||
mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug1: out_fmt=%s\n",vo_format_name(out_fmt));
|
mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug1: out_fmt=%s\n",vo_format_name(out_fmt));
|
||||||
|
|
||||||
if(!init_video(sh_video)){
|
if(!init_video(sh_video,&vtune.pitch[0])){
|
||||||
mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec);
|
mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CouldntInitVideoCodec);
|
||||||
goto goto_next_file; // exit_player(MSGTR_Exit_error);
|
goto goto_next_file; // exit_player(MSGTR_Exit_error);
|
||||||
}
|
}
|
||||||
@ -1349,7 +1351,7 @@ current_module="init_libvo";
|
|||||||
if(video_out->config(sh_video->disp_w,sh_video->disp_h,
|
if(video_out->config(sh_video->disp_w,sh_video->disp_h,
|
||||||
screen_size_x,screen_size_y,
|
screen_size_x,screen_size_y,
|
||||||
fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
|
fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
|
||||||
title,out_fmt,NULL)){
|
title,out_fmt,&vtune)){
|
||||||
#endif
|
#endif
|
||||||
mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO);
|
mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO);
|
||||||
goto goto_next_file; // exit_player(MSGTR_Exit_error);
|
goto goto_next_file; // exit_player(MSGTR_Exit_error);
|
||||||
|
Loading…
Reference in New Issue
Block a user