PJSIP compile patch for disabled video

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,
Hello Teluu,

at the moment, it is not possible to compile PJSIP trunk from SVN
without video support. The attached patch fixes this issue. I would be
grateful if you could review and integrate this patch.

I know I also promised a rewritten patch for C++ 17 support for PJSUA2,
but unfortunately this task lost priority on my side because I had to
switch back to C++14. I hope to still submit this patch at a later
timer. My apologies for that.


Best regards and have a nice day,

   Christian

Index: pjsip/src/pjsua2/endpoint.cpp
===================================================================
--- pjsip/src/pjsua2/endpoint.cpp	(revision 5986)
+++ pjsip/src/pjsua2/endpoint.cpp	(working copy)
@@ -2068,6 +2068,7 @@
 VideoMediaVector Endpoint::mediaEnumVidPorts() const throw(Error)
 {
     VideoMediaVector vmv;
+#if PJSUA_HAS_VIDEO
     pjsua_conf_port_id ids[PJSUA_MAX_CONF_PORTS];
     unsigned i, count = PJSUA_MAX_CONF_PORTS;

@@ -2077,6 +2078,7 @@
 	vm.setPortId(ids[i]);
 	vmv.push_back(vm);
     }
+#endif

     return vmv;
 }
Index: pjsip/src/pjsua2/media.cpp
===================================================================
--- pjsip/src/pjsua2/media.cpp	(revision 5986)
+++ pjsip/src/pjsua2/media.cpp	(working copy)
@@ -1881,17 +1881,21 @@
 			    "VideoMedia is occupied");
     }

+#if PJSUA_HAS_VIDEO
     PJSUA2_CHECK_EXPR( pjsua_vid_conf_add_port(pool,
 					       (pjmedia_port*)port, NULL,
 					       &id) );
+#endif
 }

 void VideoMedia::unregisterMediaPort()
 {
+#if PJSUA_HAS_VIDEO
     if (id != PJSUA_INVALID_ID) {
 	pjsua_vid_conf_remove_port(id);
 	id = PJSUA_INVALID_ID;
     }
+#endif
 }

 VideoMedia::~VideoMedia()
@@ -1910,11 +1914,15 @@

 VidConfPortInfo VideoMedia::getPortInfoFromId(int port_id) throw(Error)
 {
+    VidConfPortInfo pi;
+#if PJSUA_HAS_VIDEO
     pjsua_vid_conf_port_info pj_info;
-    VidConfPortInfo pi;

     PJSUA2_CHECK_EXPR( pjsua_vid_conf_get_port_info(port_id, &pj_info) );
     pi.fromPj(pj_info);
+#else
+    PJ_UNUSED_ARG(port_id);
+#endif
     return pi;
 }

@@ -1923,10 +1931,18 @@
      throw(Error)
 {
     PJ_UNUSED_ARG(param);
+#if PJSUA_HAS_VIDEO
     PJSUA2_CHECK_EXPR( pjsua_vid_conf_connect(id, sink.id, NULL) );
+#else
+    PJ_UNUSED_ARG(sink);
+#endif
 }

 void VideoMedia::stopTransmit(const VideoMedia &sink) const throw(Error)
 {
+#if PJSUA_HAS_VIDEO
     PJSUA2_CHECK_EXPR( pjsua_vid_conf_disconnect(id, sink.id) );
+#else
+    PJ_UNUSED_ARG(sink);
+#endif
 }
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux