Mercurial > mplayer.hg
comparison libvo/vo_directfb.c @ 5026:693b917ac916
DirectFB 0.9.9 support - patch by Aubin Paul <aubin@punknews.org>
author | arpi |
---|---|
date | Sun, 10 Mar 2002 15:47:01 +0000 |
parents | c35d7ce151b3 |
children | c663455448e8 |
comparison
equal
deleted
inserted
replaced
5025:6d8971d55e40 | 5026:693b917ac916 |
---|---|
106 static IDirectFBSurface *frame = NULL; | 106 static IDirectFBSurface *frame = NULL; |
107 | 107 |
108 /* | 108 /* |
109 * A buffer for input events. | 109 * A buffer for input events. |
110 */ | 110 */ |
111 | |
112 #ifdef HAVE_DIRECTFB099 | |
113 static IDirectFBEventBuffer *buffer = NULL; | |
114 #else | |
111 static IDirectFBInputBuffer *buffer = NULL; | 115 static IDirectFBInputBuffer *buffer = NULL; |
116 #endif | |
112 | 117 |
113 /****************************** | 118 /****************************** |
114 * vo_directfb * | 119 * vo_directfb * |
115 ******************************/ | 120 ******************************/ |
116 | 121 |
572 DFBCHECK (dfb->GetInputDevice (dfb, DIDID_KEYBOARD, &keyboard)); | 577 DFBCHECK (dfb->GetInputDevice (dfb, DIDID_KEYBOARD, &keyboard)); |
573 | 578 |
574 /* | 579 /* |
575 * Create an input buffer for the keyboard. | 580 * Create an input buffer for the keyboard. |
576 */ | 581 */ |
582 #ifdef HAVE_DIRECTFB099 | |
583 DFBCHECK (keyboard->CreateEventBuffer (DICAPS_ALL, &buffer)); | |
584 #else | |
577 DFBCHECK (keyboard->CreateInputBuffer (keyboard, &buffer)); | 585 DFBCHECK (keyboard->CreateInputBuffer (keyboard, &buffer)); |
586 #endif | |
578 | 587 |
579 // yuv2rgb transform init | 588 // yuv2rgb transform init |
580 | 589 |
581 if (((format == IMGFMT_YV12) || (format == IMGFMT_YUY2)) && no_yuy2){ yuv2rgb_init(frame_pixel_size * 8,MODE_RGB);}; | 590 if (((format == IMGFMT_YV12) || (format == IMGFMT_YUY2)) && no_yuy2){ yuv2rgb_init(frame_pixel_size * 8,MODE_RGB);}; |
582 | 591 |
795 | 804 |
796 static void check_events(void) | 805 static void check_events(void) |
797 { | 806 { |
798 | 807 |
799 DFBInputEvent event; | 808 DFBInputEvent event; |
800 | 809 #ifdef HAVE_DIRECTFB099 |
810 if (buffer->GetEvent (buffer, DFB_EVENT(&event)) == DFB_OK) { | |
811 #else | |
801 if (buffer->GetEvent (buffer, &event) == DFB_OK) { | 812 if (buffer->GetEvent (buffer, &event) == DFB_OK) { |
813 #endif | |
802 if (event.type == DIET_KEYPRESS) { | 814 if (event.type == DIET_KEYPRESS) { |
803 switch (event.keycode) { | 815 switch (event.keycode) { |
804 case DIKC_ESCAPE: | 816 case DIKC_ESCAPE: |
805 mplayer_put_key('q'); | 817 mplayer_put_key('q'); |
806 break; | 818 break; |