Go to the documentation of this file.00001
00002 #ifndef vidl_v4l_params_h_
00003 #define vidl_v4l_params_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "vidl_pixel_format.h"
00019 #include <linux/videodev.h>
00020
00021
00022
00023 struct vidl_v4l_params
00024 {
00025
00026 static int vidlpf_to_v4lpf(vidl_pixel_format vid_pf);
00027
00028
00029 static vidl_pixel_format v4lpf_to_vidlpf(int v4l_pf);
00030
00031
00032 vidl_v4l_params(): ni_(320), nj_(240), brightness_(31744), hue_(65535),
00033 colour_(32768), contrast_(32768), whiteness_(49152),
00034 depth_(24), pixel_format_(VIDL_PIXEL_FORMAT_YUV_420P)
00035 {}
00036
00037
00038 vidl_v4l_params& resolution(unsigned int ni, unsigned int nj) {
00039 ni_=ni;nj_=nj;
00040 return *this;
00041 }
00042
00043
00044 vidl_v4l_params& brightness(int brghtness) {
00045 brightness_=brghtness;
00046 return *this;
00047 }
00048
00049
00050 vidl_v4l_params& hue(int hu) {
00051 hue_=hu;
00052 return *this;
00053 }
00054
00055
00056 vidl_v4l_params& colour(int color) {
00057 colour_=color;
00058 return *this;
00059 }
00060
00061
00062 vidl_v4l_params& contrast(int contrst) {
00063 contrast_=contrst;
00064 return *this;
00065 }
00066
00067
00068 vidl_v4l_params& whiteness(int whitenss) {
00069 whiteness_=whitenss;
00070 return *this;
00071 }
00072
00073
00074 vidl_v4l_params& depth(int dpth) {
00075 depth_=dpth;
00076 return *this;
00077 }
00078
00079
00080 vidl_v4l_params& pixel_format(vidl_pixel_format pf) {
00081 pixel_format_=pf;
00082 return *this;
00083 }
00084
00085 unsigned int ni_, nj_;
00086 int brightness_;
00087 int hue_;
00088 int colour_;
00089 int contrast_;
00090 int whiteness_;
00091 int depth_;
00092 vidl_pixel_format pixel_format_;
00093 };
00094
00095 #endif