-
authorhackbard <hackbard>
Sat, 15 Feb 2003 22:17:33 +0000 (22:17 +0000)
committerhackbard <hackbard>
Sat, 15 Feb 2003 22:17:33 +0000 (22:17 +0000)
dfb_api.c

index fbc67fb..14c3cda 100644 (file)
--- a/dfb_api.c
+++ b/dfb_api.c
@@ -28,7 +28,7 @@ IDirectFBVideoProvider *video_provider = NULL;
 static int screen_width  = 0;
 static int screen_height = 0;
 
-char dfb_video_dev[]="/dev/video";
+char dfb_video_dev[]="/dev/v4l/video0";
 char text_top[]="Internet Video / Audio Conferencing";
 char dfb_image[]="./images/ivac_logo.png";
 char dfb_font[]="./fonts/decker.ttf";
@@ -56,14 +56,14 @@ int create_primary_surface(void) {
  return 1;
 }
 
-int create_image_provider(IDirectFBSurface *surface) {
+int show_image(IDirectFBSurface *surface) {
  dfb->CreateImageProvider(dfb,dfb_image,&image_provider);
  image_provider->RenderTo(image_provider,surface,NULL);
  image_provider->Release(image_provider);
  return 1;
 }
 
-int create_video_provider(IDirectFBSurface *surface) {
+int play_video(IDirectFBSurface *surface) {
  dfb->CreateVideoProvider(dfb,dfb_video_dev,&video_provider);
  video_provider->PlayTo(video_provider,surface,NULL,NULL,NULL);
  // video_provider->Release(video_provider);
@@ -90,7 +90,10 @@ int main (int argc, char **argv) {
 
  create_primary_surface();
 
- create_image_provider(primary);
+ // play_video(primary);
+ show_image(primary);
+
+ primary->Flip(primary,NULL,DSFLIP_WAITFORSYNC);
 
  sleep(5);