[vlc-commits] rist modules: fix windows build

2020-12-15 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Mon Dec 
14 16:19:06 2020 -0500| [f493191a34770322951716970450effa8ec3c534] | committer: 
Pierre Ynard

rist modules: fix windows build

Signed-off-by: Pierre Ynard 

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f493191a34770322951716970450effa8ec3c534
---

 modules/access/rist.c| 2 ++
 modules/access_output/rist.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/modules/access/rist.c b/modules/access/rist.c
index 1219e170d1..1ce9e44477 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -34,7 +34,9 @@
 #include 
 #include 
 #include 
+#ifdef HAVE_POLL
 #include 
+#endif
 
 #include "rist.h"
 
diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index c1ac0bc921..0aa82cb118 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -35,7 +35,9 @@
 #include 
 #include 
 #include 
+#ifdef HAVE_POLL
 #include 
+#endif
 #include 
 #include 
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Update NEWS

2020-12-14 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Sat Nov 
21 08:18:23 2020 -0500| [86747e636de5f5fd63f819644a1bcbc69980cff0] | committer: 
Pierre Ynard

Update NEWS

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=86747e636de5f5fd63f819644a1bcbc69980cff0
---

 NEWS | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/NEWS b/NEWS
index 2baae88eef..150177692a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,12 @@
 Changes between 3.0.11.1 and 3.0.12:
 --
 
+Access:
+ * Add new RIST access module compliant with simple profile (VSF_TR-06-1)
+
+Access Output:
+ * Add new RIST access output module compliant with simple profile 
(VSF_TR-06-1)
+
 Demux:
  * Fixed adaptive's handling of resolution settings
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Backport makefile changes for rist input and output modules

2020-12-14 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Sat Nov 
21 08:12:54 2020 -0500| [dbff76e0199e29a953aa26f42450e5b640ff2fa8] | committer: 
Pierre Ynard

Backport makefile changes for rist input and output modules

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=dbff76e0199e29a953aa26f42450e5b640ff2fa8
---

 modules/access/Makefile.am| 7 +++
 modules/access_output/Makefile.am | 6 ++
 2 files changed, 13 insertions(+)

diff --git a/modules/access/Makefile.am b/modules/access/Makefile.am
index 5d2a5f915c..c8b0513637 100644
--- a/modules/access/Makefile.am
+++ b/modules/access/Makefile.am
@@ -428,3 +428,10 @@ libaccess_srt_plugin_la_LIBADD = $(SRT_LIBS)
 libaccess_srt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)'
 access_LTLIBRARIES += $(LTLIBaccess_srt)
 EXTRA_LTLIBRARIES += libaccess_srt_plugin.la
+
+### RIST ###
+
+librist_plugin_la_SOURCES = access/rist.c access/rist.h
+librist_plugin_la_CFLAGS = $(AM_CFLAGS)
+librist_plugin_la_LIBADD = $(SOCKET_LIBS)
+access_LTLIBRARIES += librist_plugin.la
diff --git a/modules/access_output/Makefile.am 
b/modules/access_output/Makefile.am
index 26560f400c..0ebc28b9f9 100644
--- a/modules/access_output/Makefile.am
+++ b/modules/access_output/Makefile.am
@@ -35,3 +35,9 @@ libaccess_output_srt_plugin_la_LIBADD = $(SRT_LIBS) 
$(LIBPTHREAD)
 libaccess_output_srt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath 
'$(access_outdir)'
 access_out_LTLIBRARIES += $(LTLIBaccess_output_srt)
 EXTRA_LTLIBRARIES += libaccess_output_srt_plugin.la
+
+### RIST ###
+libaccess_output_rist_plugin_la_SOURCES = access_output/rist.c access/rist.h
+libaccess_output_rist_plugin_la_CFLAGS = $(AM_CFLAGS)
+libaccess_output_rist_plugin_la_LIBADD = $(SOCKET_LIBS) $(LIBPTHREAD)
+access_out_LTLIBRARIES += libaccess_output_rist_plugin.la

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Protect against namespace collisions after the bitstream import

2020-12-14 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Mon Nov  
2 16:08:06 2020 -0500| [f2789e08d8702cfaa1aa580aa3d522bbde07491a] | committer: 
Pierre Ynard

Protect against namespace collisions after the bitstream import

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f2789e08d8702cfaa1aa580aa3d522bbde07491a
---

 modules/access/rist.c| 102 +--
 modules/access/rist.h|  96 
 modules/access_output/rist.c |  92 +++---
 3 files changed, 145 insertions(+), 145 deletions(-)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commitdiff;h=f2789e08d8702cfaa1aa580aa3d522bbde07491a
___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Adjust for 4.0 to 3.0 differences in rist access_output

2020-12-14 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Sun Jul 
26 16:10:46 2020 -0400| [cfd957f902bd01620ca62cc56404379f5a697ba1] | committer: 
Pierre Ynard

Adjust for 4.0 to 3.0 differences in rist access_output

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=cfd957f902bd01620ca62cc56404379f5a697ba1
---

 modules/access_output/rist.c | 57 +++-
 1 file changed, 30 insertions(+), 27 deletions(-)

diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 61066bdc2b..bf22e42e1f 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -2,7 +2,7 @@
  *  * rist.c: RIST (Reliable Internet Stream Transport) output module
  *
  * Copyright (C) 2018, DVEO, the Broadcast Division of Computer Modules, Inc.
- * Copyright (C) 2018, SipRadius LLC
+ * Copyright (C) 2018-2020, SipRadius LLC
  *
  * Authors: Sergio Ammirata 
  *  Daniele Lacamera 
@@ -33,16 +33,11 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#ifdef HAVE_POLL_H
 #include 
-#endif
 #include 
-#ifdef HAVE_SYS_SOCKET_H
 #include 
-#endif
 #include 
 #include 
 #include 
@@ -77,7 +72,7 @@ static const char *const ppsz_sout_options[] = {
 NULL
 };
 
-typedef struct
+struct sout_access_out_sys_t
 {
 struct   rist_flow *flow;
 uint16_t rtp_counter;
@@ -93,13 +88,12 @@ typedef struct
 block_t  *p_pktbuffer;
 uint64_t i_ticks_caching;
 uint32_t ssrc;
-bool dead;
-vlc_queue_t  queue;
+block_fifo_t *p_fifo;
 /* stats variables */
 uint64_t i_last_stat;
 uint32_t i_retransmit_packets;
 uint32_t i_total_packets;
-} sout_access_out_sys_t;
+};
 
 static struct rist_flow *rist_init_tx()
 {
@@ -386,7 +380,7 @@ static void rist_rtcp_send(sout_access_out_t *p_access)
 fractions <<= 32ULL;
 fractions /= 100ULL;
 rtcp_sr_set_ntp_time_lsw(p_sr, (uint32_t)fractions);
-rtcp_sr_set_rtp_time(p_sr, rtp_get_ts(vlc_tick_now()));
+rtcp_sr_set_rtp_time(p_sr, rtp_get_ts(mdate()));
 vlc_mutex_lock( &p_sys->lock );
 rtcp_sr_set_packet_count(p_sr, flow->packets_count);
 rtcp_sr_set_octet_count(p_sr, flow->bytes_count);
@@ -469,8 +463,8 @@ static void *rist_thread(void *data)
 }
 
 /* And, in any case: */
-now = vlc_tick_now();
-if ((now - p_sys->last_rtcp_tx) > VLC_TICK_FROM_MS(RTCP_INTERVAL))
+now = mdate();
+if ((now - p_sys->last_rtcp_tx) > RIST_TICK_FROM_MS(RTCP_INTERVAL))
 {
 rist_rtcp_send(p_access);
 p_sys->last_rtcp_tx = now;
@@ -488,20 +482,22 @@ static void* ThreadSend( void *data )
 {
 sout_access_out_t *p_access = data;
 sout_access_out_sys_t *p_sys = p_access->p_sys;
-vlc_tick_t i_caching = p_sys->i_ticks_caching;
+uint64_t i_caching = p_sys->i_ticks_caching;
 struct rist_flow *flow = p_sys->flow;
-block_t *out;
 
-while ((out = vlc_queue_DequeueKillable(&p_sys->queue,
-&p_sys->dead)) != NULL)
+for (;;)
 {
 ssize_t len = 0;
 uint16_t seq = 0;
 uint32_t pkt_ts = 0;
+block_t *out = block_FifoGet( p_sys->p_fifo );
 
-vlc_tick_wait (out->i_dts + i_caching);
+block_cleanup_push( out );
+mwait (out->i_dts + (mtime_t)i_caching);
+vlc_cleanup_pop();
 
 len = out->i_buffer;
+int canc = vlc_savecancel();
 
 seq = rtp_get_seqnum(out->p_buffer);
 pkt_ts = rtp_get_timestamp(out->p_buffer);
@@ -553,9 +549,9 @@ static void* ThreadSend( void *data )
 vlc_mutex_unlock( &p_sys->lock );
 
 /* We print out the stats once per second */
-uint64_t now = vlc_tick_now();
+uint64_t now = mdate();
 uint64_t interval = (now - p_sys->i_last_stat);
-if ( interval > VLC_TICK_FROM_MS(STATS_INTERVAL) )
+if ( interval > RIST_TICK_FROM_MS(STATS_INTERVAL) )
 {
 if (p_sys->i_retransmit_packets > 0)
 {
@@ -571,6 +567,8 @@ static void* ThreadSend( void *data )
 p_sys->i_total_packets = 0;
 }
 p_sys->i_total_packets++;
+
+vlc_restorecancel (canc);
 }
 return NULL;
 }
@@ -589,7 +587,8 @@ static void SendtoFIFO( sout_access_out_t *p_access, 
block_t *buffer )
 uint32_t pkt_ts = rtp_get_ts(buffer->i_dts);
 rtp_set_timestamp(bufhdr, pkt_ts);
 
-vlc_queue_Enqueue(&p_sys->queue, block_Duplicate(buffer));
+block_t *pkt = block_Duplicate(buffer);
+block_FifoPut( p_sys->p_fifo, pkt );
 }
 
 static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
@@ -685,6 +684,9 @@ static void Clean( sout_access_out_t *p_access )
 {
 sout_access_out_sys_t *p_sys = p_acce

[vlc-commits] Remove external bitstream dependencies from rist modules

2020-12-14 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Mon Nov  
2 15:42:29 2020 -0500| [df6cf9ed63285dbe4792feb47b182e7363f10cb2] | committer: 
Pierre Ynard

Remove external bitstream dependencies from rist modules

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=df6cf9ed63285dbe4792feb47b182e7363f10cb2
---

 modules/access/rist.c|   4 -
 modules/access/rist.h| 230 ++-
 modules/access_output/rist.c |   5 -
 3 files changed, 229 insertions(+), 10 deletions(-)

diff --git a/modules/access/rist.c b/modules/access/rist.c
index 6b06542cab..8e81383b68 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -35,10 +35,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
 
 #include "rist.h"
 
diff --git a/modules/access/rist.h b/modules/access/rist.h
index 263b43cb2e..cc48a31f61 100644
--- a/modules/access/rist.h
+++ b/modules/access/rist.h
@@ -366,4 +366,232 @@ static bool is_multicast_address(char *psz_dst_server)
 freeaddrinfo(res);
 
 return ismulticast;
-}
\ No newline at end of file
+}
+
+// imported from bitstream
+#define RTP_HEADER_SIZE   12
+#define RTCP_SR_SIZE  28
+#define RTCP_SDES_SIZE10
+#define RTCP_FB_HEADER_SIZE   12
+#define RTCP_FB_FCI_GENERIC_NACK_SIZE 4
+#define RTCP_PT_SR200
+#define RTCP_PT_RR201
+#define RTCP_PT_SDES  202
+#define RTCP_PT_RTPFB 205
+
+static inline uint32_t rtp_get_timestamp(const uint8_t *p_rtp)
+{
+return (p_rtp[4] << 24) | (p_rtp[5] << 16) | (p_rtp[6] << 8) | p_rtp[7];
+}
+
+static inline void rtp_set_timestamp(uint8_t *p_rtp, uint32_t i_timestamp)
+{
+p_rtp[4] = (i_timestamp >> 24) & 0xff;
+p_rtp[5] = (i_timestamp >> 16) & 0xff;
+p_rtp[6] = (i_timestamp >> 8) & 0xff;
+p_rtp[7] = i_timestamp & 0xff;
+}
+
+static inline uint16_t rtp_get_seqnum(const uint8_t *p_rtp)
+{
+return (p_rtp[2] << 8) | p_rtp[3];
+}
+
+static inline void rtp_set_seqnum(uint8_t *p_rtp, uint16_t i_seqnum)
+{
+p_rtp[2] = i_seqnum >> 8;
+p_rtp[3] = i_seqnum & 0xff;
+}
+
+static inline int8_t rtcp_sdes_get_name_length(const uint8_t *p_rtcp_sdes)
+{
+return p_rtcp_sdes[9];
+}
+
+static inline uint16_t rtcp_get_length(const uint8_t *p_rtcp)
+{
+return (p_rtcp[2] << 8) | p_rtcp[3];
+}
+
+static inline void rtcp_set_length(uint8_t *p_rtcp,
+  uint16_t length)
+{
+p_rtcp[2] = length >> 8;
+p_rtcp[3] = length & 0xff;
+}
+
+static inline uint8_t rtcp_get_pt(const uint8_t *p_rtcp)
+{
+return p_rtcp[1];
+}
+
+static inline void rtcp_set_pt(uint8_t *p_rtcp, uint8_t pt)
+{
+p_rtcp[1] = pt;
+}
+
+static inline bool rtp_check_hdr(const uint8_t *p_rtp)
+{
+return (p_rtp[0] & 0xc0) == 0x80;
+}
+
+static inline void rtp_set_hdr(uint8_t *p_rtp)
+{
+p_rtp[0] = 0x80;
+}
+
+static inline void rtcp_rr_set_pt(uint8_t *p_rtcp_rr)
+{
+rtcp_set_pt(p_rtcp_rr, RTCP_PT_RR);
+}
+
+static inline void rtcp_fb_set_int_ssrc_pkt_sender(uint8_t *p_rtcp_fb, 
uint32_t i_ssrc)
+{
+p_rtcp_fb[4] = (i_ssrc >> 24) & 0xff;
+p_rtcp_fb[5] = (i_ssrc >> 16) & 0xff;
+p_rtcp_fb[6] = (i_ssrc >> 8) & 0xff;
+p_rtcp_fb[7] = i_ssrc & 0xff;
+}
+
+static inline void rtp_set_cc(uint8_t *p_rtp, uint8_t i_cc)
+{
+p_rtp[0] &= 0xf0;
+p_rtp[0] |= i_cc & 0xf;
+}
+
+static inline void rtcp_sdes_set_pt(uint8_t *p_rtcp_rr)
+{
+rtcp_set_pt(p_rtcp_rr, RTCP_PT_SDES);
+}
+
+static inline void rtcp_sdes_set_cname(uint8_t *p_rtcp_sdes, uint8_t cname)
+{
+p_rtcp_sdes[8] = cname;
+}
+
+static inline void rtcp_sdes_set_name_length(uint8_t *p_rtcp_sdes,
+int8_t name_length)
+{
+p_rtcp_sdes[9] = name_length;
+}
+
+static inline uint8_t rtcp_fb_get_fmt(const uint8_t *p_rtcp)
+{
+return p_rtcp[0] & 0x1f;
+}
+
+static inline void rtcp_fb_set_fmt(uint8_t *p_rtcp, uint8_t fmt)
+{
+p_rtcp[0] |= fmt & 0x1f;
+}
+
+static inline uint16_t rtcp_fb_nack_get_packet_id(const uint8_t 
*p_rtcp_fb_nack)
+{
+return (p_rtcp_fb_nack[0] << 8) | p_rtcp_fb_nack[1];
+}
+
+static inline void rtcp_fb_nack_set_packet_id(uint8_t *p_rtcp_fb_nack,
+  uint16_t packet_id)
+{
+p_rtcp_fb_nack[0] = (packet_id >> 8) & 0xff;
+p_rtcp_fb_nack[1] = packet_id & 0xff;
+}
+
+static inline uint16_t rtcp_fb_nack_get_bitmask_lost(const uint8_t 
*p_rtcp_fb_nack)
+{
+return (p_rtcp_fb_nack[2] << 8) | p_rtcp_fb_nack[3];
+}
+
+static inline void rtcp_fb_nack_set_bitmask_lost(uint8_t *p_rtcp_fb_nack,
+ uint16_t bitmask)
+{
+p_rtcp_fb_nack[2] = (bitmask >> 8) & 0xff;
+p_rtcp_fb_nack[3] = bitmask & 0xff;
+}
+
+static inline void rtcp_fb_

[vlc-commits] backport pick original rist access module (blind copy)

2020-12-14 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Sun Jul 
26 15:38:39 2020 -0400| [277502589bc9c37a4294d3247c22ad13e04740bd] | committer: 
Pierre Ynard

backport pick original rist access module (blind copy)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=277502589bc9c37a4294d3247c22ad13e04740bd
---

 modules/access/rist.c | 1156 +
 modules/access/rist.h |  367 
 2 files changed, 1523 insertions(+)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commitdiff;h=277502589bc9c37a4294d3247c22ad13e04740bd
___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] backport pick original rist access_output module (blind copy)

2020-12-14 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Sun Jul 
26 15:40:14 2020 -0400| [126b263a7d99af0e58b92b1ba57d28ec81b04dfb] | committer: 
Pierre Ynard

backport pick original rist access_output module (blind copy)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=126b263a7d99af0e58b92b1ba57d28ec81b04dfb
---

 modules/access_output/rist.c | 870 +++
 1 file changed, 870 insertions(+)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commitdiff;h=126b263a7d99af0e58b92b1ba57d28ec81b04dfb
___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Adjust for 4.0 to 3.0 differences in rist access module

2020-12-14 Thread Sergio Ammirata
vlc/vlc-3.0 | branch: master | Sergio Ammirata  | Sun Jul 
26 15:47:50 2020 -0400| [bcf7edd8f3e84333460fa780c84491a27c321721] | committer: 
Pierre Ynard

Adjust for 4.0 to 3.0 differences in rist access module

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=bcf7edd8f3e84333460fa780c84491a27c321721
---

 modules/access/rist.c | 60 +++
 modules/access/rist.h |  8 ---
 2 files changed, 37 insertions(+), 31 deletions(-)

diff --git a/modules/access/rist.c b/modules/access/rist.c
index 009c17790d..6b06542cab 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -2,7 +2,7 @@
  * rist.c: RIST (Reliable Internet Stream Transport) input module
  *
  * Copyright (C) 2018, DVEO, the Broadcast Division of Computer Modules, Inc.
- * Copyright (C) 2018, SipRadius LLC
+ * Copyright (C) 2018-2020, SipRadius LLC
  *
  * Authors: Sergio Ammirata 
  *  Daniele Lacamera 
@@ -30,14 +30,11 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#ifdef HAVE_POLL_H
 #include 
-#endif
 #include 
 #include 
 #include 
@@ -75,7 +72,7 @@ enum NACK_TYPE {
 NACK_FMT_BITMASK
 };
 
-typedef struct
+struct stream_sys_t
 {
 struct rist_flow *flow;
 char sender_name[MAX_CNAME];
@@ -91,8 +88,7 @@ typedef struct
 bool b_sendblindnacks;
 bool b_disablenacks;
 bool b_flag_discontinuity;
-bool dead;
-vlc_queue_t  queue;
+block_fifo_t *p_fifo;
 vlc_mutex_t  lock;
 uint64_t last_message;
 uint64_t last_reset;
@@ -107,7 +103,7 @@ typedef struct
 uint32_t i_recovered_packets;
 uint32_t i_reordered_packets;
 uint32_t i_total_packets;
-} stream_sys_t;
+};
 
 static int Control(stream_t *p_access, int i_query, va_list args)
 {
@@ -121,7 +117,7 @@ static int Control(stream_t *p_access, int i_query, va_list 
args)
 break;
 
 case STREAM_GET_PTS_DELAY:
-*va_arg( args, vlc_tick_t * ) = VLC_TICK_FROM_MS(
+*va_arg( args, int64_t * ) = RIST_TICK_FROM_MS(
var_InheritInteger(p_access, "network-caching") );
 break;
 
@@ -406,7 +402,7 @@ static void send_nacks(stream_t *p_access, struct rist_flow 
*flow)
 {
 memcpy(pkt_nacks->p_buffer, nacks, nacks_len * 2);
 pkt_nacks->i_buffer = nacks_len * 2;
-vlc_queue_Enqueue(&p_sys->queue, pkt_nacks);
+block_FifoPut( p_sys->p_fifo, pkt_nacks );
 }
 }
 }
@@ -675,7 +671,7 @@ static bool rist_input(stream_t *p_access, struct rist_flow 
*flow, uint8_t *buf,
 pkt->buffer->i_buffer = len;
 memcpy(pkt->buffer->p_buffer, buf, len);
 pkt->rtp_ts = pkt_ts;
-p_sys->last_data_rx = vlc_tick_now();
+p_sys->last_data_rx = mdate();
 /* Reset the try counter regardless of wether it was a retransmit or not */
 flow->nacks_retries[idx] = 0;
 
@@ -776,12 +772,14 @@ static void *rist_thread(void *data)
 {
 stream_t *p_access = data;
 stream_sys_t *p_sys = p_access->p_sys;
-block_t *pkt_nacks;
 
 /* Process nacks every 5ms */
 /* We only ask for the relevant ones */
-while ((pkt_nacks = vlc_queue_DequeueKillable(&p_sys->queue,
-  &p_sys->dead)) != NULL) {
+for (;;) {
+block_t *pkt_nacks = block_FifoGet(p_sys->p_fifo);
+
+int canc = vlc_savecancel();
+
 /* there are two bytes per nack */
 uint16_t nack_count = (uint16_t)pkt_nacks->i_buffer/2;
 switch(p_sys->nack_type) {
@@ -796,6 +794,8 @@ static void *rist_thread(void *data)
 if (nack_count > 1)
 msg_Dbg(p_access, "Sent %u NACKs !!!", nack_count);
 block_Release(pkt_nacks);
+
+vlc_restorecancel (canc);
 }
 
 return NULL;
@@ -917,12 +917,12 @@ static block_t *BlockRIST(stream_t *p_access, bool 
*restrict eof)
 buf = NULL;
 }
 
-now = vlc_tick_now();
+now = mdate();
 
 /* Process stats and print them out */
 /* We need to measure some items every 70ms */
 uint64_t interval = (now - flow->feedback_time);
-if ( interval > VLC_TICK_FROM_MS(RTCP_INTERVAL) )
+if ( interval > RIST_TICK_FROM_MS(RTCP_INTERVAL) )
 {
 if (p_sys->i_poll_timeout_nonzero_count > 0)
 {
@@ -941,7 +941,7 @@ static block_t *BlockRIST(stream_t *p_access, bool 
*restrict eof)
 }
 /* We print out the stats once per second */
 interval = (now - p_sys->i_last_stat);
-if ( interval > VLC_TICK_FROM_MS(STATS_INTERVAL) )
+if ( interval >  RIST_TICK_FROM_MS(STATS_INTERVAL) )
 {
 if ( p_sys->i_lost_packets > 0)
 msg_Err(p_acce

[vlc-commits] Qt: sout: Add rist output option

2019-03-20 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Mar 19 
08:16:04 2019 -0400| [d87f13521cba7f2072ca03c0451c7afd47274fa9] | committer: 
Thomas Guillem

Qt: sout: Add rist output option

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d87f13521cba7f2072ca03c0451c7afd47274fa9
---

 modules/gui/qt/components/sout/sout_widgets.cpp | 54 +
 modules/gui/qt/components/sout/sout_widgets.hpp | 13 ++
 modules/gui/qt/dialogs/sout.cpp | 11 +++--
 3 files changed, 75 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/components/sout/sout_widgets.cpp 
b/modules/gui/qt/components/sout/sout_widgets.cpp
index 2f65a5d880..8eb9cccea3 100644
--- a/modules/gui/qt/components/sout/sout_widgets.cpp
+++ b/modules/gui/qt/components/sout/sout_widgets.cpp
@@ -415,6 +415,60 @@ QString SRTDestBox::getMRL(const QString&)
 return m.getMrl();
 }
 
+RISTDestBox::RISTDestBox( QWidget *_parent, const char *_mux )
+: VirtualDestBox( _parent ), mux( qfu(_mux) )
+{
+label->setText( qtr( "This module outputs the stream using the RIST 
protocol (TR06).") );
+
+QLabel *RISTAddressLabel = new QLabel( qtr("Destination Address"), this );
+RISTAddress = new QLineEdit(this);
+layout->addWidget(RISTAddressLabel, 1, 0, 1, 1);
+layout->addWidget(RISTAddress, 1, 1, 1, 1);
+
+QLabel *RISTPortLabel = new QLabel( qtr("Destination Port"), this );
+RISTPort = new QSpinBox(this);
+RISTPort->setMaximumSize(QSize(90, 16777215));
+RISTPort->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+RISTPort->setMinimum(1);
+RISTPort->setMaximum(65535);
+RISTPort->setValue(1968);
+layout->addWidget(RISTPortLabel, 2, 0, 1, 1);
+layout->addWidget(RISTPort, 2, 1, 1, 1);
+
+QLabel *RISTNameLabel = new QLabel( qtr("Stream Name"), this );
+RISTName = new QLineEdit(this);
+layout->addWidget(RISTNameLabel, 3, 0, 1, 1);
+layout->addWidget(RISTName, 3, 1, 1, 1);
+
+CT( RISTAddress );
+CS( RISTPort );
+CT( RISTName );
+}
+
+QString RISTDestBox::getMRL( const QString& )
+{
+QString addr = RISTAddress->text();
+QString name = RISTName->text();
+
+if( addr.isEmpty() ) return qfu("");
+QString destination = addr + ":" + QString::number(RISTPort->value());
+SoutMrl m;
+m.begin( "std" );
+if( !name.isEmpty() )
+{
+m.option( "access", "rist{stream-name=" + name + "}" );
+}
+else
+{
+m.option( "access", "rist" );
+}
+m.option( "mux", "ts" );
+m.option( "dst", destination );
+m.end();
+
+return m.getMrl();
+}
+
 
 RTPDestBox::RTPDestBox( QWidget *_parent, const char *_mux )
 : VirtualDestBox( _parent ), mux( qfu(_mux) )
diff --git a/modules/gui/qt/components/sout/sout_widgets.hpp 
b/modules/gui/qt/components/sout/sout_widgets.hpp
index 3413c8d239..d718e7e01c 100644
--- a/modules/gui/qt/components/sout/sout_widgets.hpp
+++ b/modules/gui/qt/components/sout/sout_widgets.hpp
@@ -130,6 +130,19 @@ class SRTDestBox: public VirtualDestBox
 QString mux;
 };
 
+class RISTDestBox: public VirtualDestBox
+{
+Q_OBJECT
+public:
+RISTDestBox( QWidget *_parent = NULL, const char *mux = NULL );
+QString getMRL( const QString& ) Q_DECL_OVERRIDE;
+private:
+QLineEdit *RISTAddress;
+QSpinBox *RISTPort;
+QLineEdit *RISTName;
+QString mux;
+};
+
 class RTPDestBox: public VirtualDestBox
 {
 Q_OBJECT
diff --git a/modules/gui/qt/dialogs/sout.cpp b/modules/gui/qt/dialogs/sout.cpp
index 003427acae..bbcc308d63 100644
--- a/modules/gui/qt/dialogs/sout.cpp
+++ b/modules/gui/qt/dialogs/sout.cpp
@@ -70,6 +70,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t 
*_p_intf, const QString&
 ui.destBox->addItem( "MS-WMSP (MMSH)" );
 ui.destBox->addItem( "RTSP" );
 ui.destBox->addItem( "SRT / MPEG Transport Stream" );
+ui.destBox->addItem( "RIST / MPEG Transport Stream" );
 ui.destBox->addItem( "RTP / MPEG Transport Stream" );
 ui.destBox->addItem( "RTP Audio/Video Profile" );
 ui.destBox->addItem( "UDP (legacy)" );
@@ -137,18 +138,22 @@ void SoutDialog::addDest( )
 caption = "SRT/TS";
 break;
 case 5:
+db = new RISTDestBox( this, "ts" );
+caption = "RIST/TS";
+break;
+case 6:
 db = new RTPDestBox( this, "ts" );
 caption = "RTP/TS";
 break;
-case 6:
+case 7:
 db = new RTPDestBox( this );
 caption = "RTP/AVP";
 br

[vlc-commits] access: rist: add support for multicast

2019-03-20 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Mar 19 
08:14:32 2019 -0400| [b1aea125d8f7e91c1fc6ad4e5a557a7a8ca21dec] | committer: 
Thomas Guillem

access: rist: add support for multicast

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1aea125d8f7e91c1fc6ad4e5a557a7a8ca21dec
---

 modules/access/rist.c | 150 +-
 modules/access/rist.h |  32 ++-
 2 files changed, 143 insertions(+), 39 deletions(-)

diff --git a/modules/access/rist.c b/modules/access/rist.c
index f6e572b863..e06828c88a 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -85,7 +85,11 @@ typedef struct
 int  i_max_packet_size;
 int  i_poll_timeout;
 int  i_poll_timeout_current;
-bool eof_on_reset;
+bool b_ismulticast;
+bool b_sendnacks;
+bool b_sendblindnacks;
+bool b_disablenacks;
+bool b_flag_discontinuity;
 block_fifo_t *p_fifo;
 vlc_mutex_t  lock;
 uint64_t last_message;
@@ -97,6 +101,7 @@ typedef struct
 floatvbr_ratio;
 uint16_t vbr_ratio_count;
 uint32_t i_lost_packets;
+uint32_t i_nack_packets;
 uint32_t i_recovered_packets;
 uint32_t i_reordered_packets;
 uint32_t i_total_packets;
@@ -131,7 +136,7 @@ static struct rist_flow *rist_init_rx(void)
 if (!flow)
 return NULL;
 
-flow->reset = 2;
+flow->reset = 1;
 flow->buffer = calloc(RIST_QUEUE_SIZE, sizeof(struct rtp_pkt));
 
 if ( unlikely( flow->buffer == NULL ) )
@@ -139,6 +144,10 @@ static struct rist_flow *rist_init_rx(void)
 free(flow);
 return NULL;
 }
+flow->fd_in = -1;
+flow->fd_nack = -1;
+flow->fd_rtcp_m = -1;
+
 return flow;
 }
 
@@ -150,7 +159,7 @@ static void rist_WriteTo_i11e_Locked(vlc_mutex_t lock, int 
fd, const void *buf,
 vlc_mutex_unlock( &lock );
 }
 
-static struct rist_flow *rist_udp_receiver(stream_t *p_access, vlc_url_t 
*parsed_url)
+static struct rist_flow *rist_udp_receiver(stream_t *p_access, vlc_url_t 
*parsed_url, bool b_ismulticast)
 {
 stream_sys_t *p_sys = p_access->p_sys;
 msg_Info( p_access, "Opening Rist Flow Receiver at %s:%d and %s:%d",
@@ -166,21 +175,47 @@ static struct rist_flow *rist_udp_receiver(stream_t 
*p_access, vlc_url_t *parsed
 if (p_sys->flow->fd_in < 0)
 {
 msg_Err( p_access, "cannot open input socket" );
-return NULL;
+goto fail;
 }
 
-p_sys->flow->fd_nack = net_OpenDgram(p_access, parsed_url->psz_host, 
parsed_url->i_port + 1,
-NULL, 0, IPPROTO_UDP);
+if (b_ismulticast)
+{
+p_sys->flow->fd_rtcp_m = net_OpenDgram(p_access, parsed_url->psz_host, 
parsed_url->i_port + 1,
+NULL, 0, IPPROTO_UDP);
+if (p_sys->flow->fd_rtcp_m < 0)
+{
+msg_Err( p_access, "cannot open multicast nack socket" );
+goto fail;
+}
+p_sys->flow->fd_nack = net_ConnectDgram(p_access, parsed_url->psz_host,
+parsed_url->i_port + 1, -1, IPPROTO_UDP );
+}
+else
+{
+p_sys->flow->fd_nack = net_OpenDgram(p_access, parsed_url->psz_host, 
parsed_url->i_port + 1,
+NULL, 0, IPPROTO_UDP);
+}
 if (p_sys->flow->fd_nack < 0)
 {
 msg_Err( p_access, "cannot open nack socket" );
-return NULL;
+goto fail;
 }
 
 populate_cname(p_sys->flow->fd_nack, p_sys->flow->cname);
 msg_Info(p_access, "our cname is %s", p_sys->flow->cname);
 
 return  p_sys->flow;
+
+fail:
+if (p_sys->flow->fd_in != -1)
+vlc_close(p_sys->flow->fd_in);
+if (p_sys->flow->fd_nack != -1)
+vlc_close(p_sys->flow->fd_nack);
+if (p_sys->flow->fd_rtcp_m != -1)
+vlc_close(p_sys->flow->fd_rtcp_m);
+free(p_sys->flow->buffer);
+free(p_sys->flow);
+return NULL;
 }
 
 static int is_index_in_range(struct rist_flow *flow, uint16_t idx)
@@ -263,8 +298,9 @@ static void send_bbnack(stream_t *p_access, int fd_nack, 
block_t *pkt_nacks, uin
 len += RTCP_FB_FCI_GENERIC_NACK_SIZE * nack_count;
 
 /* Write to Socket */
-rist_WriteTo_i11e_Locked(p_sys->lock, fd_nack, buf, len,
-(struct sockaddr *)&flow->peer_sockaddr, flow->peer_socklen);
+if (p_sys->b_sendnacks && p_sys->b_disablenacks == false)
+rist_WriteTo_i11e_Locked(p_sys->lock, fd_nack, buf, len,
+(struct sockaddr *)&flow->peer_sockaddr, flow->peer_socklen);
 free(buf);
 buf = NULL;
 }
@@ -302,8 +338,9 @@ static void send_rbnack(stream_t *p_access, int fd_n

[vlc-commits] access_output: rist: add support for multicast

2019-03-20 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Mar 19 
08:15:07 2019 -0400| [f2ed24657adc5e379e326dbba3ca8541291ed425] | committer: 
Thomas Guillem

access_output: rist: add support for multicast

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2ed24657adc5e379e326dbba3ca8541291ed425
---

 modules/access_output/rist.c | 108 +++
 1 file changed, 88 insertions(+), 20 deletions(-)

diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 5ce799b14e..3f2f3901bd 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -72,6 +72,7 @@ static const char *const ppsz_sout_options[] = {
 "caching",
 "buffer-size",
 "ssrc",
+"stream-name",
 NULL
 };
 
@@ -85,6 +86,7 @@ typedef struct
 vlc_thread_t senderthread;
 size_t   i_packet_size;
 bool b_mtu_warning;
+bool b_ismulticast;
 vlc_mutex_t  lock;
 vlc_mutex_t  fd_lock;
 block_t  *p_pktbuffer;
@@ -112,12 +114,13 @@ static struct rist_flow *rist_init_tx()
 }
 flow->fd_out = -1;
 flow->fd_rtcp = -1;
+flow->fd_rtcp_m = -1;
 
 return flow;
 }
 
 static struct rist_flow *rist_udp_transmitter(sout_access_out_t *p_access, 
char *psz_dst_server, 
-int i_dst_port)
+int i_dst_port, bool b_ismulticast)
 {
 struct rist_flow *flow;
 flow = rist_init_tx();
@@ -131,6 +134,16 @@ static struct rist_flow 
*rist_udp_transmitter(sout_access_out_t *p_access, char
 goto fail;
 }
 
+if (b_ismulticast) {
+flow->fd_rtcp_m = net_OpenDgram(p_access, psz_dst_server, i_dst_port + 
1,
+NULL, 0, IPPROTO_UDP);
+if (flow->fd_rtcp_m < 0)
+{
+msg_Err( p_access, "cannot open multicast nack socket" );
+goto fail;
+}
+}
+
 flow->fd_rtcp = net_ConnectDgram(p_access, psz_dst_server, i_dst_port + 1, 
-1, IPPROTO_UDP );
 if (flow->fd_rtcp < 0)
 {
@@ -138,7 +151,18 @@ static struct rist_flow 
*rist_udp_transmitter(sout_access_out_t *p_access, char
 goto fail;
 }
 
-populate_cname(flow->fd_rtcp, flow->cname);
+char *psz_streamname = NULL;
+psz_streamname = var_InheritString( p_access, SOUT_CFG_PREFIX 
"stream-name" );
+if ( psz_streamname != NULL && psz_streamname[0] != '\0')
+{
+int name_length = snprintf(flow->cname, MAX_CNAME, "%s", 
psz_streamname);
+if (name_length >= MAX_CNAME)
+flow->cname[MAX_CNAME-1] = 0;
+free( psz_streamname );
+}
+else
+populate_cname(flow->fd_rtcp, flow->cname);
+
 msg_Info(p_access, "our cname is %s", flow->cname);
 
 return flow;
@@ -148,6 +172,8 @@ fail:
 vlc_close(flow->fd_out);
 if (flow->fd_rtcp != -1)
 vlc_close(flow->fd_rtcp);
+if (flow->fd_rtcp_m != -1)
+vlc_close(flow->fd_rtcp_m);
 free(flow->buffer);
 free(flow);
 return NULL;
@@ -188,6 +214,7 @@ static void rist_retransmit(sout_access_out_t *p_access, 
struct rist_flow *flow,
 != (ssize_t)pkt->buffer->i_buffer) {
 msg_Err(p_access, "Error sending retransmitted packet after 2 
tries ...");
 }
+
 vlc_mutex_unlock( &p_sys->fd_lock );
 }
 }
@@ -298,23 +325,29 @@ static void rist_rtcp_recv(sout_access_out_t *p_access, 
struct rist_flow *flow,
 break;
 
 case RTCP_PT_RR:
-/*process_rr(f, pkt, len);*/
+/*
+if (p_sys->b_ismulticast == false)
+process_rr(f, pkt, len);
+*/
 break;
 
 case RTCP_PT_SDES:
 {
-int8_t name_length = rtcp_sdes_get_name_length(pkt);
-if (name_length > bytes_left)
-{
-/* check for a sane number of bytes */
-msg_Err(p_access, "Malformed SDES packet, wrong cname 
len %u, got a " \
-"buffer of %u bytes.", name_length, bytes_left);
-return;
-}
-if (memcmp(pkt + RTCP_SDES_SIZE, p_sys->receiver_name, 
name_length) != 0)
+if (p_sys->b_ismulticast == false)
 {
-memcpy(p_sys->receiver_name, pkt + RTCP_SDES_SIZE, 
name_length);
-msg_Info(p_access, "Receiver name: %s", 
p_sys->receiver_name);
+int8_t name_length = rtcp_sdes_get_name_length(pkt);
+if (name_length > bytes_left)
+{
+/* check for a 

[vlc-commits] access_out: rist: use ssize_t to match the return value of rist_Read

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Wed Nov 28 
06:52:53 2018 -0500| [f487da48e6433a342e14e614c4c29f8a8d6ad310] | committer: 
Thomas Guillem

access_out: rist: use ssize_t to match the return value of rist_Read

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f487da48e6433a342e14e614c4c29f8a8d6ad310
---

 modules/access_output/rist.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index d46f170d39..5ce799b14e 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -384,7 +384,7 @@ static void *rist_thread(void *data)
 uint8_t pkt[RTP_PKT_SIZE];
 struct pollfd pfd[1];
 int ret;
-int r;
+ssize_t r;
 
 pfd[0].fd = p_sys->flow->fd_rtcp;
 pfd[0].events = POLLIN;
@@ -398,7 +398,7 @@ static void *rist_thread(void *data)
 {
 r = rist_Read(p_sys->flow->fd_rtcp, pkt, RTP_PKT_SIZE);
 if (r == RTP_PKT_SIZE) {
-msg_Err(p_access, "Rist RTCP messsage is too big (%d 
bytes) and was probably " \
+msg_Err(p_access, "Rist RTCP messsage is too big (%zd 
bytes) and was probably " \
 "cut, please keep it under %d bytes", r, RTP_PKT_SIZE);
 }
 if (unlikely(r == -1)) {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access: rist: fix misspellings on help text

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Dec  4 
10:37:42 2018 -0500| [307e3b7f40ca5442d0dfc4b53483f536b9a7400d] | committer: 
Thomas Guillem

access: rist: fix misspellings on help text

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=307e3b7f40ca5442d0dfc4b53483f536b9a7400d
---

 modules/access/rist.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access/rist.c b/modules/access/rist.c
index 6b3384aa5a..6607340042 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -1064,9 +1064,9 @@ vlc_module_begin ()
 add_integer( "packet-size", RIST_MAX_PACKET_SIZE,
 N_("RIST maximum packet size (bytes)"), NULL, true )
 add_integer( "maximum-jitter", RIST_DEFAULT_POLL_TIMEOUT,
-N_("RIST demux/decode maximum jitter (defaut is 5ms)"),
+N_("RIST demux/decode maximum jitter (default is 5ms)"),
 N_("This controls the maximum jitter that will be passed to the 
demux/decode chain. "
-"The lower the value, the more CPU cycles the algortyhm will 
consume"), true )
+"The lower the value, the more CPU cycles the algorithm will 
consume"), true )
 add_integer( "latency", RIST_DEFAULT_LATENCY, N_("RIST latency (ms)"), 
NULL, true )
 add_integer( "retry-interval", RIST_DEFAULT_RETRY_INTERVAL, N_("RIST nack 
retry interval (ms)"),
 NULL, true )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access_out: rist: fix BAD_SHIFT warning

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Nov 27 
07:57:49 2018 -0500| [7a2bd115d7ef392d4b8e0fea2d971ddbfbf29a8b] | committer: 
Thomas Guillem

access_out: rist: fix BAD_SHIFT warning

Happening on win32 builds (tv.tv_usec is 32 bits there).

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a2bd115d7ef392d4b8e0fea2d971ddbfbf29a8b
---

 modules/access_output/rist.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 1e36b963c5..17929d0050 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -338,7 +338,9 @@ static void rist_rtcp_send(sout_access_out_t *p_access)
 rtcp_sr_set_length(p_sr, 6);
 rtcp_fb_set_int_ssrc_pkt_sender(p_sr, p_sys->ssrc);
 rtcp_sr_set_ntp_time_msw(p_sr, tv.tv_sec + SEVENTY_YEARS_OFFSET);
-fractions = (tv.tv_usec << 32ULL) / 100ULL;
+fractions = (uint64_t)tv.tv_usec;
+fractions <<= 32ULL;
+fractions /= 100ULL;
 rtcp_sr_set_ntp_time_lsw(p_sr, (uint32_t)fractions);
 rtcp_sr_set_rtp_time(p_sr, rtp_get_ts(vlc_tick_now()));
 vlc_mutex_lock( &p_sys->lock );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access: rist: improve/fix config help text

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Nov 27 
09:31:41 2018 -0500| [c05d16945ee63e53eb93156dfc5204b6b24522d0] | committer: 
Thomas Guillem

access: rist: improve/fix config help text

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c05d16945ee63e53eb93156dfc5204b6b24522d0
---

 modules/access/rist.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/access/rist.c b/modules/access/rist.c
index 3f39f812ba..6b3384aa5a 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -1064,16 +1064,16 @@ vlc_module_begin ()
 add_integer( "packet-size", RIST_MAX_PACKET_SIZE,
 N_("RIST maximum packet size (bytes)"), NULL, true )
 add_integer( "maximum-jitter", RIST_DEFAULT_POLL_TIMEOUT,
-N_("This controls the maximum jitter that will be passed to the 
demux/decode chain " \
-"(defaut is 5ms)"),
-N_("The lower the value, the more CPU cycles the algortyhm will 
consume"), true )
+N_("RIST demux/decode maximum jitter (defaut is 5ms)"),
+N_("This controls the maximum jitter that will be passed to the 
demux/decode chain. "
+"The lower the value, the more CPU cycles the algortyhm will 
consume"), true )
 add_integer( "latency", RIST_DEFAULT_LATENCY, N_("RIST latency (ms)"), 
NULL, true )
 add_integer( "retry-interval", RIST_DEFAULT_RETRY_INTERVAL, N_("RIST nack 
retry interval (ms)"),
 NULL, true )
 add_integer( "reorder-buffer", RIST_DEFAULT_REORDER_BUFFER, N_("RIST 
reorder buffer (ms)"),
 NULL, true )
 add_integer( "max-retries", RIST_MAX_RETRIES, N_("RIST maximum retry 
count"), NULL, true )
-add_bool( "eof-on-reset", false, "Trigger and EOF event when the buffer 
reset is triggered",
+add_bool( "eof-on-reset", false, "Trigger an EOF event when a buffer reset 
is triggered",
 "This is probably useful when you are decoding but not so much if you 
are streaming", true )
 add_integer( "nack-type", NACK_FMT_RANGE,
 N_("RIST nack type, 0 = range, 1 = bitmask. Default is range"), 
NULL, true )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access: rist: fix OVERFLOW_BEFORE_WIDEN warning

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Nov 27 
08:45:28 2018 -0500| [4077054930070e4f7a7bcd6e6f1bff81e6f264a7] | committer: 
Thomas Guillem

access: rist: fix OVERFLOW_BEFORE_WIDEN warning

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4077054930070e4f7a7bcd6e6f1bff81e6f264a7
---

 modules/access/rist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/rist.c b/modules/access/rist.c
index 1e5ef5d613..3f39f812ba 100644
--- a/modules/access/rist.c
+++ b/modules/access/rist.c
@@ -341,7 +341,7 @@ static void send_nacks(stream_t *p_access, struct rist_flow 
*flow)
 if (retry_count == 0){
 expiration = flow->reorder_buffer;
 } else {
-expiration = flow->nacks_retries[idx] * 
flow->retry_interval;
+expiration = (uint64_t)flow->nacks_retries[idx] * 
(uint64_t)flow->retry_interval;
 }
 if (age > expiration && retry_count <= flow->max_retries)
 {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access_out: rist: check the return value of rist_Write

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Nov 27 
08:38:43 2018 -0500| [aa3ced83d6c2c6496590461c539eefa1ab4308c8] | committer: 
Thomas Guillem

access_out: rist: check the return value of rist_Write

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aa3ced83d6c2c6496590461c539eefa1ab4308c8
---

 modules/access_output/rist.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 17929d0050..6fec6d5a10 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -178,7 +178,10 @@ static void rist_retransmit(sout_access_out_t *p_access, 
struct rist_flow *flow,
 seq, age, flow->wi);
 p_sys->i_retransmit_packets++;
 vlc_mutex_lock( &p_sys->fd_lock );
-rist_Write(flow->fd_out, pkt->buffer->p_buffer, pkt->buffer->i_buffer);
+if (rist_Write(flow->fd_out, pkt->buffer->p_buffer, 
pkt->buffer->i_buffer) 
+!= (ssize_t)pkt->buffer->i_buffer) {
+msg_Err(p_access, "Error sending retransmitted packet after 2 
tries ...");
+}
 vlc_mutex_unlock( &p_sys->fd_lock );
 }
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access: rist: fix uninitialized variable warning

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Nov 27 
08:22:33 2018 -0500| [b1b18401024fce92712c8da58e8f81116b0a8008] | committer: 
Thomas Guillem

access: rist: fix uninitialized variable warning

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1b18401024fce92712c8da58e8f81116b0a8008
---

 modules/access/rist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/rist.h b/modules/access/rist.h
index 574bc40cd9..75ade277d2 100644
--- a/modules/access/rist.h
+++ b/modules/access/rist.h
@@ -140,7 +140,7 @@ static inline void populate_cname(int fd, char *identifier)
 char hostname[MAX_CNAME];
 struct sockaddr_storage peer_sockaddr;
 int name_length = 0;
-socklen_t peer_socklen;
+socklen_t peer_socklen = 0;
 int ret_hostname = gethostname(hostname, MAX_CNAME);
 if (ret_hostname == -1)
 snprintf(hostname, MAX_CNAME, "UnknownHost");

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access_out: rist: close the sockets on error

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Wed Nov 28 
07:04:33 2018 -0500| [381c61cff48064236a1e3b2c396b763ab4b5075d] | committer: 
Thomas Guillem

access_out: rist: close the sockets on error

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=381c61cff48064236a1e3b2c396b763ab4b5075d
---

 modules/access_output/rist.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 0097291bed..d46f170d39 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -110,6 +110,8 @@ static struct rist_flow *rist_init_tx()
 free(flow);
 return NULL;
 }
+flow->fd_out = -1;
+flow->fd_rtcp = -1;
 
 return flow;
 }
@@ -142,6 +144,10 @@ static struct rist_flow 
*rist_udp_transmitter(sout_access_out_t *p_access, char
 return flow;
 
 fail:
+if (flow->fd_out != -1)
+vlc_close(flow->fd_out);
+if (flow->fd_rtcp != -1)
+vlc_close(flow->fd_rtcp);
 free(flow->buffer);
 free(flow);
 return NULL;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access_out: rist: improve/fix config help text

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Nov 27 
09:39:02 2018 -0500| [33381800e6d66382fb1d0be690fc096ac564f3f3] | committer: 
Thomas Guillem

access_out: rist: improve/fix config help text

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=33381800e6d66382fb1d0be690fc096ac564f3f3
---

 modules/access_output/rist.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 6fec6d5a10..0097291bed 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -769,10 +769,10 @@ failed:
 "a near jitter free output. Be aware that this setting will also add to " \
 "the overall latency of the stream." )
 
-#define BUFFER_TEXT N_("RIST client side buffer size (ms)")
+#define BUFFER_TEXT N_("RIST retry-buffer queue size (ms)")
 #define BUFFER_LONGTEXT N_( \
 "This must match the buffer size (latency) configured on the server side. 
If you " \
-"are not sure, leave the default of -1 which will set it the maximum " \
+"are not sure, leave the default of 0 which will set it the maximum " \
 "value and will use about 100MB of RAM" )
 
 #define SSRC_TEXT N_("SSRC used in RTP output (default is random, i.e. 0)")

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access: rist: check the return value of getsockopt

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Nov 27 
08:15:28 2018 -0500| [732201ca09b0d99ab68ec9613542fa72e6db3c1d] | committer: 
Thomas Guillem

access: rist: check the return value of getsockopt

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=732201ca09b0d99ab68ec9613542fa72e6db3c1d
---

 modules/access/rist.h | 36 
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/modules/access/rist.h b/modules/access/rist.h
index 256c1fcf63..574bc40cd9 100644
--- a/modules/access/rist.h
+++ b/modules/access/rist.h
@@ -278,15 +278,17 @@ static inline ssize_t rist_WriteTo_i11e(int fd, const 
void *buf, size_t len,
 && net_errno != ENOBUFS && net_errno != ENOMEM )
 {
 int type;
-getsockopt( fd, SOL_SOCKET, SO_TYPE,
-&type, &(socklen_t){ sizeof(type) });
-if( type == SOCK_DGRAM )
+if (!getsockopt( fd, SOL_SOCKET, SO_TYPE,
+&type, &(socklen_t){ sizeof(type) }))
 {
-/* ICMP soft error: ignore and retry */
-if (slen == 0)
-r = vlc_send_i11e( fd, buf, len, 0 );
-else
-r = vlc_sendto_i11e( fd, buf, len, 0, peer, slen );
+if( type == SOCK_DGRAM )
+{
+/* ICMP soft error: ignore and retry */
+if (slen == 0)
+r = vlc_send_i11e( fd, buf, len, 0 );
+else
+r = vlc_sendto_i11e( fd, buf, len, 0, peer, slen );
+}
 }
 }
 return r;
@@ -315,15 +317,17 @@ static inline ssize_t rist_WriteTo(int fd, const void 
*buf, size_t len, const st
 && net_errno != ENOBUFS && net_errno != ENOMEM )
 {
 int type;
-getsockopt( fd, SOL_SOCKET, SO_TYPE,
-&type, &(socklen_t){ sizeof(type) });
-if( type == SOCK_DGRAM )
+if (!getsockopt( fd, SOL_SOCKET, SO_TYPE,
+&type, &(socklen_t){ sizeof(type) }))
 {
-/* ICMP soft error: ignore and retry */
-if (slen == 0)
-r = send( fd, buf, len, 0 );
-else
-r = sendto( fd, buf, len, 0, peer, slen );
+if( type == SOCK_DGRAM )
+{
+/* ICMP soft error: ignore and retry */
+if (slen == 0)
+r = send( fd, buf, len, 0 );
+else
+r = sendto( fd, buf, len, 0, peer, slen );
+}
 }
 }
 return r;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access_out: rist: fix mem leak

2018-12-07 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Tue Nov 27 
07:45:45 2018 -0500| [d22baf21918cd9186734668f31cb74cf5a92d3a5] | committer: 
Thomas Guillem

access_out: rist: fix mem leak

It occured when socket creation failed.

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d22baf21918cd9186734668f31cb74cf5a92d3a5
---

 modules/access_output/rist.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index de36a744c9..1e36b963c5 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -126,20 +126,25 @@ static struct rist_flow 
*rist_udp_transmitter(sout_access_out_t *p_access, char
 if (flow->fd_out < 0)
 {
 msg_Err( p_access, "cannot open output socket" );
-return NULL;
+goto fail;
 }
 
 flow->fd_rtcp = net_ConnectDgram(p_access, psz_dst_server, i_dst_port + 1, 
-1, IPPROTO_UDP );
 if (flow->fd_rtcp < 0)
 {
 msg_Err( p_access, "cannot open nack socket" );
-return NULL;
+goto fail;
 }
 
 populate_cname(flow->fd_rtcp, flow->cname);
 msg_Info(p_access, "our cname is %s", flow->cname);
 
 return flow;
+
+fail:
+free(flow->buffer);
+free(flow);
+return NULL;
 }
 
 static void rist_retransmit(sout_access_out_t *p_access, struct rist_flow 
*flow, uint16_t seq)

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] access: add RIST module

2018-11-05 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Mon Nov  5 
09:39:16 2018 -0500| [2cb6e8459739b558acdf4382b8c510284276bd32] | committer: 
Thomas Guillem

access: add RIST module

RIST for the Reliable Internet Stream Transport Protocol

The implementation follows the Video Services Forum (VSF) Technical
Recommendation TR-06 which defines an ARQ based UDP transmission protocol
for real-time streaming over lossy networks (internet, wifi, etc).

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cb6e8459739b558acdf4382b8c510284276bd32
---

 NEWS   |1 +
 modules/MODULES_LIST   |1 +
 modules/access/Makefile.am |8 +
 modules/access/rist.c  | 1088 
 modules/access/rist.h  |  335 ++
 po/POTFILES.in |2 +
 6 files changed, 1435 insertions(+)

diff --git a/NEWS b/NEWS
index 3054bb84a7..6115713dcd 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ Codecs:
 
 Access:
  * Enable SMB2 / SMB3 support on mobile ports with libsmb2
+ * Added support for the RIST (Reliable Internet Stream Transport) Protocol
 
 Video output:
  * Remove aa plugin
diff --git a/modules/MODULES_LIST b/modules/MODULES_LIST
index 79161ae3ed..a0f4d54f64 100644
--- a/modules/MODULES_LIST
+++ b/modules/MODULES_LIST
@@ -17,6 +17,7 @@ $Id$
  * access_output_srt: SRT (Secure Reliable Transport) access_output module
  * access_output_udp: UDP Network access_output module
  * access_qtsound: Quicktime Audio Capture
+ * access_rist: RIST (Reliable Internet Stream Transport) access module
  * access_srt: SRT(Secure Reliable Transport) access module
  * access_wasapi: WASAPI audio input
  * accesstweaks: access control tweaking module (dev tool)
diff --git a/modules/access/Makefile.am b/modules/access/Makefile.am
index 5abe3a1a5f..31c872b915 100644
--- a/modules/access/Makefile.am
+++ b/modules/access/Makefile.am
@@ -428,3 +428,11 @@ libaccess_srt_plugin_la_LIBADD = $(SRT_LIBS)
 libaccess_srt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)'
 access_LTLIBRARIES += $(LTLIBaccess_srt)
 EXTRA_LTLIBRARIES += libaccess_srt_plugin.la
+
+### RIST ###
+
+librist_plugin_la_SOURCES = access/rist.c access/rist.h
+librist_plugin_la_CFLAGS = $(AM_CFLAGS) $(BITSTREAM_CFLAGS)
+if HAVE_BITSTREAM
+access_LTLIBRARIES += librist_plugin.la
+endif
diff --git a/modules/access/rist.c b/modules/access/rist.c
new file mode 100644
index 00..94103f7293
--- /dev/null
+++ b/modules/access/rist.c
@@ -0,0 +1,1088 @@
+/*
+ * rist.c: RIST (Reliable Internet Stream Transport) input module
+ *
+ * Copyright (C) 2018, DVEO, the Broadcast Division of Computer Modules, Inc.
+ * Copyright (C) 2018, SipRadius LLC
+ *
+ * Authors: Sergio Ammirata 
+ *  Daniele Lacamera 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#ifdef HAVE_POLL
+#include 
+#endif
+#include 
+#include 
+#include 
+#include 
+
+#include "rist.h"
+
+/* The default latency is 1000 ms */
+#define RIST_DEFAULT_LATENCY 1000
+/* The default nack retry interval */
+#define RIST_DEFAULT_RETRY_INTERVAL 132
+/* The default packet re-ordering buffer */
+#define RIST_DEFAULT_REORDER_BUFFER 70
+/* The default max packet size */
+#define RIST_MAX_PACKET_SIZE 1472
+/* The default timeout is 5 ms */
+#define RIST_DEFAULT_POLL_TIMEOUT 5
+/* The max retry count for nacks */
+#define RIST_MAX_RETRIES 10
+/* The rate at which we process and send nack requests */
+#define NACK_INTERVAL 5 /*ms*/
+/* Calculate and print stats once per second */
+#define STATS_INTERVAL 1000 /*ms*/
+
+static const int nack_type[] = {
+0, 1,
+};
+
+static const char *const nack_type_names[] = {
+N_("Range"), N_("Bitmask"),
+};
+
+enum NACK_TYPE {
+NACK_FMT_RANGE = 0,
+NACK_FMT_BITMASK
+};
+
+typedef struct
+{
+struct rist_flow *flow;
+char se

[vlc-commits] access_out: add RIST module

2018-11-05 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Mon Nov  5 
09:44:59 2018 -0500| [b504fabcedafc025a3e664a215146a34f746f2e6] | committer: 
Thomas Guillem

access_out: add RIST module

RIST for Reliable Internet Stream Transport (RIST) Protocol.

The implementation follows the Video Services Forum (VSF) Technical
Recommendation TR-06 which defines an ARQ based UDP transmission protocol
for real-time streaming over lossy networks (internet, wifi, etc).

Signed-off-by: Thomas Guillem 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b504fabcedafc025a3e664a215146a34f746f2e6
---

 NEWS  |   3 +
 modules/MODULES_LIST  |   1 +
 modules/access_output/Makefile.am |   7 +
 modules/access_output/rist.c  | 799 ++
 po/POTFILES.in|   1 +
 5 files changed, 811 insertions(+)

diff --git a/NEWS b/NEWS
index 6115713dcd..1f2223294b 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,9 @@ Access:
  * Enable SMB2 / SMB3 support on mobile ports with libsmb2
  * Added support for the RIST (Reliable Internet Stream Transport) Protocol
 
+Access output:
+ * Added support for the RIST (Reliable Internet Stream Transport) Protocol
+
 Video output:
  * Remove aa plugin
  * Remove evas plugin
diff --git a/modules/MODULES_LIST b/modules/MODULES_LIST
index a0f4d54f64..2419adf9dc 100644
--- a/modules/MODULES_LIST
+++ b/modules/MODULES_LIST
@@ -13,6 +13,7 @@ $Id$
  * access_output_file: File access_output module
  * access_output_http: HTTP Network access module
  * access_output_livehttp: Live HTTP stream output
+ * access_output_rist: RIST (Reliable Internet Stream Transport) access_output 
module
  * access_output_shout: Shoutcast access output
  * access_output_srt: SRT (Secure Reliable Transport) access_output module
  * access_output_udp: UDP Network access_output module
diff --git a/modules/access_output/Makefile.am 
b/modules/access_output/Makefile.am
index 583e4abcd0..184f3e4c81 100644
--- a/modules/access_output/Makefile.am
+++ b/modules/access_output/Makefile.am
@@ -34,3 +34,10 @@ libaccess_output_srt_plugin_la_LIBADD = $(SRT_LIBS)
 libaccess_output_srt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath 
'$(access_outdir)'
 access_out_LTLIBRARIES += $(LTLIBaccess_output_srt)
 EXTRA_LTLIBRARIES += libaccess_output_srt_plugin.la
+
+### RIST ###
+libaccess_output_rist_plugin_la_SOURCES = access_output/rist.c access/rist.h
+libaccess_output_rist_plugin_la_CFLAGS = $(AM_CFLAGS) $(BITSTREAM_CFLAGS)
+if HAVE_BITSTREAM
+access_out_LTLIBRARIES += libaccess_output_rist_plugin.la
+endif
diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
new file mode 100644
index 00..feff01f3c9
--- /dev/null
+++ b/modules/access_output/rist.c
@@ -0,0 +1,799 @@
+/*
+ *  * rist.c: RIST (Reliable Internet Stream Transport) output module
+ *
+ * Copyright (C) 2018, DVEO, the Broadcast Division of Computer Modules, Inc.
+ * Copyright (C) 2018, SipRadius LLC
+ *
+ * Authors: Sergio Ammirata 
+ *  Daniele Lacamera 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#ifdef HAVE_POLL
+#include 
+#endif
+#include 
+#ifdef HAVE_SYS_SOCKET_H
+#include 
+#endif
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "../access/rist.h"
+
+/* Uncomment the following to introduce induced packet loss for TESTING 
purposes only */
+/*#define TEST_PACKET_LOSS*/
+
+/* The default target packet size */
+#define RIST_TARGET_PACKET_SIZE 1328
+/* The default caching delay for output data */
+#define DEFAULT_CACHING_DELAY 50
+/* The default buffer size in ms */
+#define DEFAULT_BUFFER_SIZE 0
+/* Calculate and print stats once per second */
+#define STATS_INTERVAL 1000 /*ms*/
+
+#define MPEG_II_TRANSPORT_STREAM (0x21)
+#define RIST_DEFAULT_PORT 1968
+
+#define SOUT_CFG_PREFIX "sout-rist-"
+
+static const char *const ppsz_sout_opti

[vlc-commits] Enhance dmo to support new dlls. This adds support for WMV9.

2014-02-18 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Wed Aug 17 
00:41:14 2011 -0400| [f57ca3b1bcf38d32879a7f5219cef5be323da012] | committer: 
Rafaël Carré

Enhance dmo to support new dlls. This adds support for WMV9.

Signed-off-by: Rafaël Carré 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f57ca3b1bcf38d32879a7f5219cef5be323da012
---

 modules/codec/dmo/dmo.c |9 +
 1 file changed, 9 insertions(+)

diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c
index c0b981b..161fd17 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -152,6 +152,8 @@ static const GUID guid_wma9 = { 0x27ca0808, 0x01f5, 0x4e7a, 
{ 0x8b, 0x05, 0x87,
 static const GUID guid_wmv_enc = { 0x3181343b, 0x94a2, 0x4feb, { 0xad, 0xef, 
0x30, 0xa1, 0xdd, 0xe6, 0x17, 0xb4 } };
 static const GUID guid_wmv_enc2 = { 0x96b57cdd, 0x8966, 0x410c,{ 0xbb, 0x1f, 
0xc9, 0x7e, 0xea, 0x76, 0x5c, 0x04 } };
 static const GUID guid_wma_enc = { 0x70f598e9, 0xf4ab, 0x495a, { 0x99, 0xe2, 
0xa7, 0xc4, 0xd3, 0xd8, 0x9a, 0xbf } };
+static const GUID guid_wmv8_enc = { 0x7e320092, 0x596a, 0x41b2,{ 0xbb, 0xeb, 
0x17, 0x5d, 0x10, 0x50, 0x4e, 0xb6 } };
+static const GUID guid_wmv9_enc = { 0xd23b90d0, 0x144f, 0x46bd,{ 0x84, 0x1d, 
0x59, 0xe4, 0xeb, 0x19, 0xdc, 0x59 } };
 
 #ifndef BI_RGB
 # define BI_RGB 0x0
@@ -211,6 +213,13 @@ static const codec_dll encoders_table[] =
 /* WMA 2 */
 { VLC_CODEC_WMA2, "wmadmoe.dll", &guid_wma_enc },
 
+/* WMV3 v11 */
+{ VLC_CODEC_WMV3, "wmvencod.dll", &guid_wmv9_enc },
+/* WMV2 v11 */
+{ VLC_CODEC_WMV2, "wmvxencd.dll", &guid_wmv8_enc },
+/* WMV1 v11 */
+{ VLC_CODEC_WMV1, "wmvxencd.dll", &guid_wmv8_enc },
+
 /* */
 { 0, NULL, NULL }
 };

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Dual license fdkaac module under BSD 2-clause

2013-07-12 Thread Sergio Ammirata
vlc/vlc-2.1 | branch: master | Sergio Ammirata  | Thu Jul 
11 17:48:42 2013 +0200| [e54d05f6ebb27aa3d76557f9780b2656dd8454e6] | committer: 
Jean-Baptiste Kempf

Dual license fdkaac module under BSD 2-clause

Signed-off-by: Jean-Baptiste Kempf 
(cherry picked from commit a66825ca16050dcdeaeb038669eb95ab000644d7)
Signed-off-by: Jean-Baptiste Kempf 

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=e54d05f6ebb27aa3d76557f9780b2656dd8454e6
---

 modules/codec/fdkaac.c |   26 ++
 1 file changed, 26 insertions(+)

diff --git a/modules/codec/fdkaac.c b/modules/codec/fdkaac.c
index 7ec31e9..c0b2688 100644
--- a/modules/codec/fdkaac.c
+++ b/modules/codec/fdkaac.c
@@ -18,6 +18,32 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ *  Alternatively you can redistribute this file under the terms of the
+ *  BSD license as stated below:
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *  1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ *  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  */
 
 /*

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Dual license fdkaac module under BSD 2-clause

2013-07-11 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Thu Jul 11 
17:48:42 2013 +0200| [a66825ca16050dcdeaeb038669eb95ab000644d7] | committer: 
Jean-Baptiste Kempf

Dual license fdkaac module under BSD 2-clause

Signed-off-by: Jean-Baptiste Kempf 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a66825ca16050dcdeaeb038669eb95ab000644d7
---

 modules/codec/fdkaac.c |   26 ++
 1 file changed, 26 insertions(+)

diff --git a/modules/codec/fdkaac.c b/modules/codec/fdkaac.c
index 7ec31e9..c0b2688 100644
--- a/modules/codec/fdkaac.c
+++ b/modules/codec/fdkaac.c
@@ -18,6 +18,32 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ *  Alternatively you can redistribute this file under the terms of the
+ *  BSD license as stated below:
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *  1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ *  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  */
 
 /*

___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Add a new aac audio encoder module based on the fdkaac library. It works correctly up to 5. 1 as the current version of the library has problems with 7.1.

2012-10-26 Thread Sergio Ammirata
vlc | branch: master | Sergio Ammirata  | Thu Oct 25 
11:10:07 2012 -0400| [503feeaf87af2f367617a0f6465ef553b86e1cc3] | committer: 
Ilkka Ollakka

Add a new aac audio encoder module based on the fdkaac library. It works 
correctly up to 5.1 as the current version of the library has problems with 7.1.

Signed-off-by: Ilkka Ollakka 

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=503feeaf87af2f367617a0f6465ef553b86e1cc3
---

 configure.ac |5 +
 modules/codec/Modules.am |1 +
 modules/codec/fdkaac.c   |  537 ++
 3 files changed, 543 insertions(+)

Diff:   
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=503feeaf87af2f367617a0f6465ef553b86e1cc3
___
vlc-commits mailing list
vlc-commits@videolan.org
http://mailman.videolan.org/listinfo/vlc-commits