]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - drivers/media/usb/pvrusb2/pvrusb2-std.h
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / drivers / media / usb / pvrusb2 / pvrusb2-std.h
CommitLineData
d855497e
MI
1/*
2 *
d855497e
MI
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 *
d855497e
MI
15 */
16#ifndef __PVRUSB2_STD_H
17#define __PVRUSB2_STD_H
18
19#include <linux/videodev2.h>
20
21// Convert string describing one or more video standards into a mask of V4L
22// standard bits. Return true if conversion succeeds otherwise return
23// false. String is expected to be of the form: C1-x/y;C2-a/b where C1 and
24// C2 are color system names (e.g. "PAL", "NTSC") and x, y, a, and b are
25// modulation schemes (e.g. "M", "B", "G", etc).
26int pvr2_std_str_to_id(v4l2_std_id *idPtr,const char *bufPtr,
27 unsigned int bufSize);
28
29// Convert any arbitrary set of video standard bits into an unambiguous
30// readable string. Return value is the number of bytes consumed in the
31// buffer. The formatted string is of a form that can be parsed by our
32// sibling std_std_to_id() function.
33unsigned int pvr2_std_id_to_str(char *bufPtr, unsigned int bufSize,
34 v4l2_std_id id);
35
36// Create an array of suitable v4l2_standard structures given a bit mask of
37// video standards to support. The array is allocated from the heap, and
38// the number of elements is returned in the first argument.
39struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
40 v4l2_std_id id);
41
42// Return mask of which video standard bits are valid
43v4l2_std_id pvr2_std_get_usable(void);
44
45#endif /* __PVRUSB2_STD_H */