obs rtmp推流地址设置

主要代码在properties-view.cpp

rtmp的URL ,key 对应的QLineEdit是在程序内动态生成的

QWidget *OBSPropertiesView::AddText(obs_property_t *prop, QFormLayout *layout,
		QLabel *&label)
{
	const char    *name = obs_property_name(prop);
	const char    *val  = obs_data_get_string(settings, name);
	obs_text_type type  = obs_proprety_text_type(prop);

	if (type == OBS_TEXT_MULTILINE) {
		QPlainTextEdit *edit = new QPlainTextEdit(QT_UTF8(val));
		return NewWidget(prop, edit, SIGNAL(textChanged()));

	} else if (type == OBS_TEXT_PASSWORD) {
		QLayout *subLayout = new QHBoxLayout();
		QLineEdit *edit = new QLineEdit();
		QPushButton *show = new QPushButton();

		show->setText(QTStr("Show"));
		show->setCheckable(true);
		edit->setText(QT_UTF8(val));
		edit->setEchoMode(QLineEdit::Password);

		subLayout->addWidget(edit);
		subLayout->addWidget(show);

		WidgetInfo *info = new WidgetInfo(this, prop, edit);
		connect(show, &QAbstractButton::toggled,

你可能感兴趣的:(obs-studio)