开发者

Disconnect, then reconnect pin

开发者 https://www.devze.com 2023-02-04 03:56 出处:网络
I\'m using DirectShow.net and SlimDX to put a video texture on a quad. I\'ve got a problem on device lost. I\'m not able to reset my device. After hours of googling, I\'ve find a forum topic where the

I'm using DirectShow.net and SlimDX to put a video texture on a quad. I've got a problem on device lost. I'm not able to reset my device. After hours of googling, I've find a forum topic where the solution was to disconnect the vmr9 pin, reset 开发者_运维知识库the device and reconnect the pin.

I know how to disconnect :

IPin pin;
vmr9.FindPin("VMR Input0", out pin);
pin.Disconnect();

and with this, reset is OK, but how can I connect again ?


OK, found this :

IPin pin;
IPin receivePin;
vmr9.FindPin("VMR Input0", out pin);
pin.ConnectedTo(out receivePin);
pin.Disconnect();
receivePin.Disconnect();

To reconnect :

pin.Connect(receivePin, null);

Seems to work.

0

精彩评论

暂无评论...
验证码 换一张
取 消