29 case PhysConn_Video_Tuner:
return "Video Tuner";
30 case PhysConn_Video_Composite:
return "Video Composite";
31 case PhysConn_Video_SVideo:
return "S-Video";
32 case PhysConn_Video_RGB:
return "Video RGB";
33 case PhysConn_Video_YRYBY:
return "Video YRYBY";
34 case PhysConn_Video_SerialDigital:
return "Video Serial Digital";
35 case PhysConn_Video_ParallelDigital:
return "Video Parallel Digital";
36 case PhysConn_Video_SCSI:
return "Video SCSI";
37 case PhysConn_Video_AUX:
return "Video AUX";
38 case PhysConn_Video_1394:
return "Video 1394";
39 case PhysConn_Video_USB:
return "Video USB";
40 case PhysConn_Video_VideoDecoder:
return "Video Decoder";
41 case PhysConn_Video_VideoEncoder:
return "Video Encoder";
43 case PhysConn_Audio_Tuner:
return "Audio Tuner";
44 case PhysConn_Audio_Line:
return "Audio Line";
45 case PhysConn_Audio_Mic:
return "Audio Microphone";
46 case PhysConn_Audio_AESDigital:
return "Audio AES/EBU Digital";
47 case PhysConn_Audio_SPDIFDigital:
return "Audio S/PDIF";
48 case PhysConn_Audio_SCSI:
return "Audio SCSI";
49 case PhysConn_Audio_AUX:
return "Audio AUX";
50 case PhysConn_Audio_1394:
return "Audio 1394";
51 case PhysConn_Audio_USB:
return "Audio USB";
52 case PhysConn_Audio_AudioDecoder:
return "Audio Decoder";
53 default:
return "Unknown Crossbar Pin Type—Please report!";
61 long count_output_pins, count_input_pins;
64 int video_input_pin =
ctx->crossbar_video_input_pin_number;
65 int audio_input_pin =
ctx->crossbar_audio_input_pin_number;
69 av_log(avctx, log_level,
"Crossbar Switching Information for %s:\n",
device_name);
70 hr = IAMCrossbar_get_PinCounts(cross_bar, &count_output_pins, &count_input_pins);
76 for (
i = 0;
i < count_output_pins;
i++)
79 long related_pin, pin_type, route_to_pin;
80 hr = IAMCrossbar_get_CrossbarPinInfo(cross_bar, FALSE,
i, &related_pin, &pin_type);
81 if (pin_type == PhysConn_Video_VideoDecoder) {
83 if (video_input_pin != -1) {
84 av_log(avctx, log_level,
"Routing video input from pin %d\n", video_input_pin);
85 hr = IAMCrossbar_Route(cross_bar,
i, video_input_pin);
87 av_log(avctx,
AV_LOG_ERROR,
"Unable to route video input from pin %d\n", video_input_pin);
91 }
else if (pin_type == PhysConn_Audio_AudioDecoder) {
92 if (audio_input_pin != -1) {
93 av_log(avctx, log_level,
"Routing audio input from pin %d\n", audio_input_pin);
94 hr = IAMCrossbar_Route(cross_bar,
i, audio_input_pin);
96 av_log(avctx,
AV_LOG_ERROR,
"Unable to route audio input from pin %d\n", audio_input_pin);
104 hr = IAMCrossbar_get_IsRoutedTo(cross_bar,
i, &route_to_pin);
109 av_log(avctx, log_level,
" Crossbar Output pin %d: \"%s\" related output pin: %ld ",
i,
GetPhysicalPinName(pin_type), related_pin);
110 av_log(avctx, log_level,
"current input pin: %ld ", route_to_pin);
111 av_log(avctx, log_level,
"compatible input pins: ");
113 for (j = 0; j < count_input_pins; j++)
115 hr = IAMCrossbar_CanRoute(cross_bar,
i, j);
117 av_log(avctx, log_level ,
"%d ", j);
119 av_log(avctx, log_level,
"\n");
122 for (
i = 0;
i < count_input_pins;
i++)
124 long related_pin, pin_type;
125 hr = IAMCrossbar_get_CrossbarPinInfo(cross_bar, TRUE,
i, &related_pin, &pin_type);
131 av_log(avctx, log_level,
"related input pin: %ld\n", related_pin);
144 IAMCrossbar *cross_bar =
NULL;
145 IBaseFilter *cross_bar_base_filter =
NULL;
146 IAMTVTuner *tv_tuner_filter =
NULL;
147 IBaseFilter *tv_tuner_base_filter =
NULL;
148 IAMAudioInputMixer *tv_audio_filter =
NULL;
149 IBaseFilter *tv_audio_base_filter =
NULL;
152 hr = ICaptureGraphBuilder2_FindInterface(graph_builder2, &LOOK_UPSTREAM_ONLY, (
const GUID *)
NULL,
161 if (devtype ==
VideoDevice &&
ctx->show_video_crossbar_connection_dialog ||
162 devtype ==
AudioDevice &&
ctx->show_audio_crossbar_connection_dialog) {
163 hr = IAMCrossbar_QueryInterface(cross_bar, &IID_IBaseFilter, (
void **) &cross_bar_base_filter);
170 hr = ICaptureGraphBuilder2_FindInterface(graph_builder2, &LOOK_UPSTREAM_ONLY,
NULL,
173 hr = IAMCrossbar_QueryInterface(tv_tuner_filter, &IID_IBaseFilter, (
void **) &tv_tuner_base_filter);
181 if (devtype ==
AudioDevice &&
ctx->show_analog_tv_tuner_audio_dialog) {
182 hr = ICaptureGraphBuilder2_FindInterface(graph_builder2, &LOOK_UPSTREAM_ONLY,
NULL,
185 hr = IAMCrossbar_QueryInterface(tv_audio_filter, &IID_IBaseFilter, (
void **) &tv_audio_base_filter);
200 IAMCrossbar_Release(cross_bar);
201 if (cross_bar_base_filter)
202 IBaseFilter_Release(cross_bar_base_filter);
204 IAMTVTuner_Release(tv_tuner_filter);
205 if (tv_tuner_base_filter)
206 IBaseFilter_Release(tv_tuner_base_filter);
208 IAMAudioInputMixer_Release(tv_audio_filter);
209 if (tv_audio_base_filter)
210 IBaseFilter_Release(tv_audio_base_filter);