Commit Graph

68 Commits

Author SHA1 Message Date
Martin Pulec
3b1eff5cc3 transmit: rewrite get_data_len
- renamed to get_video_pkt_len()
- use alignment var that is common denominator for both pixel formats
  and FEC symbols
2022-03-11 10:19:49 +01:00
Martin Pulec
600b5c92fa transmit: use array for mult_pos
+ declare some vars when initialized (audio_tx_send())
2022-03-11 10:19:19 +01:00
Martin Pulec
a778460fba Compute packet sizes only once 2022-03-11 10:02:02 +01:00
Martin Pulec
5b62e4e884 rtpenc_h264: allocate on stack 2022-03-04 16:28:58 +01:00
Martin Pulec
8bded29c1c rtpenc_h264: hide API 2022-03-04 16:28:58 +01:00
Martin Pulec
e712578f43 Added audio RS encoding 2021-11-30 17:09:29 +01:00
Martin Pulec
0c4c8627e7 Transmit: moved FEC symbol size check to sep. func 2021-11-30 17:09:26 +01:00
Martin Pulec
1b3b27eb7c Updated copyright dates for modified files 2021-11-08 15:43:14 +01:00
Martin Pulec
3dfc94a83a Transmit: allow setting of rate limiter with control socket 2021-10-05 10:15:54 +02:00
Martin Pulec
e90cdeb647 Removed msg_change_fec_data, use msg_universal
Removed msg_change_fec_data, use msg_universal instead.

This is a more versatile solution allowing further extensions without
a need to modify the global structure at an expese of worse type control.
As a replacement, a tag starting msg_universal::text is used/suggested.
2021-10-05 09:16:59 +02:00
Martin Pulec
96589f7fd8 Fixed inconsistent format_audio_header declaration 2021-09-06 13:04:37 +02:00
Martin Pulec
2a10512164 FEC->PT: added media_type parameter 2021-08-24 19:17:06 +02:00
Martin Pulec
6ade6e0ba9 transmit: refactor/clean header/pt setting 2021-08-24 19:17:02 +02:00
Martin Pulec
3663843682 renamed fec_video_payload_hdr_t to fec_payload_hdr_t
Can be used for audio as well.
2021-08-23 11:00:28 +02:00
Martin Pulec
855deb056c Audio RTP header formatting to separate function 2021-08-23 11:00:28 +02:00
Martin Pulec
8f557a97d6 Replaced audio/audio.h with audio/types.h includes
audio/audio.h should not be used as a catch-all header for audio.
2021-08-11 15:58:58 +02:00
Martin Pulec
35a09bb1ab Server mode: minor improvements
- adjust receiver in rtp_process_data() - in previous location, the
packet might have been freed (in unusual scenario)
- do not check if sending to blackhole for every packet - do the check
only once per frame
2021-06-29 16:53:52 +02:00
Martin Pulec
f4e509caa9 Do not crash on >1 channels with RFC OPUS
Print an error message instead.
2021-04-01 10:30:55 +02:00
Martin Pulec
4712b4aecb Show usage for -f help 2021-03-09 16:05:36 +01:00
Martin Pulec
8f296fb815 Transmit: do not exceed MTU for audio with encryption
Encryption overhead (nonce etc.) was not taken into account when
computing package sizes.
2020-11-06 16:01:08 +01:00
Martin Pulec
913d026649 Traffic shaper: correctly clear fixed-rate flag 2020-11-03 11:01:56 +01:00
Ben Roeder
8aa20b599f LDGM to Reed–Solomon 2020-10-29 19:50:40 +00:00
Martin Pulec
13b448514a Partially fixed packet splitting
This partially reverts a0cc3db5.

Fixes command: uv -t testcard:1920:1080:25:RGBA --param decoder-use-codec=UYVY -d sdl

The selection of correct split is quite tricky because even though 4 is
suffiecient for RGBA, using the UYVY decoder increases the size to 8
because the line-decoder obviously needs to process 2 pixels (aligned
at 2-pixel boundry). So the sender has no prior knowledge which
splitting the receiver requires.

Currently it is only a workaround using LCM from a value 48 (suitable
for RG48->R12L conversion) and pixel format block size.
2020-07-17 14:23:18 +02:00
Martin Pulec
31d9809fcd Updated documentation
Updated authors, copyright to 3-clause BSD (where possible) and file-level Doxygen
2019-11-09 13:47:11 +01:00
Martin Pulec
9c7b18f117 Traffic shaper: use adapive capped bitrate
Use adaptive capped bitrate if a limit bitrate value is specified.
Previously packets were emitted exactly at the specified bitrate which
is now an optional. Now, by default, the shapper shapes equally to
a frame time or capped bitrate (if the packet rate would be lower).
2019-09-27 12:10:12 +02:00
Martin Pulec
137a7013ba Traffic shaper: parsing to function + help 2019-09-26 18:37:50 +02:00
Martin Piatka
be5eb344f8 transmit: free rtpenc_h264_state when done 2019-08-23 13:17:34 +02:00
Martin Pulec
a0cc3db591 Transmit: correctly split packets
Correctly split packets for different pixel formats - previously there
was preset 48 B boundary which was least common multiple for then
present pixel formats (v210 has 16, RGB 3). However, R12L is not covered
since it uses block of 36 bytes.

From now on, we are splitting the packets according to the needed
boundary of pixel format (or arbitrarily for compressed). As a side effect,
the packets may be slightly bigger up to MTU size.
2019-02-22 16:38:29 +01:00
Martin Pulec
384f6ef97f Transmit: same buf. number for all substreams
Keep the same buffer number for all substreams of the frame in RTP
payload header.
2019-02-14 14:55:21 +01:00
Martin Pulec
baf069b7c5 H.264 std: simplified a bit
Note that RTCP SR are now send slightly in a different way - previously
the timestamp used was T-1.
2018-12-17 10:57:52 +01:00
Martin Pulec
9f6048e144 Added RFC 2435 compliant RTP JPEG transport
Compliant JPEGs can be now sent with SDP or RTSP.
2018-12-17 10:37:53 +01:00
Martin Pulec
315749bbe5 RTP: fix sending of RFC-compilant OPUS stream
RTP timestamp was incorrectly computed from data_len/bps which confused VLC.

+ some cleanup
2018-10-18 16:27:42 +02:00
Martin Pulec
f0c99a4005 Readded SDP
* Since RTSP is no longer working with current LIVE555, RFC-conforming
  H.264/A-law/u-law/OPUS streams can be accessed with SDP.
* experimental only (would need more effort to be robust, well written
  etc.)
* removed ifdefs from transmit relating to standard AV RTP payload
  formating
* main: added --protocol option (shortcut for --audio-protocol and
  --video-protocol)
* main: disable intra refresh in default setting for H.264 in RTSP/SDP
2018-10-18 16:27:42 +02:00
Martin Pulec
2cee596807 Transmit: handle better FPS < 1.0 2017-05-11 13:53:26 +02:00
Martin Pulec
d55cc45a54 Encryption: better handling of modes
* check if the received cipher mode is known (forward compatibility)
2017-04-07 10:00:55 +02:00
Martin Pulec
eabc29d956 Encryption: use CFB instead of CTR
* implemented CFB + switched to it because Debian currently does not
  include CTR mode
* use CFB by default (decoder should still be able to decompress CTR if
  support is compiled in)
2017-04-05 22:24:56 +02:00
Martin Pulec
f47597dd89 Fixed bugs reported by Coverity 2017-03-03 18:07:18 +01:00
Martin Pulec
58d2cb8ec8 Fixed commit d12f99
Errorneously taken uninitialized packet_rate value instead of given
bitrate.
2017-01-27 11:13:53 +01:00
Martin Pulec
d12f9932b6 Transmit: packet rate changes
* video: compute packet rate from actual (average) size of packet, not
         MTU, because it may be different from MTU when using FEC to
         align the size to size of FEC symbol
* audio: disable traffic shaping at all
2017-01-24 16:51:02 +01:00
Martin Pulec
cdf865394f Transmit: use bitrate instead of packet rate
Packet rate is now computed in transmit.cpp
2017-01-24 16:26:01 +01:00
Martin Pulec
892883df02 Fixed some Coverity bugs 2016-06-28 17:33:24 +02:00
Martin Pulec
0c3f23623a Control: fixed FEC on-fly change 2016-03-07 15:57:53 +01:00
Martin Pulec
2cc6aab0e2 Added possibility to send message synchronously
+ in capabilities list, given bitrate is computed according to the
  detected capture format (provided that '-t' argument is given)
2015-08-25 17:05:23 +02:00
Martin Pulec
f738f5f2b7 Module registration: require (const void *) instead of (void *) for metadata 2015-08-19 09:53:10 +02:00
Martin Pulec
821eda0e43 Traffic shaper: adjust wait intervals
Take into account when sending of a packet took significantly more
(eg. full buffer or process switch). In this case adlujust following
packet interval(s) accordingly.
2015-07-31 11:32:21 +02:00
Martin Pulec
b38bc4f53f Warn about exceeding allowed MTU in tx_init() 2015-07-23 14:09:18 +02:00
Martin Pulec
f1094d119b Control socket: per frame reports for producent 2015-05-18 13:10:41 +02:00
Martin Pulec
9d251ec068 Audio: don't let user use unsupported FEC 2015-04-20 16:19:13 +02:00
Martin Pulec
b807249136 Compute packets intervals from packet count
This can have an impact when there are inequal sizes of packets (eg.
with FEC symbol size aligned packets).
2015-04-07 14:00:31 +02:00
Martin Pulec
2512737c09 Added Reed-Solomon 2015-04-07 10:44:04 +02:00