mirror of
https://github.com/mpv-player/mpv
synced 2025-03-30 23:38:10 +00:00
The xvmc_pixfmt_render structure was renamed to xvmc_pix_fmt in FFmpeg.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28603 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3a058c8c6a
commit
d274cbbbb5
@ -577,7 +577,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
|
||||
avctx->draw_horiz_band= NULL;
|
||||
#if CONFIG_XVMC
|
||||
if(IMGFMT_IS_XVMC(mpi->imgfmt)) {
|
||||
struct xvmc_pixfmt_render *render = mpi->priv;//same as data[2]
|
||||
struct xvmc_pix_fmt *render = mpi->priv; //same as data[2]
|
||||
avctx->draw_horiz_band= draw_slice;
|
||||
if(!avctx->xvmc_acceleration) {
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_McGetBufferShouldWorkOnlyWithXVMC);
|
||||
@ -679,7 +679,7 @@ static void release_buffer(struct AVCodecContext *avctx, AVFrame *pic){
|
||||
av_freep(&mpi->planes[1]);
|
||||
#if CONFIG_XVMC
|
||||
if (IMGFMT_IS_XVMC(mpi->imgfmt)) {
|
||||
struct xvmc_pixfmt_render *render = (struct xvmc_pixfmt_render *)pic->data[2];//same as mpi->priv
|
||||
struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)pic->data[2]; //same as mpi->priv
|
||||
if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::release_buffer (xvmc render=%p)\n", render);
|
||||
assert(render!=NULL);
|
||||
|
@ -98,13 +98,13 @@ static XvMCMacroBlockArray mv_blocks;
|
||||
#define MAX_SURFACES 8
|
||||
static int number_of_surfaces=0;
|
||||
static XvMCSurface surface_array[MAX_SURFACES];
|
||||
static struct xvmc_pixfmt_render * surface_render;
|
||||
static struct xvmc_pix_fmt *surface_render;
|
||||
|
||||
static struct xvmc_pixfmt_render * p_render_surface_to_show=NULL;
|
||||
static struct xvmc_pixfmt_render * p_render_surface_visible=NULL;
|
||||
static struct xvmc_pix_fmt *p_render_surface_to_show = NULL;
|
||||
static struct xvmc_pix_fmt *p_render_surface_visible = NULL;
|
||||
|
||||
//display queue, kinda render ahead
|
||||
static struct xvmc_pixfmt_render * show_queue[MAX_SURFACES];
|
||||
static struct xvmc_pix_fmt *show_queue[MAX_SURFACES];
|
||||
static int free_element;
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ static const struct{
|
||||
static void xvmc_free(void);
|
||||
static void xvmc_clean_surfaces(void);
|
||||
static int count_free_surfaces(void);
|
||||
static struct xvmc_pixfmt_render * find_free_surface(void);
|
||||
static struct xvmc_pix_fmt *find_free_surface(void);
|
||||
|
||||
static const vo_info_t info = {
|
||||
"XVideo Motion Compensation",
|
||||
@ -360,13 +360,13 @@ surface_found:
|
||||
}
|
||||
|
||||
static uint32_t xvmc_draw_image(mp_image_t *mpi){
|
||||
struct xvmc_pixfmt_render * rndr;
|
||||
struct xvmc_pix_fmt *rndr;
|
||||
|
||||
assert(mpi!=NULL);
|
||||
assert(mpi->flags &MP_IMGFLAG_DIRECT);
|
||||
// assert(mpi->flags &MP_IMGFLAGS_DRAWBACK);
|
||||
|
||||
rndr = (struct xvmc_pixfmt_render*)mpi->priv;//there is copy in plane[2]
|
||||
rndr = (struct xvmc_pix_fmt*)mpi->priv; //there is copy in plane[2]
|
||||
assert( rndr != NULL );
|
||||
assert( rndr->unique_id == AV_XVMC_RENDER_MAGIC );
|
||||
if( mp_msg_test(MSGT_VO,MSGL_DBG4) )
|
||||
@ -518,8 +518,8 @@ int vm = flags & VOFLAG_MODESWITCHING;
|
||||
printf("vo_xvmc: mv_blocks allocated\n");
|
||||
|
||||
if(surface_render==NULL)
|
||||
surface_render=malloc(MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));//easy mem debug
|
||||
memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));
|
||||
surface_render = malloc(MAX_SURFACES * sizeof(struct xvmc_pix_fmt)); //easy mem debug
|
||||
memset(surface_render, 0, MAX_SURFACES * sizeof(struct xvmc_pix_fmt));
|
||||
|
||||
for(i=0; i<MAX_SURFACES; i++){
|
||||
rez=XvMCCreateSurface(mDisplay,&ctx,&surface_array[i]);
|
||||
@ -840,7 +840,7 @@ int rez;
|
||||
}
|
||||
|
||||
static void draw_osd(void){
|
||||
struct xvmc_pixfmt_render * osd_rndr;
|
||||
struct xvmc_pix_fmt *osd_rndr;
|
||||
int osd_has_changed;
|
||||
int have_osd_to_draw;
|
||||
int rez;
|
||||
@ -934,7 +934,7 @@ int status,rez;
|
||||
XvMCSyncSurface(mDisplay, srf);
|
||||
}
|
||||
|
||||
static void put_xvmc_image(struct xvmc_pixfmt_render * p_render_surface,
|
||||
static void put_xvmc_image(struct xvmc_pix_fmt *p_render_surface,
|
||||
int draw_ck){
|
||||
int rez;
|
||||
struct vo_rect src_rect, dst_rect;
|
||||
@ -1055,7 +1055,7 @@ int i;
|
||||
surface_render[i].state);
|
||||
}
|
||||
|
||||
memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));//for debuging
|
||||
memset(surface_render, 0, MAX_SURFACES * sizeof(struct xvmc_pix_fmt)); //for debugging
|
||||
free(surface_render);surface_render=NULL;
|
||||
|
||||
XvMCDestroyContext(mDisplay,&ctx);
|
||||
@ -1111,13 +1111,13 @@ int mode_id;
|
||||
|
||||
static int draw_slice(uint8_t *image[], int stride[],
|
||||
int w, int h, int x, int y){
|
||||
struct xvmc_pixfmt_render * rndr;
|
||||
struct xvmc_pix_fmt *rndr;
|
||||
int rez;
|
||||
|
||||
if( mp_msg_test(MSGT_VO,MSGL_DBG4) )
|
||||
printf("vo_xvmc: draw_slice y=%d\n",y);
|
||||
|
||||
rndr = (struct xvmc_pixfmt_render*)image[2];//this is copy of priv-ate
|
||||
rndr = (struct xvmc_pix_fmt*)image[2]; //this is copy of priv-ate
|
||||
assert( rndr != NULL );
|
||||
assert( rndr->unique_id == AV_XVMC_RENDER_MAGIC );
|
||||
|
||||
@ -1171,8 +1171,8 @@ int rez;
|
||||
|
||||
//XvMCHide hides the surface on next retrace, so
|
||||
//check if the surface is not still displaying
|
||||
static void check_osd_source(struct xvmc_pixfmt_render * src_rndr){
|
||||
struct xvmc_pixfmt_render * osd_rndr;
|
||||
static void check_osd_source(struct xvmc_pix_fmt *src_rndr) {
|
||||
struct xvmc_pix_fmt *osd_rndr;
|
||||
int stat;
|
||||
//If this is source surface, check does the OSD rendering is compleate
|
||||
if(src_rndr->state & AV_XVMC_STATE_OSD_SOURCE){
|
||||
@ -1195,10 +1195,10 @@ int i,num;
|
||||
return num;
|
||||
}
|
||||
|
||||
static struct xvmc_pixfmt_render * find_free_surface(void) {
|
||||
static struct xvmc_pix_fmt *find_free_surface(void) {
|
||||
int i,t;
|
||||
int stat;
|
||||
struct xvmc_pixfmt_render * visible_rndr;
|
||||
struct xvmc_pix_fmt *visible_rndr;
|
||||
|
||||
visible_rndr = NULL;
|
||||
for(i=0; i<number_of_surfaces; i++){
|
||||
@ -1248,7 +1248,7 @@ int i;
|
||||
}
|
||||
|
||||
static uint32_t get_image(mp_image_t *mpi){
|
||||
struct xvmc_pixfmt_render * rndr;
|
||||
struct xvmc_pix_fmt *rndr;
|
||||
|
||||
rndr = find_free_surface();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user