173 Commits

Author SHA1 Message Date
Shaolin
e5756a922a libobs/plugins/UI: Suppress unused variables warnings
Closes jp9000/obs-studio#937
2017-06-27 21:55:37 -07:00
Shaolin
cb9f767e45 libobs/plugins/UI: Suppress -Wimplicit-fallthrough introduced by GCC 7
Signed-off-by: Shaolin <admshao@gmail.com>
2017-05-29 21:05:18 -03:00
Ryan Foster
972c470319 librtmp: Fix build error with ENODATA on FreeBSD
When building on FreeBSD before this patch, it would produce the error
"error: use of undeclared identifier 'ENODATA'". This fixes that.
2017-05-25 03:48:53 -04:00
Gol-D-Ace
3d2cacd782 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
Richard Stanway
92a258690e
obs-outputs: Add output error messages for RTMP 2017-05-15 12:05:44 +02:00
jp9000
d1329d1798 obs-outputs: Fix frame dropping when using ultrafast
x264 on ultrafast won't drop any b-frames, so it might buffer packets a
bit too much in that case.

The frame drop duration calculation now searches for the first valid
video frame within the packets buffer.  Additionally, it no longer
prevents frame dropping for a specific time after dropping frames,
because the first case eliminates the need for that.
2017-05-06 11:29:36 -07:00
jp9000
585b3ed945 obs-outputs: Add connect time callback for rtmp output 2017-05-06 11:29:35 -07:00
jp9000
f6517d2be3 obs-outputs: Add null output
Allows encoding without necessarily outputting to a file or stream.
Useful for running encoding tests.
2017-05-06 11:29:33 -07:00
SoraYuki
0ea0b99aa0 obs-outputs: Always call RTMP_Init before connecting
Clears/reinitializes RTMP structure to defaults, preventing data from
potentially persisting between different connections.

Closes jp9000/obs-studio#878
2017-04-30 06:05:58 -07:00
Ryan Foster
be98cee2a0 Fix various typos across multiple modules 2017-04-25 22:39:42 -04:00
Richard Stanway
48df41b5b7
obs-outputs: Improve shutdown behavior of new socket loop 2017-03-06 20:54:35 +01:00
Gol-D-Ace
dbf95bdc15 Update translations from Crowdin 2017-03-05 23:40:11 +01:00
Richard Stanway
7c7307df88
obs-outputs: Various fixes to new network code
Fixes another 100% CPU spin bug, improves low latency mode, fixes some
crashes on stopping stream due to race conditions.
2017-03-04 02:59:02 +01:00
Richard Stanway
e63edcd436
obs-outputs: Fix 100% CPU usage with new network code 2017-03-02 00:44:45 +01:00
Richard Stanway
8b640fae24
Fix various null pointer issues detected by Coverity 2017-02-25 16:45:45 +01:00
Richard Stanway
f8617bd359 librtmp: Clean up our extra RTMP fields on close 2017-02-25 06:16:19 -08:00
Richard Stanway
935223be34 obs-outputs: Port windows socket loop from OBS Classic 2017-02-25 06:16:18 -08:00
jp9000
d1b78edbf3 obs-outputs: Increase default drop threshold
500ms is a bit unnecessarily low.
2017-01-24 15:54:25 -08:00
jp9000
5c27ab8d87 obs-output: Add ability to get congestion to rtmp output 2017-01-24 15:52:22 -08:00
Iblis Lin
7a15f670e1 obs-outputs: fix build error on freebsd
There is a build error on freebsd:
    error: invalid application of 'sizeof' to an incomplete type
    'struct sockaddr_in'

Include proper header file to solve this.

Ref:
https://www.freebsd.org/doc/en/books/developers-handbook/sockets-essential-functions.html
2017-01-04 16:31:50 +08:00
jp9000
afe37773bc obs-outputs: Free encoder packet data manually
These aren't referenced encoder packets, so they must be freed manually.
2016-12-24 03:01:52 -08:00
Gol-D-Ace
69f0bc244a Update translations from Crowdin 2016-12-23 20:46:47 +01:00
jp9000
7d6e6eee79 libobs: Use reference counting for encoder packets
Prevents reallocation of encoded packet data.

Deprecates:
obs_duplicate_encoder_packet
obs_free_encoder_packet

Replaces those functions with:
obs_encoder_packet_ref
obs_encoder_packet_release
2016-12-08 03:27:39 -08:00
Richard Stanway
7df46d4a8e
obs-outputs: Fix librtmp IP bind / resolve behavior
Fixes a case where OBS would prefer trying to connect
to an IPv4 address even though you had bound it to an
IPv6 interface for example.
2016-11-30 22:11:17 +01:00
Gol-D-Ace
90e805ad9b Update translations from CrowdIn 2016-11-16 00:32:47 +01:00
jp9000
c5706d726b obs-outputs: Use correct variable for drop priority
There are two variables used for 'priority', the general marked frame
priority, and the drop priority.  They can sometimes be different
because some encoders don't always use the correct frame priority.
2016-11-13 16:29:23 -08:00
jp9000
ed85b22534 Update translations from CrowdIn 2016-11-03 13:32:52 -07:00
Warren Turkal
40a5436549 obs-ffmpeg: Fix a couple printf compiler warnings. 2016-10-30 19:56:08 -07:00
Gol-D-Ace
aadc7263c0 Update translations from Crowdin 2016-09-28 01:17:24 +02:00
Richard Stanway
4d23e84837
librtmp: Remove reconnect on close behavior
For some reason librtmp treats a close message as a request to reconnect.
It does this syncronously, and uses the same event processing so that
another close request will continue the cycle until the stack is exhausted
and the application crashes.

Fixes https://obsproject.com/mantis/view.php?id=634
2016-09-27 00:37:59 +02:00
jp9000
108a4aa40e obs-outputs: Add max shutdown timeout (30 seconds)
The maximum shutdown timeout value was added as a setting, but never
actually fully implemented.  This implements it properly, and sets its
default timeout value to 30 seconds.
2016-09-21 21:51:22 -07:00
jp9000
50d7cc8ae6 obs-outputs: Allow forced stop even when stopping 2016-09-09 17:39:20 -07:00
Richard Stanway
eca0ca8424
obs-outputs: Prefer IPv4 addresses for RTMP connections 2016-08-15 17:58:01 +02:00
jp9000
34590b4b6a obs-outputs: Allow p-frames to be dropped
Previously, for an unknown reason p-frames were marked as highest
priority along with i-frames (keyframes), which means they could not be
dropped.  This would cause a problem where if for whatever reason
there's too much congestion, data would continually buffer.  This fixes
the issue by dropping p-frames at a separate (higher) threshold than
b-frames.
2016-08-13 16:35:05 -07:00
jp9000
630207d590 obs-outputs: Improve frame drop testing
Measures packet data rate and sleeps to prevent data from going above
the set data rate.  Uncomment the TEST_FRAMEDROPS macro, then set
DROPTEST_MAX_KBPS to the desired kb/s (for example 3000 for 3000
kilobits per second), and then it will limit the data rate to that
specified amount, forcing the thread to sleep to ensure it can only
output the desired data rate.
2016-08-13 01:24:32 -07:00
jp9000
27ac2cf940 obs-outputs: Remove custom version from FMLE string
Causes issues with certain servers that don't parse it properly and only
expect a specific string.

Use the RTMP onMetaData to get the OBS version instead when possible.
2016-08-12 15:47:57 -07:00
Gol-D-Ace
cb036b2713 Update translations from Crowdin 2016-08-08 16:21:48 +02:00
jp9000
4f3fc21a20 obs-outputs: Fix author for net-if.* files
These files were heavily modified but originally written by:
B. Lee <bl4@postpile.net>
2016-07-31 05:45:36 -07:00
jp9000
289ccee447 obs-outputs: Add ability to bind to an IP address for RTMP 2016-07-29 15:47:30 -07:00
jp9000
9ebe5349fa obs-outputs: Add Bind-To-IP wrapper functions
Allows enumerating IP addresses so you can select the adapter/IP from
which to stream from.
2016-07-29 15:47:28 -07:00
Gol-D-Ace
81adb13f59 Update translations from Crowdin 2016-07-06 01:18:27 +02:00
jp9000
d7db0b8b01 (API Change) libobs: Fix output data cutoff on stop
(Note: This commit also modifies obs-ffmpeg and obs-outputs)

API Changed:
obs_output_info::void (*stop)(void *data);

To:
obs_output_info::void (*stop)(void *data, uint64_t ts);

This fixes the long-time design flaw where obs_output_stop and the
output 'stop' callback would just shut down the output without
considering the timing of when obs_output_stop was used, discarding any
possible buffering and causing the output to get cut off at an
unexpected timing.

The 'stop' callback of obs_output_info now takes a timestamp with the
expectation that the output will use that timestamp to stop output data
in accordance to that timing.  obs_output_stop now records the timestamp
at the time that the function is called and calls the 'stop' callback
with that timestamp.  If needed, obs_output_force_stop will still stop
the output immediately without buffering.
2016-06-22 14:10:39 -07:00
jp9000
605590606f obs-outputs: Remove send_remaining_packets
Because output stop timing has been fixed, there is no need to send the
remaining packets in the queue because it now just waits for the stop
timing anyway.
2016-06-20 02:56:33 -07:00
jp9000
e77e87007c obs-outputs: Remove unused variable 2016-05-26 09:10:21 -07:00
Gol-D-Ace
fe56a12867 Update translations from Crowdin 2016-05-14 00:27:59 +02:00
jp9000
b16557371c obs-outputs: Improve error handling when sending headers
There was no error checking when sending headers/metadata, so what would
happen is that if a header/metadata send failed (meaning the socket was
disconnected), it would continue to act as if it was still connected,
and it would block and lock up on the next send/recv call.
2016-04-26 20:14:31 -07:00
Gol-D-Ace
5ed7081213 Update translations from Crowdin 2016-04-23 10:29:21 +02:00
Richard Stanway
c42f666b02
obs-outputs: Fix assign instead of compare on socket address type
Detected by Coverity Scan (CID 92187, 92170)
2016-04-13 02:23:23 +02:00
jp9000
2f2cb138bb obs-outputs: Remove trailing/leading whitespace from key/url 2016-03-24 13:42:54 -07:00
jp9000
69da1151e0 Update translations from Crowdin 2016-03-19 12:08:48 -07:00