Mercurial > mplayer.hg
comparison libvo/vo_xv.c @ 6760:d4db17f7271a
DR1 with IPB fixed
author | arpi |
---|---|
date | Sat, 20 Jul 2002 16:27:17 +0000 |
parents | ecc71f27bfd7 |
children | 7755d1d59394 |
comparison
equal
deleted
inserted
replaced
6759:415be01747ae | 6760:d4db17f7271a |
---|---|
745 } | 745 } |
746 | 746 |
747 return 0; | 747 return 0; |
748 } | 748 } |
749 | 749 |
750 static uint32_t draw_image(mp_image_t *mpi){ | |
751 if(mpi->flags&MP_IMGFLAG_DIRECT){ | |
752 // direct rendering: | |
753 current_buf=(int)(mpi->priv); // hack! | |
754 return VO_TRUE; | |
755 } | |
756 return VO_FALSE; // not (yet) supported | |
757 } | |
758 | |
750 static uint32_t get_image(mp_image_t *mpi){ | 759 static uint32_t get_image(mp_image_t *mpi){ |
751 int buf=current_buf; // we shouldn't change current_buf unless we do DR! | 760 int buf=current_buf; // we shouldn't change current_buf unless we do DR! |
752 if(mpi->type==MP_IMGTYPE_STATIC && num_buffers>1) return VO_FALSE; // it is not static | 761 if(mpi->type==MP_IMGTYPE_STATIC && num_buffers>1) return VO_FALSE; // it is not static |
753 if(mpi->imgfmt!=image_format || mpi->imgfmt==IMGFMT_BGR24) return VO_FALSE; // needs conversion :( | 762 if(mpi->imgfmt!=image_format || mpi->imgfmt==IMGFMT_BGR24) return VO_FALSE; // needs conversion :( |
754 // if(mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; // slow video ram | 763 // if(mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; // slow video ram |
784 mpi->stride[1]=xvimage[current_buf]->pitches[2]; | 793 mpi->stride[1]=xvimage[current_buf]->pitches[2]; |
785 mpi->stride[2]=xvimage[current_buf]->pitches[1]; | 794 mpi->stride[2]=xvimage[current_buf]->pitches[1]; |
786 } | 795 } |
787 } | 796 } |
788 mpi->flags|=MP_IMGFLAG_DIRECT; | 797 mpi->flags|=MP_IMGFLAG_DIRECT; |
798 mpi->priv=(void*)current_buf; | |
789 // printf("mga: get_image() SUCCESS -> Direct Rendering ENABLED\n"); | 799 // printf("mga: get_image() SUCCESS -> Direct Rendering ENABLED\n"); |
790 return VO_TRUE; | 800 return VO_TRUE; |
791 } | 801 } |
792 return VO_FALSE; | 802 return VO_FALSE; |
793 } | 803 } |
886 return VO_TRUE; | 896 return VO_TRUE; |
887 case VOCTRL_QUERY_FORMAT: | 897 case VOCTRL_QUERY_FORMAT: |
888 return query_format(*((uint32_t*)data)); | 898 return query_format(*((uint32_t*)data)); |
889 case VOCTRL_GET_IMAGE: | 899 case VOCTRL_GET_IMAGE: |
890 return get_image(data); | 900 return get_image(data); |
901 case VOCTRL_DRAW_IMAGE: | |
902 return draw_image(data); | |
891 case VOCTRL_GUISUPPORT: | 903 case VOCTRL_GUISUPPORT: |
892 return VO_TRUE; | 904 return VO_TRUE; |
893 case VOCTRL_GET_PANSCAN: | 905 case VOCTRL_GET_PANSCAN: |
894 if ( !vo_config_count || !vo_fs ) return VO_FALSE; | 906 if ( !vo_config_count || !vo_fs ) return VO_FALSE; |
895 return VO_TRUE; | 907 return VO_TRUE; |