Esempio n. 1
0
obs_properties_t XCompcapMain::properties()
{
	obs_properties_t props = obs_properties_create();

	obs_property_t wins = obs_properties_add_list(props, "capture_window",
			obs_module_text("Window"),
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);

	for (Window win: XCompcap::getTopLevelWindows()) {
		std::string wname = XCompcap::getWindowName(win);
		std::string progpath = XCompcap::getWindowCommand(win);
		std::string winid = std::to_string((long long)win);
		std::string desc =
			(winid + WIN_STRING_DIV + wname +
			 WIN_STRING_DIV + progpath);

		obs_property_list_add_string(wins, wname.c_str(),
				desc.c_str());
	}

	obs_properties_add_int(props, "cut_top", obs_module_text("CropTop"),
			0, 4096, 1);
	obs_properties_add_int(props, "cut_left", obs_module_text("CropLeft"),
			0, 4096, 1);
	obs_properties_add_int(props, "cut_right", obs_module_text("CropRight"),
			0, 4096, 1);
	obs_properties_add_int(props, "cut_bot", obs_module_text("CropBottom"),
			0, 4096, 1);

	obs_properties_add_bool(props, "swap_redblue",
			obs_module_text("SwapRedBlue"));
	obs_properties_add_bool(props, "lock_x", obs_module_text("LockX"));

	return props;
}
obs_properties_t XCompcapMain::properties()
{
	obs_properties_t props = obs_properties_create();

	obs_property_t wins = obs_properties_add_list(props, "capture_window",
			"Captured Window", OBS_COMBO_TYPE_LIST,
			OBS_COMBO_FORMAT_STRING);

	for (Window win: XCompcap::getTopLevelWindows()) {
		std::string wname = XCompcap::getWindowName(win);
		std::string progpath = XCompcap::getWindowCommand(win);
		std::string winid = std::to_string((long long)win);
		std::string desc =
			(winid + WIN_STRING_DIV + wname +
			 WIN_STRING_DIV + progpath);

		obs_property_list_add_string(wins, wname.c_str(),
				desc.c_str());
	}

	obs_properties_add_int(props, "cut_top", "Cut top pixels",
			0, 4096, 1);
	obs_properties_add_int(props, "cut_left", "Cut left pixels",
			0, 4096, 1);
	obs_properties_add_int(props, "cut_right", "Cut right pixels",
			0, 4096, 1);
	obs_properties_add_int(props, "cut_bot", "Cut bottom pixels",
			0, 4096, 1);

	obs_properties_add_bool(props, "swap_redblue", "Swap red and blue");
	obs_properties_add_bool(props, "lock_x", "Lock X server when "
	                                         "capturing");

	return props;
}
Esempio n. 3
0
static obs_properties_t *rtmp_stream_properties(void *unused)
{
	UNUSED_PARAMETER(unused);

	obs_properties_t *props = obs_properties_create();
	struct netif_saddr_data addrs = {0};
	obs_property_t *p;

	obs_properties_add_int(props, OPT_DROP_THRESHOLD,
			obs_module_text("RTMPStream.DropThreshold"),
			200, 10000, 100);

	p = obs_properties_add_list(props, OPT_BIND_IP,
			obs_module_text("RTMPStream.BindIP"),
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);

	obs_property_list_add_string(p, obs_module_text("Default"), "default");

	netif_get_addrs(&addrs);
	for (size_t i = 0; i < addrs.addrs.num; i++) {
		struct netif_saddr_item item = addrs.addrs.array[i];
		obs_property_list_add_string(p, item.name, item.addr);
	}
	netif_saddr_data_free(&addrs);

	return props;
}
Esempio n. 4
0
static obs_properties_t *chroma_key_properties(void *data)
{
	obs_properties_t *props = obs_properties_create();

	obs_property_t *p = obs_properties_add_list(props,
			SETTING_COLOR_TYPE, TEXT_COLOR_TYPE,
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
	obs_property_list_add_string(p, obs_module_text("Green"), "green");
	obs_property_list_add_string(p, obs_module_text("Blue"), "blue");
	obs_property_list_add_string(p, obs_module_text("Magenta"), "magenta");
	obs_property_list_add_string(p, obs_module_text("Custom"), "custom");

	obs_property_set_modified_callback(p, key_type_changed);

	obs_properties_add_color(props, SETTING_KEY_COLOR, TEXT_KEY_COLOR);
	obs_properties_add_int_slider(props, SETTING_SIMILARITY,
			TEXT_SIMILARITY, 1, 1000, 1);
	obs_properties_add_int_slider(props, SETTING_SMOOTHNESS,
			TEXT_SMOOTHNESS, 1, 1000, 1);
	obs_properties_add_int_slider(props, SETTING_SPILL,
			TEXT_SPILL, 1, 1000, 1);

	obs_properties_add_int(props, SETTING_OPACITY, TEXT_OPACITY, 0, 100, 1);
	obs_properties_add_float_slider(props, SETTING_CONTRAST,
			TEXT_CONTRAST, -1.0, 1.0, 0.01);
	obs_properties_add_float_slider(props, SETTING_BRIGHTNESS,
			TEXT_BRIGHTNESS, -1.0, 1.0, 0.01);
	obs_properties_add_float_slider(props, SETTING_GAMMA,
			TEXT_GAMMA, -1.0, 1.0, 0.01);

	UNUSED_PARAMETER(data);
	return props;
}
Esempio n. 5
0
static obs_properties_t aac_properties(const char *locale)
{
	obs_properties_t props = obs_properties_create(locale);

	/* TODO: locale */
	obs_properties_add_int(props, "bitrate", "Bitrate", 32, 320, 32);
	return props;
}
Esempio n. 6
0
static obs_properties_t *noise_gate_properties(void *data)
{
	obs_properties_t *ppts = obs_properties_create();

	obs_properties_add_float_slider(ppts, S_CLOSE_THRESHOLD,
			TEXT_CLOSE_THRESHOLD, VOL_MIN, VOL_MAX, 1.0);
	obs_properties_add_float_slider(ppts, S_OPEN_THRESHOLD,
			TEXT_OPEN_THRESHOLD, VOL_MIN, VOL_MAX, 1.0);
	obs_properties_add_int(ppts, S_ATTACK_TIME, TEXT_ATTACK_TIME,
			0, 10000, 1);
	obs_properties_add_int(ppts, S_HOLD_TIME, TEXT_HOLD_TIME,
			0, 10000, 1);
	obs_properties_add_int(ppts, S_RELEASE_TIME, TEXT_RELEASE_TIME,
			0, 10000, 1);

	UNUSED_PARAMETER(data);
	return ppts;
}
Esempio n. 7
0
obs_properties_t *XCompcapMain::properties()
{
	obs_properties_t *props = obs_properties_create();

	obs_property_t *wins = obs_properties_add_list(props, "capture_window",
			obs_module_text("Window"),
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);

	for (Window win: XCompcap::getTopLevelWindows()) {
		std::string wname = XCompcap::getWindowName(win);
		std::string cls = XCompcap::getWindowClass(win);
		std::string winid = std::to_string((long long)win);
		std::string desc =
			(winid + WIN_STRING_DIV + wname +
			 WIN_STRING_DIV + cls);

		obs_property_list_add_string(wins, wname.c_str(),
				desc.c_str());
	}

	obs_properties_add_int(props, "cut_top", obs_module_text("CropTop"),
			0, 4096, 1);
	obs_properties_add_int(props, "cut_left", obs_module_text("CropLeft"),
			0, 4096, 1);
	obs_properties_add_int(props, "cut_right", obs_module_text("CropRight"),
			0, 4096, 1);
	obs_properties_add_int(props, "cut_bot", obs_module_text("CropBottom"),
			0, 4096, 1);

	obs_properties_add_bool(props, "swap_redblue",
			obs_module_text("SwapRedBlue"));
	obs_properties_add_bool(props, "lock_x", obs_module_text("LockX"));

	obs_properties_add_bool(props, "show_cursor",
			obs_module_text("CaptureCursor"));

	obs_properties_add_bool(props, "include_border",
			obs_module_text("IncludeXBorder"));

	obs_properties_add_bool(props, "exclude_alpha",
			obs_module_text("ExcludeAlpha"));

	return props;
}
Esempio n. 8
0
static obs_properties_t *vaapi_properties(void *unused)
{
	UNUSED_PARAMETER(unused);

	obs_properties_t *props = obs_properties_create();
	obs_property_t *  list;

	list = obs_properties_add_list(props, "vaapi_device", "VAAPI Device",
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
	char path[128] = "/dev/dri/renderD1";
	for (int i = 28;; i++) {
		sprintf(path, "/dev/dri/renderD1%d", i);
		if (access(path, F_OK) == 0) {
			char card[128] = "Card: ";
			sprintf(card, "Card%d: %s", i - 28, path);
			obs_property_list_add_string(list, card, path);
		} else {
			break;
		}
	}

	list = obs_properties_add_list(props, "vaapi_codec", "VAAPI Codec",
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);

	obs_property_list_add_int(list, "H.264 (default)", AV_CODEC_ID_H264);

	list = obs_properties_add_list(props, "level", "Level",
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
	obs_property_list_add_int(list, "480p30 (3.0)", 30);
	obs_property_list_add_int(list, "720p30/480p60  (3.1)", 31);
	obs_property_list_add_int(
			list, "Compatibility mode  (4.0 default)", 40);
	obs_property_list_add_int(list, "720p60/1080p30 (4.1)", 41);
	obs_property_list_add_int(list, "1080p60 (4.2)", 42);

	obs_properties_add_int(props, "bitrate", obs_module_text("Bitrate"), 0,
			300000, 50);

	obs_properties_add_int(props, "keyint_sec",
			obs_module_text("Keyframe Interval (seconds)"), 0, 20,
			1);

	return props;
}
Esempio n. 9
0
static obs_properties_t *obs_x264_props(void *unused)
{
	UNUSED_PARAMETER(unused);

	obs_properties_t *props = obs_properties_create();
	obs_property_t *list;
	obs_property_t *p;

	obs_properties_add_int(props, "bitrate", TEXT_BITRATE, 50, 10000000, 1);

	p = obs_properties_add_bool(props, "use_bufsize", TEXT_CUSTOM_BUF);
	obs_property_set_modified_callback(p, use_bufsize_modified);
	obs_properties_add_int(props, "buffer_size", TEXT_BUF_SIZE, 0,
			10000000, 1);

	obs_properties_add_int(props, "keyint_sec", TEXT_KEYINT_SEC, 0, 20, 1);
	p = obs_properties_add_bool(props, "cbr", TEXT_USE_CBR);
	obs_properties_add_int(props, "crf", TEXT_CRF, 0, 51, 1);

	obs_property_set_modified_callback(p, use_cbr_modified);

	list = obs_properties_add_list(props, "preset", TEXT_PRESET,
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
	add_strings(list, x264_preset_names);

	list = obs_properties_add_list(props, "profile", TEXT_PROFILE,
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
	obs_property_list_add_string(list, TEXT_NONE, "");
	obs_property_list_add_string(list, "baseline", "baseline");
	obs_property_list_add_string(list, "main", "main");
	obs_property_list_add_string(list, "high", "high");

	list = obs_properties_add_list(props, "tune", TEXT_TUNE,
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
	obs_property_list_add_string(list, TEXT_NONE, "");
	add_strings(list, x264_tune_names);

	obs_properties_add_bool(props, "vfr", TEXT_VFR);

	obs_properties_add_text(props, "x264opts", TEXT_X264_OPTS,
			OBS_TEXT_DEFAULT);

	return props;
}
Esempio n. 10
0
static obs_properties_t *aac_properties(void *unused)
{
	UNUSED_PARAMETER(unused);

	obs_properties_t *props = obs_properties_create();

	obs_properties_add_int(props, "bitrate",
			obs_module_text("Bitrate"), 32, 320, 32);
	return props;
}
Esempio n. 11
0
static obs_properties_t *rtmp_stream_properties(void *unused)
{
	UNUSED_PARAMETER(unused);

	obs_properties_t *props = obs_properties_create();

	obs_properties_add_int(props, OPT_DROP_THRESHOLD,
			obs_module_text("RTMPStream.DropThreshold"),
			200, 10000, 100);
	return props;
}
Esempio n. 12
0
static obs_properties_t libfdk_properties(void)
{
	obs_properties_t props = obs_properties_create();

	obs_properties_add_int(props, "bitrate",
			obs_module_text("Bitrate"), 32, 256, 32);
	obs_properties_add_bool(props, "afterburner",
			obs_module_text("Afterburner"));

	return props;
}
Esempio n. 13
0
static obs_properties_t *crop_filter_properties(void *data)
{
	obs_properties_t *props = obs_properties_create();

	obs_property_t *p = obs_properties_add_bool(props, "relative",
			obs_module_text("Crop.Relative"));

	obs_property_set_modified_callback(p, relative_clicked);

	obs_properties_add_int(props, "left", obs_module_text("Crop.Left"),
			0, 8192, 1);
	obs_properties_add_int(props, "top", obs_module_text("Crop.Top"),
			0, 8192, 1);
	obs_properties_add_int(props, "right", obs_module_text("Crop.Right"),
			0, 8192, 1);
	obs_properties_add_int(props, "bottom", obs_module_text("Crop.Bottom"),
			0, 8192, 1);
	obs_properties_add_int(props, "cx", obs_module_text("Crop.Width"),
			0, 8192, 1);
	obs_properties_add_int(props, "cy", obs_module_text("Crop.Height"),
			0, 8192, 1);

	UNUSED_PARAMETER(data);
	return props;
}
Esempio n. 14
0
static obs_properties_t *stinger_properties(void *data)
{
	obs_properties_t *ppts = obs_properties_create();

	obs_properties_set_flags(ppts, OBS_PROPERTIES_DEFER_UPDATE);

	obs_properties_add_path(ppts, "path",
			obs_module_text("VideoFile"),
			OBS_PATH_FILE,
			FILE_FILTER, NULL);
	obs_property_t *list = obs_properties_add_list(ppts, "tp_type",
			obs_module_text("TransitionPointType"),
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
	obs_property_list_add_int(list,
			obs_module_text("TransitionPointTypeTime"),
			TIMING_TIME);
	obs_property_list_add_int(list,
			obs_module_text("TransitionPointTypeFrame"),
			TIMING_FRAME);

	obs_property_set_modified_callback(list, transition_point_type_modified);

	obs_properties_add_int(ppts, "transition_point",
			obs_module_text("TransitionPoint"),
			0, 120000, 1);

	obs_property_t *monitor_list = obs_properties_add_list(ppts,
			"audio_monitoring", obs_module_text("AudioMonitoring"),
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
	obs_property_list_add_int(monitor_list,
			obs_module_text("AudioMonitoring.None"),
			OBS_MONITORING_TYPE_NONE);
	obs_property_list_add_int(monitor_list,
			obs_module_text("AudioMonitoring.MonitorOnly"),
			OBS_MONITORING_TYPE_MONITOR_ONLY);
	obs_property_list_add_int(monitor_list,
			obs_module_text("AudioMonitoring.Both"),
			OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT);

	obs_property_t *audio_fade_style = obs_properties_add_list(ppts,
			"audio_fade_style", obs_module_text("AudioFadeStyle"),
			OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
	obs_property_list_add_int(audio_fade_style,
			obs_module_text("AudioFadeStyle.FadeOutFadeIn"),
			FADE_STYLE_FADE_OUT_FADE_IN);
	obs_property_list_add_int(audio_fade_style,
			obs_module_text("AudioFadeStyle.CrossFade"),
			FADE_STYLE_CROSS_FADE);

	UNUSED_PARAMETER(data);
	return ppts;
}
Esempio n. 15
0
static obs_properties_t *qtwebkit_get_properties(void *)
{
	obs_properties_t *props = obs_properties_create();

	obs_property_t *prop = obs_properties_add_bool(props, "is_local_file",
			obs_module_text("LocalFile"));

	obs_property_set_modified_callback(prop, is_local_file_modified);
	obs_properties_add_path(props, "local_file", obs_module_text("LocalFile"),
			OBS_PATH_FILE, "*.*", nullptr);
	obs_properties_add_text(props, "url", obs_module_text("URL"), OBS_TEXT_DEFAULT);

	obs_properties_add_int(props, "width", obs_module_text("Width"), 1, 4096, 1);
	obs_properties_add_int(props, "height", obs_module_text("Height"), 1, 4096, 1);
	obs_properties_add_int(props, "fps", obs_module_text("FPS"), 1, 60, 1);
	obs_properties_add_path(props, "css_file", obs_module_text("CustomCSS"),
			OBS_PATH_FILE, "*.css", nullptr);

	obs_properties_add_button(props, "reload", obs_module_text("Reload"), reload_button_clicked);

	return props;
}
Esempio n. 16
0
static obs_properties_t *ft2_source_properties(void *unused)
{
	UNUSED_PARAMETER(unused);

	obs_properties_t *props = obs_properties_create();
	//obs_property_t *prop;

	// TODO:
	//	Scrolling. Can't think of a way to do it with the render
	//		targets currently being broken. (0.4.2)
	//	Better/pixel shader outline/drop shadow
	//	Some way to pull text files from network, I dunno

	obs_properties_add_font(props, "font",
		obs_module_text("Font"));

	obs_properties_add_text(props, "text",
		obs_module_text("Text"), OBS_TEXT_MULTILINE);

	obs_properties_add_bool(props, "from_file",
		obs_module_text("ReadFromFile"));

	obs_properties_add_bool(props, "log_mode",
		obs_module_text("ChatLogMode"));

	obs_properties_add_path(props,
		"text_file", obs_module_text("TextFile"),
		OBS_PATH_FILE, obs_module_text("TextFileFilter"), NULL);

	obs_properties_add_color(props, "color1",
		obs_module_text("Color1"));

	obs_properties_add_color(props, "color2",
		obs_module_text("Color2"));

	obs_properties_add_bool(props, "outline",
		obs_module_text("Outline"));

	obs_properties_add_bool(props, "drop_shadow",
		obs_module_text("DropShadow"));

	obs_properties_add_int(props, "custom_width",
		obs_module_text("CustomWidth"), 0, 4096, 1);

	obs_properties_add_bool(props, "word_wrap",
		obs_module_text("WordWrap"));

	return props;
}
// Creates all of the properties or "settings" for our source
static obs_properties_t *destiny_detail_properties(void *data)
{
	UNUSED_PARAMETER(data);

	obs_properties_t *props = obs_properties_create();

	obs_properties_add_int(
		props,
		"account_id",
		"AccountID",
		0,
		INT_MAX,
		1);

	return props;
}
Esempio n. 18
0
static obs_properties_t *color_filter_properties(void *data)
{
	obs_properties_t *props = obs_properties_create();

	obs_properties_add_color(props, SETTING_COLOR, TEXT_COLOR);
	obs_properties_add_int(props, SETTING_OPACITY, TEXT_OPACITY,
			0, 100, 1);
	obs_properties_add_float_slider(props, SETTING_CONTRAST,
			TEXT_CONTRAST, -1.0, 1.0, 0.01);
	obs_properties_add_float_slider(props, SETTING_BRIGHTNESS,
			TEXT_BRIGHTNESS, -1.0, 1.0, 0.01);
	obs_properties_add_float_slider(props, SETTING_GAMMA,
			TEXT_GAMMA, -1.0, 1.0, 0.01);

	UNUSED_PARAMETER(data);
	return props;
}
Esempio n. 19
0
/**
 * Get the properties for the capture
 */
static obs_properties_t xshm_properties(void)
{
	obs_properties_t props = obs_properties_create();
	int_fast32_t screen_max;

	Display *dpy = XOpenDisplay(NULL);
	screen_max = xinerama_is_active(dpy)
		? xinerama_screen_count(dpy)
		: XScreenCount(dpy);
	screen_max = (screen_max) ? screen_max - 1 : 0;
	XCloseDisplay(dpy);

	obs_properties_add_int(props, "screen",
			obs_module_text("Screen"), 0, screen_max, 1);
	obs_properties_add_bool(props, "show_cursor",
			obs_module_text("CaptureCursor"));

	return props;
}
Esempio n. 20
0
static obs_properties_t *ffmpeg_source_getproperties(void *data)
{
	struct dstr filter = {0};
	UNUSED_PARAMETER(data);

	obs_properties_t *props = obs_properties_create();

	obs_properties_set_flags(props, OBS_PROPERTIES_DEFER_UPDATE);

	obs_property_t *prop;
	// use this when obs allows non-readonly paths
	prop = obs_properties_add_bool(props, "is_local_file",
			obs_module_text("LocalFile"));

	obs_property_set_modified_callback(prop, is_local_file_modified);

	dstr_copy(&filter, obs_module_text("MediaFileFilter.AllMediaFiles"));
	dstr_cat(&filter, media_filter);
	dstr_cat(&filter, obs_module_text("MediaFileFilter.VideoFiles"));
	dstr_cat(&filter, video_filter);
	dstr_cat(&filter, obs_module_text("MediaFileFilter.AudioFiles"));
	dstr_cat(&filter, audio_filter);
	dstr_cat(&filter, obs_module_text("MediaFileFilter.AllFiles"));
	dstr_cat(&filter, " (*.*)");

	obs_properties_add_path(props, "local_file",
			obs_module_text("LocalFile"), OBS_PATH_FILE,
			filter.array, NULL);
	dstr_free(&filter);

	obs_properties_add_bool(props, "looping", obs_module_text("Looping"));

	obs_properties_add_bool(props, "restart_on_activate",
			obs_module_text("RestartWhenActivated"));

	obs_properties_add_text(props, "input",
			obs_module_text("Input"), OBS_TEXT_DEFAULT);

	obs_properties_add_text(props, "input_format",
			obs_module_text("InputFormat"), OBS_TEXT_DEFAULT);

	obs_properties_add_bool(props, "hw_decode",
			obs_module_text("HardwareDecode"));

	obs_properties_add_bool(props, "clear_on_media_end",
			obs_module_text("ClearOnMediaEnd"));

	prop = obs_properties_add_bool(props, "advanced",
			obs_module_text("Advanced"));

	obs_property_set_modified_callback(prop, is_advanced_modified);

	obs_properties_add_bool(props, "force_scale",
			obs_module_text("ForceFormat"));

	prop = obs_properties_add_int(props, "audio_buffer_size",
			obs_module_text("AudioBufferSize"), 1, 9999, 1);

	obs_property_set_visible(prop, false);

	prop = obs_properties_add_int(props, "video_buffer_size",
			obs_module_text("VideoBufferSize"), 1, 9999, 1);

	obs_property_set_visible(prop, false);

	prop = obs_properties_add_list(props, "frame_drop",
			obs_module_text("FrameDropping"), OBS_COMBO_TYPE_LIST,
			OBS_COMBO_FORMAT_INT);

	obs_property_list_add_int(prop, obs_module_text("DiscardNone"),
			AVDISCARD_NONE);
	obs_property_list_add_int(prop, obs_module_text("DiscardDefault"),
			AVDISCARD_DEFAULT);
	obs_property_list_add_int(prop, obs_module_text("DiscardNonRef"),
			AVDISCARD_NONREF);
	obs_property_list_add_int(prop, obs_module_text("DiscardBiDir"),
			AVDISCARD_BIDIR);
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 67, 100)
	obs_property_list_add_int(prop, obs_module_text("DiscardNonIntra"),
			AVDISCARD_NONINTRA);
#endif
	obs_property_list_add_int(prop, obs_module_text("DiscardNonKey"),
			AVDISCARD_NONKEY);
	obs_property_list_add_int(prop, obs_module_text("DiscardAll"),
			AVDISCARD_ALL);

	obs_property_set_visible(prop, false);

	return props;
}
Esempio n. 21
0
static obs_properties_t *obs_qsv_props(void *unused)
{
	UNUSED_PARAMETER(unused);

	obs_properties_t *props = obs_properties_create();
	obs_property_t *list;

	list = obs_properties_add_list(props, "target_usage", TEXT_SPEED,
		OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
	add_strings(list, qsv_usage_names);

	list = obs_properties_add_list(props, "profile", TEXT_PROFILE,
		OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
	add_strings(list, qsv_profile_names);

	obs_properties_add_int(props, "keyint_sec", TEXT_KEYINT_SEC, 1, 20, 1);
	obs_properties_add_int(props, "async_depth", TEXT_ASYNC_DEPTH, 1, 7, 1);

	list = obs_properties_add_list(props, "rate_control", TEXT_RATE_CONTROL,
		OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
	add_rate_controls(list, qsv_ratecontrols);
	obs_property_set_modified_callback(list, rate_control_modified);

	obs_properties_add_int(props, "bitrate", TEXT_TARGET_BITRATE, 50,
			10000000, 1);
	obs_properties_add_int(props, "max_bitrate", TEXT_MAX_BITRATE, 50,
			10000000, 1);
	obs_properties_add_int(props, "accuracy", TEXT_ACCURACY, 0, 10000, 1);
	obs_properties_add_int(props, "convergence", TEXT_CONVERGENCE, 0, 10, 1);
	obs_properties_add_int(props, "qpi", "QPI", 1, 51, 1);
	obs_properties_add_int(props, "qpp", "QPP", 1, 51, 1);
	obs_properties_add_int(props, "qpb", "QPB", 1, 51, 1);
	obs_properties_add_int(props, "icq_quality", TEXT_ICQ_QUALITY, 1, 51, 1);
	obs_properties_add_int(props, "la_depth", TEXT_LA_DEPTH, 10, 100, 1);

	return props;
}