Mercurial > mplayer.hg
comparison libvo/vo_xv.c @ 16171:fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
return values can be negative (VO_ERROR, VO_NOTAVAIL and VO_NOTIMPL), so it's
changed to int now.
author | ivo |
---|---|
date | Fri, 05 Aug 2005 01:24:37 +0000 |
parents | db966bdf6f5b |
children | 3ff863e54b93 |
comparison
equal
deleted
inserted
replaced
16170:7c5d6c82e5ed | 16171:fd51fd1ff231 |
---|---|
141 | 141 |
142 /* | 142 /* |
143 * connect to server, create and map window, | 143 * connect to server, create and map window, |
144 * allocate colors and (shared) memory | 144 * allocate colors and (shared) memory |
145 */ | 145 */ |
146 static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, | 146 static int config(uint32_t width, uint32_t height, uint32_t d_width, |
147 uint32_t d_height, uint32_t flags, char *title, | 147 uint32_t d_height, uint32_t flags, char *title, |
148 uint32_t format) | 148 uint32_t format) |
149 { | 149 { |
150 // int screen; | 150 // int screen; |
151 char *hello = (title == NULL) ? "Xv render" : title; | 151 char *hello = (title == NULL) ? "Xv render" : title; |
622 } else | 622 } else |
623 XSync(mDisplay, False); | 623 XSync(mDisplay, False); |
624 return; | 624 return; |
625 } | 625 } |
626 | 626 |
627 static uint32_t draw_slice(uint8_t * image[], int stride[], int w, int h, | 627 static int draw_slice(uint8_t * image[], int stride[], int w, int h, |
628 int x, int y) | 628 int x, int y) |
629 { | 629 { |
630 uint8_t *dst; | 630 uint8_t *dst; |
631 | 631 |
632 dst = xvimage[current_buf]->data + xvimage[current_buf]->offsets[0] + | 632 dst = xvimage[current_buf]->data + xvimage[current_buf]->offsets[0] + |
658 stride[2]); | 658 stride[2]); |
659 | 659 |
660 return 0; | 660 return 0; |
661 } | 661 } |
662 | 662 |
663 static uint32_t draw_frame(uint8_t * src[]) | 663 static int draw_frame(uint8_t * src[]) |
664 { | 664 { |
665 printf("draw_frame() called!!!!!!"); | 665 printf("draw_frame() called!!!!!!"); |
666 return -1; | 666 return -1; |
667 } | 667 } |
668 | 668 |
761 return VO_TRUE; | 761 return VO_TRUE; |
762 } | 762 } |
763 return VO_FALSE; | 763 return VO_FALSE; |
764 } | 764 } |
765 | 765 |
766 static uint32_t query_format(uint32_t format) | 766 static int query_format(uint32_t format) |
767 { | 767 { |
768 uint32_t i; | 768 uint32_t i; |
769 int flag = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_OSD | VFCAP_ACCEPT_STRIDE; // FIXME! check for DOWN | 769 int flag = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_OSD | VFCAP_ACCEPT_STRIDE; // FIXME! check for DOWN |
770 | 770 |
771 /* check image formats */ | 771 /* check image formats */ |
796 vo_vm_close(mDisplay); | 796 vo_vm_close(mDisplay); |
797 #endif | 797 #endif |
798 vo_x11_uninit(); | 798 vo_x11_uninit(); |
799 } | 799 } |
800 | 800 |
801 static uint32_t preinit(const char *arg) | 801 static int preinit(const char *arg) |
802 { | 802 { |
803 XvPortID xv_p; | 803 XvPortID xv_p; |
804 int busy_ports = 0; | 804 int busy_ports = 0; |
805 unsigned int i; | 805 unsigned int i; |
806 strarg_t ck_src_arg = { 0, NULL }; | 806 strarg_t ck_src_arg = { 0, NULL }; |
922 fo = XvListImageFormats(mDisplay, xv_port, (int *) &formats); | 922 fo = XvListImageFormats(mDisplay, xv_port, (int *) &formats); |
923 | 923 |
924 return 0; | 924 return 0; |
925 } | 925 } |
926 | 926 |
927 static uint32_t control(uint32_t request, void *data, ...) | 927 static int control(uint32_t request, void *data, ...) |
928 { | 928 { |
929 switch (request) | 929 switch (request) |
930 { | 930 { |
931 case VOCTRL_PAUSE: | 931 case VOCTRL_PAUSE: |
932 return (int_pause = 1); | 932 return (int_pause = 1); |