Go to the documentation of this file.00001
00002 #ifndef vidl_dshow_istream_params_esf_h_
00003 #define vidl_dshow_istream_params_esf_h_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <vcl_string.h>
00017 #include <vcl_bitset.h>
00018 #include <vcl_map.h>
00019
00020 #include <atlbase.h>
00021 #include <dshow.h>
00022
00023 #include <initguid.h>
00024 #include <ESFilter.h>
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 class vidl_dshow_istream_params_esf
00039 {
00040 public:
00041
00042 vidl_dshow_istream_params_esf();
00043
00044
00045 void configure_filter(const CComPtr<IBaseFilter>& source);
00046
00047
00048 static void print_parameter_help(const vcl_string& name);
00049
00050
00051 static void print_parameter_help(const CComPtr<IBaseFilter>& filter);
00052
00053
00054 vidl_dshow_istream_params_esf& set_properties(
00055 const vcl_map<vcl_string,vcl_string>& props);
00056
00057
00058
00059 bool register_in_rot() const { return register_in_rot_; }
00060 bool run_when_ready() const { return run_when_ready_; }
00061 vcl_string save_graph_to() const { return save_graph_to_; }
00062 vcl_string device_name() const { return device_name_; }
00063 vcl_string output_filename() const { return output_filename_; }
00064 GUID target_output_format() const { return target_output_format_; }
00065
00066
00067
00068 vidl_dshow_istream_params_esf& set_register_in_rot(bool);
00069 vidl_dshow_istream_params_esf& set_run_when_ready(bool);
00070 vidl_dshow_istream_params_esf& set_save_graph_to(const vcl_string&);
00071 vidl_dshow_istream_params_esf& set_device_name(const vcl_string&);
00072 vidl_dshow_istream_params_esf& set_output_filename(const vcl_string&);
00073 vidl_dshow_istream_params_esf& set_target_output_format(GUID);
00074
00075 vidl_dshow_istream_params_esf& set_video_standard(ESF_VIDEO_STANDARD,bool);
00076 vidl_dshow_istream_params_esf& set_resolution(ESF_RESOLUTION,long,long);
00077 vidl_dshow_istream_params_esf& set_capture_region_size(long,long);
00078 vidl_dshow_istream_params_esf& set_capture_region_pos(long,long);
00079 vidl_dshow_istream_params_esf& set_output_format(GUID);
00080 vidl_dshow_istream_params_esf& set_capture_rate(double);
00081 vidl_dshow_istream_params_esf& set_brightness(long);
00082 vidl_dshow_istream_params_esf& set_contrast(long);
00083 vidl_dshow_istream_params_esf& set_saturation(long);
00084
00085 vidl_dshow_istream_params_esf& set_bitrate_control(ESF_BITRATECONTROL);
00086 vidl_dshow_istream_params_esf& set_average_bitrate(long);
00087 vidl_dshow_istream_params_esf& set_video_quality(long);
00088 vidl_dshow_istream_params_esf& set_gop_structure(ESF_GOPSTRUCTURE);
00089 vidl_dshow_istream_params_esf& set_gop_size(long);
00090
00091 private:
00092 enum esf_property
00093 {
00094 esf_property_video_standard = 0,
00095 esf_property_resolution,
00096 esf_property_capture_region_size,
00097 esf_property_capture_region_pos,
00098 esf_property_output_format,
00099 esf_property_capture_rate,
00100 esf_property_brightness,
00101 esf_property_contrast,
00102 esf_property_saturation,
00103 esf_property_bitrate_control,
00104 esf_property_average_bitrate,
00105 esf_property_video_quality,
00106 esf_property_gop_structure,
00107 esf_property_gop_size,
00108 esf_property_enum_size
00109 };
00110
00111
00112 vcl_bitset<esf_property_enum_size> is_property_changed_;
00113
00114
00115 bool register_in_rot_;
00116
00117
00118 bool run_when_ready_;
00119
00120
00121 vcl_string save_graph_to_;
00122
00123
00124 vcl_string device_name_;
00125
00126
00127 vcl_string output_filename_;
00128
00129
00130 GUID target_output_format_;
00131
00132
00133 ESF_VIDEO_STANDARD video_standard_;
00134 bool is_monochrome_;
00135 ESF_RESOLUTION resolution_;
00136 long width_;
00137 long height_;
00138 long capture_region_size_x_;
00139 long capture_region_size_y_;
00140 long capture_region_pos_x_;
00141 long capture_region_pos_y_;
00142 GUID output_format_;
00143 double capture_rate_;
00144 long brightness_;
00145 long contrast_;
00146 long saturation_;
00147
00148
00149 ESF_BITRATECONTROL bitrate_control_;
00150 long average_bitrate_;
00151 long video_quality_;
00152 ESF_GOPSTRUCTURE gop_structure_;
00153 long gop_size_;
00154 };
00155
00156 #endif // vidl_dshow_istream_params_esf_h_