pvrusb2-std.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. *
  4. * Copyright (C) 2005 Mike Isely <[email protected]>
  5. */
  6. #ifndef __PVRUSB2_STD_H
  7. #define __PVRUSB2_STD_H
  8. #include <linux/videodev2.h>
  9. // Convert string describing one or more video standards into a mask of V4L
  10. // standard bits. Return true if conversion succeeds otherwise return
  11. // false. String is expected to be of the form: C1-x/y;C2-a/b where C1 and
  12. // C2 are color system names (e.g. "PAL", "NTSC") and x, y, a, and b are
  13. // modulation schemes (e.g. "M", "B", "G", etc).
  14. int pvr2_std_str_to_id(v4l2_std_id *idPtr,const char *bufPtr,
  15. unsigned int bufSize);
  16. // Convert any arbitrary set of video standard bits into an unambiguous
  17. // readable string. Return value is the number of bytes consumed in the
  18. // buffer. The formatted string is of a form that can be parsed by our
  19. // sibling std_std_to_id() function.
  20. unsigned int pvr2_std_id_to_str(char *bufPtr, unsigned int bufSize,
  21. v4l2_std_id id);
  22. // Create an array of suitable v4l2_standard structures given a bit mask of
  23. // video standards to support. The array is allocated from the heap, and
  24. // the number of elements is returned in the first argument.
  25. struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
  26. v4l2_std_id id);
  27. // Return mask of which video standard bits are valid
  28. v4l2_std_id pvr2_std_get_usable(void);
  29. #endif /* __PVRUSB2_STD_H */