Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recreating Theater Mode with DirectX

I need to simultaneously display a video that is playing in my applciation, full screen on a larger monitor. On some video cards, this is called Theater mode and is configured using a tool that the card manufacturer supplies.

I would like to do this with only software. Can I do this with DirectX?

My idea is to take the currently active video playing using DirectShow and repaint it on a second display (as configured by the user) in full screen mode.

What technologies or methods would I use for this?

like image 736
Jason Avatar asked Nov 04 '22 09:11

Jason


1 Answers

The straightforward way is to split yet encoded video into two branches and use two video renderer set to present video on different monitors. One renderer could be a part of your application UI, the other could expand full screen on the large secondary monitor.

enter image description here

Splitting encoded video give you an option to still leverage hardware assisted decoding (DXVA) if available. You might prefer to use software only decoder and split already decoded video - this is also going to work.

You might additionally want to implement filter which would separately temporarily disable one or the other renderer, such as for example by stopping passing media samples through.

Another thing you can do is to use bridging to even more flexibly control the renderers and be able to detach them from media source.

like image 130
Roman R. Avatar answered Nov 18 '22 06:11

Roman R.