changeset 28548:6951e68ddb34

Reflect the change of xvmc struct name.
author iive
date Sun, 15 Feb 2009 08:46:18 +0000
parents 251985a9ad7e
children 319cce8f6022
files libmpcodecs/vd_ffmpeg.c libvo/vo_xvmc.c
diffstat 2 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sun Feb 15 08:12:12 2009 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sun Feb 15 08:46:18 2009 +0000
@@ -876,7 +876,7 @@
     sh_video_t *sh = avctx->opaque;
     vd_ffmpeg_ctx *ctx = sh->context;
     mp_image_t *mpi=NULL;
-    struct xvmc_render_state *render;
+    struct xvmc_pixfmt_render *render;
     int flags= MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE|
                MP_IMGFLAG_DRAW_CALLBACK;
 
@@ -955,7 +955,7 @@
 
     pic->type= FF_BUFFER_TYPE_USER;
 
-    render=(struct xvmc_render_state *)mpi->priv;//same as data[2]
+    render=(struct xvmc_pixfmt_render *)mpi->priv;//same as data[2]
     if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
         mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::mc_get_buffer (render=%p)\n", render);
     assert(render != 0);
@@ -969,7 +969,7 @@
     mp_image_t *mpi= pic->opaque;
     sh_video_t *sh = avctx->opaque;
     vd_ffmpeg_ctx *ctx = sh->context;
-    struct xvmc_render_state *render;
+    struct xvmc_pixfmt_render *render;
     int i;
 
 
@@ -982,7 +982,7 @@
 
 //printf("R%X %X\n", pic->linesize[0], pic->data[0]);
 //mark the surface as not requared for prediction
-    render=(struct xvmc_render_state *)pic->data[2];//same as mpi->priv
+    render=(struct xvmc_pixfmt_render *)pic->data[2];//same as mpi->priv
     if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
         mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::mc_release_buffer (render=%p)\n", render);
     assert(render!=NULL);
--- a/libvo/vo_xvmc.c	Sun Feb 15 08:12:12 2009 +0000
+++ b/libvo/vo_xvmc.c	Sun Feb 15 08:46:18 2009 +0000
@@ -101,13 +101,13 @@
 #define MAX_SURFACES 8
 static int number_of_surfaces=0;
 static XvMCSurface surface_array[MAX_SURFACES];
-static struct xvmc_render_state * surface_render;
+static struct xvmc_pixfmt_render * surface_render;
 
-static struct xvmc_render_state * p_render_surface_to_show=NULL;
-static struct xvmc_render_state * p_render_surface_visible=NULL;
+static struct xvmc_pixfmt_render * p_render_surface_to_show=NULL;
+static struct xvmc_pixfmt_render * p_render_surface_visible=NULL;
 
 //display queue, kinda render ahead
-static struct xvmc_render_state * show_queue[MAX_SURFACES];
+static struct xvmc_pixfmt_render * show_queue[MAX_SURFACES];
 static int free_element;
 
 
@@ -135,7 +135,7 @@
 static void xvmc_free(void);
 static void xvmc_clean_surfaces(void);
 static int count_free_surfaces(void);
-static struct xvmc_render_state * find_free_surface(void);
+static struct xvmc_pixfmt_render * find_free_surface(void);
 
 static const vo_info_t info = {
   "XVideo Motion Compensation",
@@ -363,13 +363,13 @@
 }
 
 static uint32_t xvmc_draw_image(mp_image_t *mpi){
-   struct xvmc_render_state * rndr;
+   struct xvmc_pixfmt_render * rndr;
 
    assert(mpi!=NULL);
    assert(mpi->flags &MP_IMGFLAG_DIRECT);
 //   assert(mpi->flags &MP_IMGFLAGS_DRAWBACK);
 
-   rndr = (struct xvmc_render_state*)mpi->priv;//there is copy in plane[2]
+   rndr = (struct xvmc_pixfmt_render*)mpi->priv;//there is copy in plane[2]
    assert( rndr != NULL );
    assert( rndr->magic_id == AV_XVMC_RENDER_MAGIC );
    if( mp_msg_test(MSGT_VO,MSGL_DBG4) )
@@ -521,8 +521,8 @@
    printf("vo_xvmc: mv_blocks allocated\n");
 
    if(surface_render==NULL)
-      surface_render=malloc(MAX_SURFACES*sizeof(struct xvmc_render_state));//easy mem debug
-   memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_render_state));
+      surface_render=malloc(MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));//easy mem debug
+   memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));
 
    for(i=0; i<MAX_SURFACES; i++){
       rez=XvMCCreateSurface(mDisplay,&ctx,&surface_array[i]);
@@ -843,7 +843,7 @@
 }
 
 static void draw_osd(void){
-struct xvmc_render_state * osd_rndr;
+struct xvmc_pixfmt_render * osd_rndr;
 int osd_has_changed;
 int have_osd_to_draw;
 int rez;
@@ -937,7 +937,7 @@
    XvMCSyncSurface(mDisplay, srf);
 }
 
-static void put_xvmc_image(struct xvmc_render_state * p_render_surface,
+static void put_xvmc_image(struct xvmc_pixfmt_render * p_render_surface,
 			   int draw_ck){
 int rez;
 struct vo_rect src_rect, dst_rect;
@@ -1058,7 +1058,7 @@
                     surface_render[i].state); 
       }
 
-      memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_render_state));//for debuging
+      memset(surface_render,0,MAX_SURFACES*sizeof(struct xvmc_pixfmt_render));//for debuging
       free(surface_render);surface_render=NULL;
 
       XvMCDestroyContext(mDisplay,&ctx);
@@ -1114,13 +1114,13 @@
 
 static int draw_slice(uint8_t *image[], int stride[],
 			   int w, int h, int x, int y){
-struct xvmc_render_state * rndr;
+struct xvmc_pixfmt_render * rndr;
 int rez;
 
    if( mp_msg_test(MSGT_VO,MSGL_DBG4) )
       printf("vo_xvmc: draw_slice y=%d\n",y);
 
-   rndr = (struct xvmc_render_state*)image[2];//this is copy of priv-ate
+   rndr = (struct xvmc_pixfmt_render*)image[2];//this is copy of priv-ate
    assert( rndr != NULL );
    assert( rndr->magic_id == AV_XVMC_RENDER_MAGIC );
 
@@ -1174,8 +1174,8 @@
 
 //XvMCHide hides the surface on next retrace, so
 //check if the surface is not still displaying
-static void check_osd_source(struct xvmc_render_state * src_rndr){
-struct xvmc_render_state * osd_rndr;
+static void check_osd_source(struct xvmc_pixfmt_render * src_rndr){
+struct xvmc_pixfmt_render * 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){
@@ -1198,10 +1198,10 @@
    return num;
 }
 
-static struct xvmc_render_state * find_free_surface(void) {
+static struct xvmc_pixfmt_render * find_free_surface(void) {
 int i,t;
 int stat;
-struct xvmc_render_state * visible_rndr;
+struct xvmc_pixfmt_render * visible_rndr;
 
    visible_rndr = NULL;
    for(i=0; i<number_of_surfaces; i++){
@@ -1251,7 +1251,7 @@
 }
 
 static uint32_t get_image(mp_image_t *mpi){
-   struct xvmc_render_state * rndr;
+   struct xvmc_pixfmt_render * rndr;
 
    rndr = find_free_surface();