]> hackdaworld.org Git - my-code/ivac.git/commitdiff
-
authorhackbard <hackbard>
Thu, 28 Aug 2003 22:39:27 +0000 (22:39 +0000)
committerhackbard <hackbard>
Thu, 28 Aug 2003 22:39:27 +0000 (22:39 +0000)
dfbapi.c

index 7de46c3440128d85509ecc071bcb5b73f162a037..cabc5a7f1e711096776f452403f2970c65d5ce0e 100644 (file)
--- a/dfbapi.c
+++ b/dfbapi.c
 // int dfb_play_video()
 // int dfb_stop_video()
 
+int flip_blit_callback(void *ctx) {
+       struct ivac *ivac=ctx;
+
+       ivac->dfb_stuff.v_surface->Flip(ivac->dfb_stuff.v_surface,NULL,0);
+
+       return 1;
+}
+
+int dfb_play_video(struct ivac *ivac) {
+
+       ivac->dfb_stuff.v_provider->PlayTo(ivac->dfb_stuff.v_provider,ivac->dfb_stuff.v_surface,NULL,flip_blit_callback,(void *)ivac);
+
+       return 1;
+}
+       
+int dfb_stop_video(struct ivac *ivac) {
+
+       ivac->dfb_stuff.v_provider->Stop(ivac->dfb_stuff.v_provider);
+       
+       return 1;
+}
+
 int dfb_init(int arg_c,char **arg_v,struct ivac *ivac) {
        DFBSurfaceDescription sdsc;
        // DFBFontDescription fdsc;
@@ -41,7 +63,6 @@ int dfb_init(int arg_c,char **arg_v,struct ivac *ivac) {
        ivac->dfb_stuff.layer->CreateWindow(ivac->dfb_stuff.layer,&wdsc,&(ivac->dfb_stuff.v_window));
        ivac->dfb_stuff.v_window->GetSurface(ivac->dfb_stuff.v_window,&(ivac->dfb_stuff.v_surface));
        ivac->dfb_stuff.v_window->SetOpacity(ivac->dfb_stuff.v_window,0xff);
-       ivac->dfb_stuff.v_provider->PlayTo(ivac->dfb_stuff.v_provider,ivac->dfb_stuff.v_surface,NULL,NULL,NULL);
 
        return 1;
 }
@@ -54,4 +75,3 @@ int dfb_tini(struct ivac *ivac) {
        
        return 1;
 }
-