Want more features on Pastebin? Sign Up, it's FREE!
Guest

pdp_vloopback.patch

By: singintime on Mar 5th, 2012  |  syntax: C  |  size: 1.96 KB  |  views: 59  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. 43c43
  2. < #include <linux/videodev.h>
  3. ---
  4. > #include <linux/videodev2.h>
  5. 64,65c64,65
  6. <   struct video_window x_vidwin;
  7. <   struct video_picture x_vidpic;
  8. ---
  9. >   struct v4l2_window x_vidwin;
  10. >   struct v4l2_pix_format x_vidfmt;
  11. 147c147
  12. <   if( ioctl(x->x_vlfd, VIDIOCGPICT, &x->x_vidpic) == -1)
  13. ---
  14. >   if( ioctl(x->x_vlfd, VIDIOC_G_FMT, &x->x_vidfmt) == -1)
  15. 149,150c149,150
  16. <      post("pdp_vloopback : could get palette ( VIDIOCGPICT )");
  17. <      perror( "ioctl VIDIOCGPICT" );
  18. ---
  19. >      post("pdp_vloopback : could get palette ( VIDIOC_G_FMT )");
  20. >      perror( "ioctl VIDIOC_G_FMT" );
  21. 154,155c154,155
  22. <   x->x_vidpic.palette = VIDEO_PALETTE_RGB24;
  23. <   if( ioctl(x->x_vlfd, VIDIOCSPICT, &x->x_vidpic) == -1)
  24. ---
  25. >   x->x_vidfmt.pixelformat = V4L2_PIX_FMT_BGR24;
  26. >   if( ioctl(x->x_vlfd, VIDIOC_S_FMT, &x->x_vidfmt) == -1)
  27. 157,158c157,158
  28. <      post("pdp_vloopback : could set palette ( VIDIOCSPICT )");
  29. <      perror( "ioctl VIDIOCSPICT" );
  30. ---
  31. >      post("pdp_vloopback : could set palette ( VIDIOC_S_FMT )");
  32. >      perror( "ioctl VIDIOC_S_FMT" );
  33. 163c163
  34. <   if(ioctl (x->x_vlfd, VIDIOCGWIN, &x->x_vidwin) == -1)
  35. ---
  36. >   if(ioctl (x->x_vlfd, VIDIOC_G_FMT, &x->x_vidwin) == -1)
  37. 165,166c165,166
  38. <      post("pdp_vloopback : could get dimensions ( VIDIOCGWIN )");
  39. <      perror( "ioctl VIDIOCGWIN" );
  40. ---
  41. >      post("pdp_vloopback : could get dimensions ( VIDIOC_G_FMT )");
  42. >      perror( "ioctl VIDIOC_G_FMT" );
  43. 170,171c170,171
  44. <   x->x_vidwin.width = x->x_width;
  45. <   x->x_vidwin.height = x->x_height;
  46. ---
  47. >   x->x_vidwin.w.width = x->x_width;
  48. >   x->x_vidwin.w.height = x->x_height;
  49. 173c173
  50. <   if(ioctl (x->x_vlfd, VIDIOCSWIN, &x->x_vidwin) == -1)
  51. ---
  52. >   if(ioctl (x->x_vlfd, VIDIOC_S_FMT, &x->x_vidwin) == -1)
  53. 175,176c175,176
  54. <      post("pdp_vloopback : could set dimensions ( VIDIOCSWIN )");
  55. <      perror( "ioctl VIDIOCSWIN" );
  56. ---
  57. >      post("pdp_vloopback : could set dimensions ( VIDIOC_S_FMT )");
  58. >      perror( "ioctl VIDIOC_S_FMT" );
clone this paste RAW Paste Data