@@ -1095,6 +1095,32 @@ static int dshow_control_message(AVFormatContext *avctx, int type, void *data, s
case AV_APP_TO_DEV_TOGGLE_PAUSE:
run_state = !run_state;
break;
+ case AV_APP_TO_DEV_CONFIG:
+ {
+ /*
+ * Documentation of dialog variable:
+ * 1st bit: if set, audio device, if not set, video device
+ * 2nd bit: if set, show property dialog for audio/video capture device
+ * 3rd bit: if set, show property dialog for crossbar connecting pins filter on audio/video device
+ * 4th bit: if set, show property dialog for analog tuner audio / analog tuner filter
+ */
+ int dialog = *(int *) data;
+ enum dshowDeviceType devtype = (dialog & 1) ? AudioDevice : VideoDevice;
+ if (dialog & 1<<1) {
+ // device_dialog
+ if (ctx->device_filter[devtype])
+ ff_dshow_show_filter_properties(ctx->device_filter[devtype], avctx);
+ }
+ else if (dialog & 1<<2) {
+ // crossbar_connection_dialog
+ // TODO
+ }
+ else if (dialog & 1<<3) {
+ // tv_tuner_dialog
+ // TODO
+ }
+ break;
+ }
}
// if play state change requested, apply
DirectShow source will pop up its configuration dialog when AV_APP_TO_DEV_CONFIG is received. Implementation for several other possible configuration dialogs is more involved and will be provided in the next commit. Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> --- libavdevice/dshow.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)