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