changeset 28568:1a90167d9f0e

The xvmc_pixfmt_render structure was renamed to xvmc_pix_fmt in FFmpeg.
author diego
date Sun, 15 Feb 2009 17:49:42 +0000
parents a0374525d6ad
children fb881ea1a985
files libmpcodecs/vd_ffmpeg.c libvo/vo_xvmc.c
diffstat 2 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sun Feb 15 17:38:47 2009 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sun Feb 15 17:49:42 2009 +0000
@@ -577,7 +577,7 @@
         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 @@
             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);
--- a/libvo/vo_xvmc.c	Sun Feb 15 17:38:47 2009 +0000
+++ b/libvo/vo_xvmc.c	Sun Feb 15 17:49:42 2009 +0000
@@ -98,13 +98,13 @@
 #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 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 @@
 }
 
 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 @@
    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 @@
 }
 
 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 @@
    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 @@
                     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 @@
 
 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 @@
 
 //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 @@
    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 @@
 }
 
 static uint32_t get_image(mp_image_t *mpi){
-   struct xvmc_pixfmt_render * rndr;
+   struct xvmc_pix_fmt *rndr;
 
    rndr = find_free_surface();