comparison libmpcodecs/vf_remove_logo.c @ 30642:a972c1a4a012

cosmetics: Rename struct vf_instance_s --> vf_instance.
author diego
date Sun, 21 Feb 2010 15:48:03 +0000
parents a7b908875c14
children 5a451be4f907
comparison
equal deleted inserted replaced
30641:b14b32c20935 30642:a972c1a4a012
668 } 668 }
669 669
670 /** 670 /**
671 * \brief Checks if YV12 is supported by the next filter. 671 * \brief Checks if YV12 is supported by the next filter.
672 */ 672 */
673 static unsigned int find_best(struct vf_instance_s* vf){ 673 static unsigned int find_best(struct vf_instance *vf){
674 int is_format_okay = vf->next->query_format(vf->next, IMGFMT_YV12); 674 int is_format_okay = vf->next->query_format(vf->next, IMGFMT_YV12);
675 if ((is_format_okay & VFCAP_CSP_SUPPORTED_BY_HW) || (is_format_okay & VFCAP_CSP_SUPPORTED)) 675 if ((is_format_okay & VFCAP_CSP_SUPPORTED_BY_HW) || (is_format_okay & VFCAP_CSP_SUPPORTED))
676 return IMGFMT_YV12; 676 return IMGFMT_YV12;
677 else 677 else
678 return 0; 678 return 0;
681 //===========================================================================// 681 //===========================================================================//
682 682
683 /** 683 /**
684 * \brief Configure the filter and call the next filter's config function. 684 * \brief Configure the filter and call the next filter's config function.
685 */ 685 */
686 static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) 686 static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt)
687 { 687 {
688 if(!(((vf_priv_s *)vf->priv)->fmt=find_best(vf))) 688 if(!(((vf_priv_s *)vf->priv)->fmt=find_best(vf)))
689 return 0; 689 return 0;
690 else 690 else
691 return vf_next_config(vf,width,height,d_width,d_height,flags,((vf_priv_s *)vf->priv)->fmt); 691 return vf_next_config(vf,width,height,d_width,d_height,flags,((vf_priv_s *)vf->priv)->fmt);
762 * 762 *
763 * This function processes an entire frame. The frame is sent by the previous 763 * This function processes an entire frame. The frame is sent by the previous
764 * filter, has the logo removed by the filter, and is then sent to the next 764 * filter, has the logo removed by the filter, and is then sent to the next
765 * filter. 765 * filter.
766 */ 766 */
767 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ 767 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
768 mp_image_t *dmpi; 768 mp_image_t *dmpi;
769 769
770 dmpi=vf_get_image(vf->next,((vf_priv_s *)vf->priv)->fmt, 770 dmpi=vf_get_image(vf->next,((vf_priv_s *)vf->priv)->fmt,
771 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, 771 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
772 mpi->w, mpi->h); 772 mpi->w, mpi->h);
809 //===========================================================================// 809 //===========================================================================//
810 810
811 /** 811 /**
812 * \brief Checks to see if the next filter accepts YV12 images. 812 * \brief Checks to see if the next filter accepts YV12 images.
813 */ 813 */
814 static int query_format(struct vf_instance_s * vf, unsigned int fmt) 814 static int query_format(struct vf_instance *vf, unsigned int fmt)
815 { 815 {
816 if (fmt == IMGFMT_YV12) 816 if (fmt == IMGFMT_YV12)
817 return vf->next->query_format(vf->next, IMGFMT_YV12); 817 return vf->next->query_format(vf->next, IMGFMT_YV12);
818 else 818 else
819 return 0; 819 return 0;