pvrusb2-std.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. *
  3. * $Id$
  4. *
  5. * Copyright (C) 2005 Mike Isely <isely@pobox.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. *
  20. */
  21. #ifndef __PVRUSB2_STD_H
  22. #define __PVRUSB2_STD_H
  23. #include <linux/videodev2.h>
  24. // Convert string describing one or more video standards into a mask of V4L
  25. // standard bits. Return true if conversion succeeds otherwise return
  26. // false. String is expected to be of the form: C1-x/y;C2-a/b where C1 and
  27. // C2 are color system names (e.g. "PAL", "NTSC") and x, y, a, and b are
  28. // modulation schemes (e.g. "M", "B", "G", etc).
  29. int pvr2_std_str_to_id(v4l2_std_id *idPtr,const char *bufPtr,
  30. unsigned int bufSize);
  31. // Convert any arbitrary set of video standard bits into an unambiguous
  32. // readable string. Return value is the number of bytes consumed in the
  33. // buffer. The formatted string is of a form that can be parsed by our
  34. // sibling std_std_to_id() function.
  35. unsigned int pvr2_std_id_to_str(char *bufPtr, unsigned int bufSize,
  36. v4l2_std_id id);
  37. // Create an array of suitable v4l2_standard structures given a bit mask of
  38. // video standards to support. The array is allocated from the heap, and
  39. // the number of elements is returned in the first argument.
  40. struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
  41. v4l2_std_id id);
  42. // Return mask of which video standard bits are valid
  43. v4l2_std_id pvr2_std_get_usable(void);
  44. #endif /* __PVRUSB2_STD_H */
  45. /*
  46. Stuff for Emacs to see, in order to encourage consistent editing style:
  47. *** Local Variables: ***
  48. *** mode: c ***
  49. *** fill-column: 75 ***
  50. *** tab-width: 8 ***
  51. *** c-basic-offset: 8 ***
  52. *** End: ***
  53. */