Posts

Showing posts from December, 2013

Lync Server Call Handling and Transfer Using UCMA

Microsoft Unified Communications Managed API? Never heard of it? Yes, it's not that common for programmer to integrate with Lync, especially - its server part. Though I had (still have?) an opportunity to work with it (UCMA 3.0) and now I will tell you one of the interesting stuff I was able to implement using it. I am not talking about really advanced (say, "advanced advanced") things like changing/looking at the SIP headers or implementing custom codecs for media but something more advanced than starting a conference. Here is the scenario: I need to move (transfer) the incoming (dialin) audio call from conference to conference endlessly, with no bounds. Once moved to one conference, you should be able to kick the user to another conference as much times as he(she) desires. For the unpatient, I'll say that the trick here is to use the call self-transfer. But let's get to the sample. Sample is called "Locations" and is freely available at GitHub Wh

DXGI fast screen capture

Task at hand was capturing desktop or monitor contents under Windows really fast. Actually, the faster is better because the real contents of the buffer I am writing to will be displayed/rendered in real time. There are several options of screen capture in Windows. The oldest and the easiest one is using GDI. The minus of it is that it's really slow. The second way of performing capture is DirectX Graphics Infrastructure - you command video card to store the whole screen or one/several monitors's contents inside separate part of its memory (surface). After that, you can either command video card to draw it somewhere else (for example, on texture). Or lock this surface and copy its contents to the main memory. Looks a lot more promising, huh? Of course I chose the DXGI way! To keep the actual DXGI-based implementation away from the main sources, I had created DXGIManager object incapsulating the actual capture stuff and opened up only a few basic methods: HRESULT SetCapt