Pausing live stream in a shader?

I am finally delving into shaders and have a basic effect working turning a video stream blacknwhite and distorting it with a sinewave (nice glitch to add to oldtv), but I want it to pause the video stream in the shader, is this possible? How to get a still frame from the videoin?

I would also like to change the addressing with an enum or different technique?. Can I declare the different modes (wrap, Border, Mirroronce etc) and call them somehow? Some nodes have an address pin, can I create one?

Thanks for any tips.

stu

VideoIn (DShow9) has an Enabled which you should be able to use for the pausing.

effects can not expose enum- and address-pins, but you could use an int like:
int AddressMode;
then you’ll make yourself 3 copies of the sampler, all referencing the same texture but using different addressmode settings.

in the pixelshader you could than use the AddressMode in an if-clause, like:

float4 col;
if (AddressMode == 0)
  col = tex2D(Samp1, In.TexCd);
else if (AddressMode == 1)
  col = tex2D(Samp2, In.TexCd);
else
  col = tex2D(Samp3, In.TexCd);

Wow, what a swift reply thankyou Joreg.

Yeah I have been using the enabled pin, but just wondered as to the possibility of doing it within a shader? .

The address mode code is cool, I understand. Thankyou again.

pausing a stream in a shader is a rather strange idea. the other thing you could do is using Queue EX9.Texture with 1 frame storage as a sample+hold.