mirror of https://github.com/mpv-player/mpv
spudec_new has a dvd_priv_t as an argument, which is defined in
libmpdemux/stream.h only if USE_DVDREAD is defined. (Arpi) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3181 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4376937df6
commit
b7ff737901
|
@ -273,10 +273,11 @@ inline static void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,in
|
|||
}
|
||||
|
||||
void *vo_spudec=NULL;
|
||||
|
||||
#ifdef USE_DVDREAD
|
||||
inline static void vo_draw_spudec(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
|
||||
spudec_draw(vo_spudec, draw_alpha);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int draw_alpha_init_flag=0;
|
||||
|
||||
|
@ -302,10 +303,11 @@ void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h,
|
|||
if(vo_osd_progbar_type>=0 && vo_font->font[OSD_PB_0]>=0){
|
||||
vo_draw_text_progbar(dxs,dys,draw_alpha);
|
||||
}
|
||||
|
||||
#ifdef USE_DVDREAD
|
||||
if(vo_spudec){
|
||||
vo_draw_spudec(dxs,dys,draw_alpha);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,9 @@ extern void* mDisplay; // Display* mDisplay;
|
|||
#include "codec-cfg.h"
|
||||
|
||||
#include "dvdauth.h"
|
||||
#ifdef USE_DVDREAD
|
||||
#include "spudec.h"
|
||||
#endif
|
||||
|
||||
#include "linux/getch2.h"
|
||||
#include "linux/keycodes.h"
|
||||
|
@ -256,11 +258,13 @@ static unsigned int inited_flags=0;
|
|||
|
||||
void uninit_player(unsigned int mask){
|
||||
mask=inited_flags&mask;
|
||||
#ifdef USE_DVDREAD
|
||||
if (mask&INITED_SPUDEC){
|
||||
inited_flags&=~INITED_SPUDEC;
|
||||
current_module="uninit_spudec";
|
||||
spudec_free(vo_spudec);
|
||||
}
|
||||
#endif
|
||||
if(mask&INITED_VO){
|
||||
inited_flags&=~INITED_VO;
|
||||
current_module="uninit_vo";
|
||||
|
@ -779,10 +783,12 @@ play_next_file:
|
|||
inited_flags|=INITED_STREAM;
|
||||
stream->start_pos+=seek_to_byte;
|
||||
|
||||
#ifdef USE_DVDREAD
|
||||
current_module="spudec";
|
||||
vo_spudec=spudec_new(stream->priv);
|
||||
if (vo_spudec!=NULL)
|
||||
inited_flags|=INITED_SPUDEC;
|
||||
#endif
|
||||
current_module=NULL;
|
||||
|
||||
if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024);
|
||||
|
@ -2039,6 +2045,8 @@ if(rel_seek_secs || abs_seek_pos){
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef USE_DVDREAD
|
||||
// DVD sub:
|
||||
if(vo_spudec){
|
||||
unsigned char* packet=NULL;
|
||||
|
@ -2056,6 +2064,7 @@ if(rel_seek_secs || abs_seek_pos){
|
|||
}
|
||||
current_module=NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // while(!eof)
|
||||
|
||||
|
|
5
spudec.c
5
spudec.c
|
@ -11,6 +11,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifdef USE_DVDREAD
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -318,3 +320,6 @@ void spudec_free(void *this)
|
|||
free(spu);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* USE_DVDREAD */
|
||||
|
||||
|
|
Loading…
Reference in New Issue