Mercurial > mplayer.hg
comparison libvo/vo_x11.c @ 7689:39e62d6592ca
since draw_slice() supports RGB/BGR, we don't need draw_image() for stride
author | arpi |
---|---|
date | Wed, 09 Oct 2002 22:44:07 +0000 |
parents | 2f802d9323de |
children | 13c36b2d1d45 |
comparison
equal
deleted
inserted
replaced
7688:41d242c5bee1 | 7689:39e62d6592ca |
---|---|
530 printf("draw_frame() called!!!!!!\n"); | 530 printf("draw_frame() called!!!!!!\n"); |
531 return -1; | 531 return -1; |
532 #endif | 532 #endif |
533 } | 533 } |
534 | 534 |
535 static uint32_t draw_image(mp_image_t *mpi){ | |
536 // if -dr or -slices then do nothing: | |
537 if(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK)) return VO_TRUE; | |
538 draw_slice(mpi->planes,mpi->stride,mpi->w,mpi->h,0,0); | |
539 return VO_TRUE; | |
540 } | |
541 | |
542 static uint32_t get_image(mp_image_t *mpi) | 535 static uint32_t get_image(mp_image_t *mpi) |
543 { | 536 { |
544 if (zoomFlag || | 537 if (zoomFlag || |
545 !IMGFMT_IS_BGR(mpi->imgfmt) || | 538 !IMGFMT_IS_BGR(mpi->imgfmt) || |
546 (IMGFMT_BGR_DEPTH(mpi->imgfmt) != vo_depthonscreen) || | 539 (IMGFMT_BGR_DEPTH(mpi->imgfmt) != vo_depthonscreen) || |
573 if (IMGFMT_IS_BGR(format)) | 566 if (IMGFMT_IS_BGR(format)) |
574 { | 567 { |
575 if (IMGFMT_BGR_DEPTH(format) == 8) | 568 if (IMGFMT_BGR_DEPTH(format) == 8) |
576 return 0; // TODO 8bpp not yet fully implemented | 569 return 0; // TODO 8bpp not yet fully implemented |
577 if (IMGFMT_BGR_DEPTH(format) == vo_depthonscreen) | 570 if (IMGFMT_BGR_DEPTH(format) == vo_depthonscreen) |
578 return 3|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP; | 571 return 3|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP|VFCAP_ACCEPT_STRIDE; |
579 else | 572 else |
580 return 1|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP; | 573 return 1|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP|VFCAP_ACCEPT_STRIDE; |
581 } | 574 } |
582 | 575 |
583 switch( format ) | 576 switch( format ) |
584 { | 577 { |
585 // case IMGFMT_BGR8: | 578 // case IMGFMT_BGR8: |
590 // return 0x2; | 583 // return 0x2; |
591 // case IMGFMT_YUY2: | 584 // case IMGFMT_YUY2: |
592 case IMGFMT_I420: | 585 case IMGFMT_I420: |
593 case IMGFMT_IYUV: | 586 case IMGFMT_IYUV: |
594 case IMGFMT_YV12: | 587 case IMGFMT_YV12: |
595 return 1|VFCAP_OSD|VFCAP_SWSCALE; | 588 return 1|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_ACCEPT_STRIDE; |
596 } | 589 } |
597 return 0; | 590 return 0; |
598 } | 591 } |
599 | 592 |
600 | 593 |
634 return query_format(*((uint32_t*)data)); | 627 return query_format(*((uint32_t*)data)); |
635 case VOCTRL_GUISUPPORT: | 628 case VOCTRL_GUISUPPORT: |
636 return VO_TRUE; | 629 return VO_TRUE; |
637 case VOCTRL_GET_IMAGE: | 630 case VOCTRL_GET_IMAGE: |
638 return get_image(data); | 631 return get_image(data); |
639 case VOCTRL_DRAW_IMAGE: | |
640 return draw_image(data); | |
641 case VOCTRL_FULLSCREEN: | 632 case VOCTRL_FULLSCREEN: |
642 vo_x11_fullscreen(); | 633 vo_x11_fullscreen(); |
643 return VO_TRUE; | 634 return VO_TRUE; |
644 } | 635 } |
645 return VO_NOTIMPL; | 636 return VO_NOTIMPL; |