Question

I want to use PJSIP with video support for a Windows program (Win32/MFC/C++). By taking a look at the site of PJSIP project (http://trac.pjsip.org/repos/wiki/Getting-Started/Windows) I see among others (Additional requirements):

  • DirectShow SDK, included in Windows SDK.
  • SDL version 2.0 or version 1.3

In this case I need following configuration in my config_site.h:

#define PJMEDIA_HAS_VIDEO               1
#define PJMEDIA_HAS_FFMPEG              1
#define PJMEDIA_VIDEO_DEV_HAS_SDL       1
#define PJMEDIA_VIDEO_DEV_HAS_DSHOW     1

If I add this two components to my PJSIP project, all works fine, I get notification about an incoming call and I can show / capture the video from camera on the door.

My question: Do I really need both of this components (SDL and DirectX/DirectShow) for a Windows program? That means, do I obligatory need the SDL (I suppose not) and if yes do I need DirectX as well? Why can I not use OpenGL for Windows? Maybe somebody has experiences with this theme - I would appreciate your help!

Was it helpful?

Solution

You definitely need DirectShow. Not positive about requiring SDL...

DirectShow provides the streaming interface to video capture sources in Windows. Although DirectShow itself is primarily a set of user mode components, the supplied video capture filter (typically KsProxy.ax) communicates via a defined set of interfaces and properties to kernel level capture drivers. Some camera manufacturers choose to provide their own user mode DirectShow capture filter with private (generally kernel) interfaces to their hardware, and this makes DirectShow the common access point for all Windows video capture devices.

SDL provides a cross platform library which gives quick access to the display. This is used by the codecs in PJSIP to get decoded video to the display.

It looks like PJSIP possibly supports using DirectShow as the rendering filter. See: http://svn.pjsip.org/repos/pjproject/trunk/pjmedia/src/pjmedia-videodev/dshow_dev.c

It's unclear from the source whether the code to enable the DirectShow renderer at line 52 would function if enabled:

/* Temporarily disable DirectShow renderer (VMR) */
#define HAS_VMR         0

Since this is commented out, I would assume the code wasn't fully completed which is why all the examples also require SDL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top