Commit 7c2e2627 authored by rogerdpack's avatar rogerdpack

dshow: crossbar dialog was frequently being displayed twice, split up option so it can be just once

Signed-off-by: 's avatarrogerdpack <rogerpack2005@gmail.com>
parent ce1bbb08
...@@ -255,10 +255,15 @@ If set to @option{true}, before capture starts, popup a display dialog ...@@ -255,10 +255,15 @@ If set to @option{true}, before capture starts, popup a display dialog
to the end user, allowing them to change audio filter properties to the end user, allowing them to change audio filter properties
and configurations manually. and configurations manually.
@item show_crossbar_connection_dialog @item show_video_crossbar_connection_dialog
If set to @option{true}, before capture starts, popup a display If set to @option{true}, before capture starts, popup a display
dialog to the end user, allowing them to manually dialog to the end user, allowing them to manually
modify crossbar pin routings. modify crossbar pin routings, when it opens a video device.
@item show_audio_crossbar_connection_dialog
If set to @option{true}, before capture starts, popup a display
dialog to the end user, allowing them to manually
modify crossbar pin routings, when it opens an audio device.
@item show_analog_tv_tuner_dialog @item show_analog_tv_tuner_dialog
If set to @option{true}, before capture starts, popup a display If set to @option{true}, before capture starts, popup a display
......
...@@ -1199,9 +1199,12 @@ static const AVOption options[] = { ...@@ -1199,9 +1199,12 @@ static const AVOption options[] = {
{ "show_audio_device_dialog", "display property dialog for audio capture device", OFFSET(show_audio_device_dialog), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC, "show_audio_device_dialog" }, { "show_audio_device_dialog", "display property dialog for audio capture device", OFFSET(show_audio_device_dialog), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC, "show_audio_device_dialog" },
{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, DEC, "show_audio_device_dialog" }, { "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, DEC, "show_audio_device_dialog" },
{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, DEC, "show_audio_device_dialog" }, { "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, DEC, "show_audio_device_dialog" },
{ "show_crossbar_connection_dialog", "display property dialog for crossbar connecting pins filter", OFFSET(show_crossbar_connection_dialog), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC, "show_crossbar_connection_dialog" }, { "show_video_crossbar_connection_dialog", "display property dialog for crossbar connecting pins filter on video device", OFFSET(show_video_crossbar_connection_dialog), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC, "show_video_crossbar_connection_dialog" },
{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, DEC, "show_crossbar_connection_dialog" }, { "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, DEC, "show_video_crossbar_connection_dialog" },
{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, DEC, "show_crossbar_connection_dialog" }, { "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, DEC, "show_video_crossbar_connection_dialog" },
{ "show_audio_crossbar_connection_dialog", "display property dialog for crossbar connecting pins filter on audio device", OFFSET(show_audio_crossbar_connection_dialog), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC, "show_audio_crossbar_connection_dialog" },
{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, DEC, "show_audio_crossbar_connection_dialog" },
{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, DEC, "show_audio_crossbar_connection_dialog" },
{ "show_analog_tv_tuner_dialog", "display property dialog for analog tuner filter", OFFSET(show_analog_tv_tuner_dialog), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC, "show_analog_tv_tuner_dialog" }, { "show_analog_tv_tuner_dialog", "display property dialog for analog tuner filter", OFFSET(show_analog_tv_tuner_dialog), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, DEC, "show_analog_tv_tuner_dialog" },
{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, DEC, "show_analog_tv_tuner_dialog" }, { "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, DEC, "show_analog_tv_tuner_dialog" },
{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, DEC, "show_analog_tv_tuner_dialog" }, { "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, DEC, "show_analog_tv_tuner_dialog" },
......
...@@ -303,7 +303,8 @@ struct dshow_ctx { ...@@ -303,7 +303,8 @@ struct dshow_ctx {
char *audio_pin_name; char *audio_pin_name;
int show_video_device_dialog; int show_video_device_dialog;
int show_audio_device_dialog; int show_audio_device_dialog;
int show_crossbar_connection_dialog; int show_video_crossbar_connection_dialog;
int show_audio_crossbar_connection_dialog;
int show_analog_tv_tuner_dialog; int show_analog_tv_tuner_dialog;
int show_analog_tv_tuner_audio_dialog; int show_analog_tv_tuner_audio_dialog;
......
...@@ -158,7 +158,8 @@ dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, ...@@ -158,7 +158,8 @@ dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2,
} }
/* TODO some TV tuners apparently have multiple crossbars? */ /* TODO some TV tuners apparently have multiple crossbars? */
if (ctx->show_crossbar_connection_dialog) { if (devtype == VideoDevice && ctx->show_video_crossbar_connection_dialog ||
devtype == AudioDevice && ctx->show_audio_crossbar_connection_dialog) {
hr = IAMCrossbar_QueryInterface(cross_bar, &IID_IBaseFilter, (void **) &cross_bar_base_filter); hr = IAMCrossbar_QueryInterface(cross_bar, &IID_IBaseFilter, (void **) &cross_bar_base_filter);
if (hr != S_OK) if (hr != S_OK)
goto end; goto end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment