Commit Graph

1738 Commits (ab7fa5bdb4df82b10dbcecf80cdd1b933dfb600b)

Author SHA1 Message Date
Zachary Lund ab7fa5bdb4 linux-capture: Add X border option to xcomposite
XComposite, which is currently our only capture method for windows,
doesn't handle X border width. This works in a lot of cases but anytime
there's a border, a bug occurs where the lower right is clipped.  This
patch has two goals:

1) To position and size the capture texture correctly in accordance to
the border.

2) Adds a configuration option to allow people to toggle it (which in
most cases will simply do nothing) with a default of not including it.
2014-11-09 22:17:45 -08:00
jp9000 391dc0f267 Update to 0.6.4 2014-11-03 14:18:30 -08:00
jp9000 b4c797bc1d Fix asset crash interleaving with active encoders
Apparently the audio isn't guaranteed to start up past the first video
frame, so it would trigger that assert (which I'm glad I put in).  I
didn't originally have this happen when I was testing because my audio
buffering was not at the default value and didn't trigger it to occur.
A blunder on my part, and once again a fine example of how you should
never make assumptions about possible code path.
2014-11-03 14:13:14 -08:00
jp9000 37ffc7b448 Update to 0.6.3 2014-11-02 16:03:51 -08:00
jp9000 28ac194257 text-freetype2: Fix null pointer dereference
Somehow, there were fonts with empty face names.  Regardless, it's
always important to check your pointers.  Invalid pointers spell doom.
2014-10-31 20:39:37 -07:00
Palana a21a369ec9 mac-syphon: Track inject status and retry injecting if needed
Some applications defer loading OpenGL until after they are visible as
running applications, which causes SyphonInject to not install a server
on the first try (e.g. Minecraft does this)
2014-11-01 03:07:06 +01:00
Palana dfbe7156be mac-syphon: List bundle identifier and pid in case of duplicate names 2014-11-01 03:07:06 +01:00
Palana b766faedb3 mac-syphon: Inject the best match(es) only 2014-11-01 03:07:06 +01:00
Palana 20f805a850 mac-syphon: Keep old inject settings in case of partial match
In some cases the actual application (bundle identifier) would get
overwritten with a wrapper application bundle identifier when the
application names matched (this happened with e.g., Minecraft)
2014-11-01 03:07:05 +01:00
Palana 56d220395e mac-syphon: Move release calls to helper function 2014-11-01 03:07:05 +01:00
Palana afa172feea sparkle-updater: Enable delta update failure fallback
Refer to 53cad36953
for further details
2014-11-01 03:06:26 +01:00
Jim 32da2332fd Merge pull request #291 from dodgepong/latest-crowdin-translations
Add latest translations from CrowdIn
2014-10-31 18:42:33 -07:00
dodgepong 17804ec12f Add latest translations from CrowdIn 2014-10-31 21:02:47 -04:00
Jim ed51fd0efd Merge pull request #287 from fryshorts/doxygen
Add Doxygen configuration for creating api documentation
2014-10-29 20:41:05 -07:00
Jim 10a9133e7c Merge pull request #290 from jp9000/v4l2-improvements
linux-v4l2: Handle reconnection in properties
2014-10-29 10:52:55 -07:00
fryshorts d9a7b9062d linux-v4l2: Update properties when devices change.
This causes the properties for v4l2 sources to be refreshed when a
device is disconnected/connected.
2014-10-29 10:18:21 -07:00
fryshorts ac40408dfa linux-v4l2: Disable properties when device is not there.
This adds helper function to disable/enable all properties which is
used in the device selected callback to enable/disable the properties
when the selected device is available/unavailable.
2014-10-29 10:18:20 -07:00
fryshorts 3a85d662be linux-v4l2: Always display currently selected device.
This adds some code to the device enumeration that checks if the
currently selected device is present. In case it is not it will
add the device but disable it.
2014-10-29 10:18:20 -07:00
fryshorts 24d1495b84 linux-v4l2: Avoid nested device open/close.
This moves the calls to the property modified functions so the old
handler can close the device. Otherwise this would cause the device
to be opened multiple times.
2014-10-29 10:17:59 -07:00
fryshorts 1945804624 linux-v4l2: Make frame counter local.
This replaces the var in the source struct that was used to print out
the number of captured frames with a local one.
2014-10-29 09:41:34 -07:00
fryshorts 45583a759a linux-v4l2: Make timestamp offset local.
This replaces the var in the source struct that are handling the
timestamp offset with a local one in the capture thread.
This change is mostly to make the code more readable.
2014-10-29 09:41:33 -07:00
fryshorts c0f6733b58 linux-v4l2: Fix select in capture thread.
This moves the enabling/resetting of the file descriptors inside the
capture loop so it is done before each select call. Why this even worked
before is unclear, but doing it the *right* way seems to reduce latency.
2014-10-29 09:41:33 -07:00
Palana 29e61cc68e Fix OBSRef move assignment not releasing the previous reference 2014-10-29 16:17:07 +01:00
Palana ce782b44b7 Fix Qt unregistered datatype messages 2014-10-29 16:06:18 +01:00
Palana 6dcdaab2be Register OBSSource as Qt metatype 2014-10-29 16:06:18 +01:00
Palana e16b57b076 Add missing copy/move operations for OBSObj 2014-10-29 16:06:17 +01:00
Palana 572401fd80 Add missing copy/move operations for OBSSignal 2014-10-29 16:05:23 +01:00
Palana 60cc91f9c9 Fix typo in signal handler creation check 2014-10-29 16:05:23 +01:00
Jim b539a5304c Merge pull request #289 from Gol-D-Ace/remove-twitch-ingest-server
Remove ingest server live-ord.twitch.tv from services.json
2014-10-27 13:28:18 -07:00
Gol-D-Ace ebffa6b47c Remove ingest server live-ord.twitch.tv from services.json
Server doesn't exist anymore
https://api.twitch.tv/kraken/ingests
http://blog.twitch.tv/2014/09/service-update-chicago-point-of-presence-closure/
2014-10-27 21:00:34 +01:00
Palana 26964634d1 mac-syphon: Add "Allow Transparency" property
Transparency is now disabled by default, so that alpha values from
injected back buffers don't propagate to OBS (e.g. Minecraft doesn't
render properly in OBS unless "Allow Transparency" is disabled)
2014-10-27 01:01:14 +01:00
jp9000 d6b3230dbc linux-v4l2: Start timestamps from 0 per device
When a new device starts up, make it so that the first timestamp that
occurs starts from 0.  This prevents the internal source timestamp
handling from trying to buffer new frames to the new timestamp value in
case the device changes.
2014-10-23 11:38:59 -07:00
jp9000 40b1cc180d linux-v4l2: Add 'Use System Timing' property
Due to potential driver issues with certain devices, the timestamps are
not always reliable.  This option allows of using the time in which the
frame was received as a timestamp instead.
2014-10-23 11:38:59 -07:00
jp9000 015bc80edb Add optional source flags
This moves the 'flags' variable from the obs_source_frame structure to
the obs_source structure, and allows user flags to be set for a specific
source.  Having it set on the obs_source_frame structure didn't make
much sense.

OBS_SOURCE_UNBUFFERED makes it so that the source does not buffer its
async video output in order to try to play it on time.  In other words,
frames are played as soon as possible after being received.

Useful when you want a source to play back as quickly as possible
(webcams, certain types of capture devices)
2014-10-23 11:38:51 -07:00
jp9000 db81c59b5e Revert "Add flag to obs_source_frame for unbuffered video"
This reverts commit c3f4b0f018.

The obs_source_frame should not need to take flags to do this.  This
shouldn't be a setting associated with the frame, but rather a setting
associated with the source itself.  This was the wrong approach to
solving this particular problem.
2014-10-23 10:15:26 -07:00
jp9000 ae0f6b5e3f Revert "linux-v4l2: Add 'unbuffered' property"
This reverts commit cd306d975a.

This removes the 'unbuffered' property for the time being.  There should
be a better way of handling this, such as using system timestamps.
Also, the obs_source_frame::flags member needs to be removed and
replaced with something a bit more ideal.
2014-10-23 10:14:32 -07:00
jp9000 73599b8df6 Fix a major sync bug
This bug would happen if audio packets started being received before
video packets.  It would erroneously cause audio packets to be
completely thrown away, and in certain cases would cause audio and video
to start way out of sync.

My original intention was "don't accept audio until video has started",
but instead mistakenly had the effect of "don't start audio until a
video packet has been received".  This was originally was intended as a
way to handle outputs hooking in to active encoders and compensating
their existing timestamp information.

However, this made me realize that there was a major flaw in the design
for handling this, so I basically rewrote the entire thing.

Now, it does the following steps when inserting packets:

- Insert packets in to the interleaved packet array

- When both audio/video packets are received, prune packets up until the
  point in which both audio/video start at the same time

- Resort the interleaved packet array

I have tested this code extensively and it appears to be working well,
regardless of whether or not the encoders were already active with
another output.
2014-10-22 20:32:50 -07:00
jp9000 661d53067a util: Fix bug with darray_erase_range
Did not multiply the element size for the memory move operation.
2014-10-22 20:32:50 -07:00
jp9000 a07ebf44e6 media-io: Fix repeating video timestamps
In video-io.c, video frames could skip, but what would happen is the
frame's timestamp would repeat for the next frame, giving the next frame
a non-monotonic timestamp, and then jump.  This could mess up syncing
slightly when the frame is finally given to an outputs.
2014-10-22 20:32:49 -07:00
jp9000 e4629978e8 Fix a bug where audio would not restart (outputs)
Apparently I unintentionally typed received_video = false twice instead
of one for video and one for audio.

This fixes a bug where audio would not start up again on an output that
had recently started and then stopped.
2014-10-22 20:32:49 -07:00
jp9000 0f2e4f8e0c Fix bug removing output from its previous encoders
When the output sets a new audio/video encoder, it was not properly
removing itself from the previous audio/video encoders it was associated
with.  It was erroneously removing itself from the encoder parameter
instead.
2014-10-22 20:32:48 -07:00
jp9000 d14dbbc540 Add timestamp circlebuf for video input/output
At the start of each render loop, it would get the timestamp, and then
it would then assign that timestamp to whatever frame was downloaded.
However, the frame that was downloaded was usually occurred a number of
frames ago, so it would assign the wrong timestamp value to that frame.

This fixes that issue by storing the timestamps in a circular buffer.
2014-10-22 20:32:48 -07:00
jp9000 381afe0493 Detect audio time values within OS time thresh.
If audio timestamps are within the operating system timing threshold,
always use those values directly as a timestamp, and do not apply the
regular jump checks and timing adjustments that normally occur.

This potentially fixes an issue with plugins that use OS timestamps
directly as timestamp values for their audio samples, and bypasses the
timing conversions to system time for the audio line and uses it
directly as the timestamp value.  It prevents those calculations from
potentially affecting the audio timestamp value when OS timestamps are
used.

For example, if the first set of audio samples from the audio source
came in delayed, while the subsequent samples were not delayed, those
first samples could have potentially inadvertently triggered the timing
adjustments, which would affect all subsequent audio samples.
2014-10-22 20:32:48 -07:00
jp9000 1c40ce6332 Use MAX_TS_VAR for timestamp jump detection
This combines the 'direct' timestamp variance threshold with the maximum
timestamp jump threshold (or rather just removes the max timestamp jump
threshold and uses the timestamp variance threshold for both timestamp
jumps and detecting timestamps).

The reason why this was done was because a timestamp jump could occur at
a higher threshold than the threshold used for detecting OS timestamps
within a certain threshold.  If timestamps got between those two
thresholds it kind of became a weird situation where timestamps could be
sort of 'stuck' back or forward in time more than intended.  Better to
be consistent and use the same threshold for both values.
2014-10-22 20:32:47 -07:00
jp9000 cd306d975a linux-v4l2: Add 'unbuffered' property
This allows the user to select whether to use unbuffered video or not.
Unbuffered video cause the video frames to play back as soon as they're
received, rather than be buffered and attempt to play them back
according to the timestamp value of each frame.
2014-10-22 20:32:47 -07:00
jp9000 c3f4b0f018 Add flag to obs_source_frame for unbuffered video
Add 'flags' member variable to obs_source_frame structure.

The OBS_VIDEO_UNBUFFERED flags causes the video to play back as soon as
it's received (in the next frame playback), causing it to disregard the
timestamp value for the sake of video playback (however, note that the
video timestamp is still used for audio synchronization if audio is
present on the source as well).

This is partly a convenience feature, and partly a necessity for certain
plugins (such as the linux v4l plugin) where timestamp information for
the video frames can sometimes be unreliable.
2014-10-22 20:32:47 -07:00
jp9000 2c3f9c47d1 Fix a typo ('timetamp') 2014-10-22 20:32:46 -07:00
jp9000 f6d635e586 Change default audio smoothing threshold to 50ms
70 milliseconds is a bit too high for the default audio timestamp
smoothing threshold.  The full range of error thus becomes 140
milliseconds, which is a bit more than necessary to worry about.  For
the time being, I feel it may be worth it to try 50 milliseconds.
2014-10-22 20:32:46 -07:00
Palana e2f9d62a3b Sparkle-Updater: Select delta update if available 2014-10-19 19:16:04 +02:00
Palana 1e41dab7b5 Open source properties on double click 2014-10-19 19:16:04 +02:00