0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

756 Commits

Author SHA1 Message Date
Palana
b0237fd581 Use high resolution GL surface when available 2014-04-16 22:39:20 +02:00
Palana
f447a44f9c Ensure sizes passed to OBS are actual pixel sizes
This should fix GS rendering on surfaces on HiDPI displays; moving
windows between displays with differing pixel ratios currently requires
a manual resize
2014-04-16 22:39:05 +02:00
Jim
2fc810fd09 Merge pull request #65 from BtbN/glad
Move from glLoadGen to GLAD
2014-04-16 12:51:32 -07:00
Palana
8e3d2ebbdd Allow hiding the cursor for Display Capture 2014-04-16 17:23:08 +02:00
Palana
be55c06308 Track properties window lifetime via QPointer
Previously the properties window would sometimes not receive
a closeEvent, leaving a dangling pointer in OBSBasicMain (and resulting
in a crash when trying to open a new properties window or closing
the application)
2014-04-16 17:22:06 +02:00
Palana
785d81ffe2 Fix #66 Display Capture for HiDPI displays
kCGDisplayStreamSourceRect takes points rather than pixels
2014-04-16 17:21:57 +02:00
Palana
b5276ea18f Add Settings entry to File menu
This automagically creates a (localized?) Preferences entry on OSX as well
2014-04-16 17:21:00 +02:00
jp9000
a712e631b4 Add GLAD project and add to VS solution 2014-04-15 22:19:40 +02:00
BtbN
e50201cad1 Move from glLoadGen to GLAD 2014-04-15 22:19:40 +02:00
BtbN
334792a62c Add glad opengl loader 2014-04-15 22:19:40 +02:00
jp9000
0bec267e40 OpenGL: Fix swizzle code again for alpha textures
My prior code was incorrect;  I mixed up the two parameters, the
GL_TEXTURE_SWIZZLE_* parameter specifies the target channel, and the
value itself specifies the source channel.,  If that makes sense.
2014-04-15 12:19:20 -07:00
jp9000
51d338430f Only do the alpha swizzle on alpha textures
Avoids problems if swizzles are used elsewhere (like in the newer X11
plugins)
2014-04-15 04:23:55 -07:00
jp9000
81153cb16d Fix code that breaks with VC (terrible compiler)
VC2013 still does not properly support placement of variables anywhere
in the scope.  It's a garbage compiler, always will be a garbage
compiler.
2014-04-14 14:21:32 -07:00
jp9000
d328d72f0b Merge branch 'master' of https://github.com/jp9000/obs-studio
Conflicts:
	test/osx/test.mm
2014-04-14 14:17:52 -07:00
jp9000
dbd8b2167d Update test programs and filters
The test program and test filter wasn't working properly because the ID
for it had actually changed.

The test programs also weren't updated for the new main render callbacks
which must be used when making a program.
2014-04-14 14:10:47 -07:00
Palana
3990c18aac Add NULL checks and assertions to fix clang static analysis problems
Also remove an unused variable from obs-encoder.c (via clang static
analysis)
2014-04-14 23:02:53 +02:00
Palana
e378ec8e4f Properly bridge CF object so ARC can deal with it 2014-04-14 23:02:53 +02:00
Palana
c86fa7bb30 Use libc++ inspired clock instead of the deprecated AbsoluteToNanoseconds
This also makes the clang static analyzer happy (it complained about
uninitialized fields in the AbsoluteTime struct)
2014-04-14 23:02:53 +02:00
Palana
0a38abe5ab Make OSX test application more idiomatic and add rendering callback 2014-04-14 22:55:35 +02:00
jp9000
b6c1439778 Remove /SAFESEH compiler flag from 32bit release
For the strangest reason, it would cause errors when linking to ffmpeg
on the 32bit windows release build
2014-04-14 13:47:04 -07:00
jp9000
fdd5b2b3b6 Fix a few warnings with jansson 2014-04-14 13:46:07 -07:00
jp9000
fa490fa8c4 Implement some basic logging for windows 2014-04-14 04:02:11 -07:00
jp9000
1388b749c9 Temporary fix to allow file output 2014-04-14 02:22:09 -07:00
jp9000
a4a52d1c87 Fix bug where packets weren't interleaving
Packets were not interleaving, thus new data was being sent out with
potentially non-monotonically increasing timestamps
2014-04-14 02:02:59 -07:00
Jim
8fa44b0012 Merge pull request #64 from BtbN/osxmake
Improve bundle fixup
2014-04-13 12:04:35 -07:00
BtbN
ce434c2d62 Also disable missing field initializer warning for C 2014-04-13 20:57:43 +02:00
BtbN
075820028f Improve bundle fixup 2014-04-13 11:05:46 -07:00
jp9000
2451b80ef6 Fix drawing bug with async video sources
Before, async video sources would flicker because they were only being
drawn when they were updated.  So when updated, they'd draw that frame,
then it would stop drawing it until it updated again.  This fixes that
issue and they should now draw properly.

Also, fix a few other minor bugs and issues relating to async video,
and make it so that non-async video filters can be properly applied to
them.

For the purposes of testing, change the 'test-random' source to an async
video source that updates every quarter of a second with a new random
face.

Also fix a bug where non-async video sources wouldn't have filter
effects applied properly.
2014-04-13 02:22:28 -07:00
jp9000
bc33b09ba9 Revert OpenGL swizzle change
Was wrong to use the swizzle -- it was an incorrect assumption on my
part that this could work in the first place (despite working on
windows)
2014-04-12 23:57:40 -07:00
jp9000
0e9b13fcf9 Fix style errors (please don't make me do this) 2014-04-12 11:21:47 -07:00
Jim
b53e2a88a3 Merge pull request #59 from BtbN/linux_fixes
Linux fixes and additions
2014-04-12 10:53:09 -07:00
BtbN
0f9c6e5503 Create sub window for rendering, to avoid visual mismatch issues 2014-04-12 16:24:38 +02:00
jp9000
b427397aa9 RTMP output: Implement frame drop code
A little bit of history about frame dropping:

I did a large number of experiments with frame dropping in old versions
of OBS1, and it's not an easy thing to deal with.  I tried just about
everything from standard i-frame delay, to large buffers, to dumping
packets, to super-unnecessarily-complex things that just ended up
causing more problems than they was worth.

When I did my experiments, I found that the most ideal frame drop system
(in terms of reducing the amount of total data that needed to be
dropped) was in the 0.4xx days where I had a 3 second frame-drop buffer
where I could calculate the actual buffer size in bytes, and then
intellgently choose packets in that buffer to trim it down to a specific
size while minimizing the number of p-frames and i-frames dropped, and
preventing the actual impact of dropped frames on the stream.  The
downside of it was that it required too much extra latency, and far too
many people complained about it, so it was removed in favor of the
current system.

The current system I just refer to just as 'packet dumping', which when
combined with low keyframe intervals (like most services use these
days), is the next-best method from my experience.  Just dump the buffer
when you reach a threshold of buffering (which I prefer to measure with
time rather than in size), then wait for a new i-frame.  Simple,
effective, and reduces the risk of consecutive buffering, while still
having fairly low impact on the stream output due to the low keyframe
interval of services.

By the way, audio will not (and should not ever) be dropped, lest you
end up with syncing issues (among other nasty things) specific to server
implementation.
2014-04-12 04:34:15 -07:00
BtbN
97c94b183a Add copy_texture_region function 2014-04-12 12:45:18 +02:00
Timo R
b312261abd Flush after logging 2014-04-12 12:45:18 +02:00
Timo R
b9f0da026e Move opengl loader into a seperate static library, so plugins can use it 2014-04-12 12:45:18 +02:00
jp9000
362e008b87 OpenGL: Use texture swizzle for BGRA/BGR/A8
On some operating systems, with specific drivers it seems that BGR/BGRA
isn't properly treated as such in certain cases.  This fix will
hopefully force the formats to be treated as BGR/BGRA when actually
rendering, which should get around the implementation-specific issue.
2014-04-11 13:14:20 -07:00
jp9000
f98c006711 Merge branch 'master' of https://github.com/jp9000/obs-studio 2014-04-10 12:03:59 -07:00
jp9000
519c4f4118 Fix issue when using multiple video encoders
- Fix an issue that could occur when using more than one video encoder.
   Audio/video would not sync up correctly because they were expected to
   be paired with a particular encoder.  This simply adds a little
   helper variable to encoder packets that specifies the system time in
   microseconds.  We then use that system time to sync

 - Fix an issue with x264 with fractional FPS rates (29.97 and 59.94
   particularly) where it would create ridiculously large stream
   outputs.  The problem was that you shouldn't set the timebase_*
   variables in the x264 params manually, let x264 handle the default
   values for it and leave them at 0.

 - Make x264 use CFR output, because there's no reason to ever use VFR
   in this case.
2014-04-10 11:59:42 -07:00
Palana
d0e3f0d6a3 Fix (debug build) warnings in librtmp 2014-04-08 15:57:21 +02:00
Palana
d45248d6ad Add preprocessor flag for librtmp network dumps
Fixes debug compilation on non-WIN32 targets due to undefined
netstackdump(_read) symbols
2014-04-08 15:41:12 +02:00
jp9000
92522d1886 Implement RTMP module (still needs drop code)
- Implement the RTMP output module.  This time around, we just use a
   simple FLV muxer, then just write to the stream with RTMP_Write.
   Easy and effective.

 - Fix the FLV muxer, the muxer now outputs proper FLV packets.

 - Output API:
   * When using encoders, automatically interleave encoded packets
     before sending it to the output.

   * Pair encoders and have them automatically wait for the other to
     start to ensure sync.

   * Change 'obs_output_signal_start_fail' to 'obs_output_signal_stop'
     because it was a bit confusing, and doing this makes a lot more
     sense for outputs that need to stop suddenly (disconnections/etc).

 - Encoder API:
   * Remove some unnecessary encoder functions from the actual API and
     make them internal.  Most of the encoder functions are handled
     automatically by outputs anyway, so there's no real need to expose
     them and end up inadvertently confusing plugin writers.

   * Have audio encoders wait for the video encoder to get a frame, then
     start at the exact data point that the first video frame starts to
     ensure the most accrate sync of video/audio possible.

   * Add a required 'frame_size' callback for audio encoders that
     returns the expected number of frames desired to encode with.  This
     way, the libobs encoder API can handle the circular buffering
     internally automatically for the encoder modules, so encoder
     writers don't have to do it themselves.

 - Fix a few bugs in the serializer interface.  It was passing the wrong
   variable for the data in a few cases.

 - If a source has video, make obs_source_update defer the actual update
   callback until the tick function is called to prevent threading
   issues.
2014-04-07 22:00:10 -07:00
jp9000
7eec72245d Fix graphics device export header
Caused D3D11 library to fail on load.  Don't know how I didn't see this
sooner.
2014-04-07 01:31:13 -07:00
jp9000
59969844a1 Add comments to config-file.h
Someone got rather confused over what the "default" functions did, so
hopefully this clears it up a bit.
2014-04-07 01:29:56 -07:00
jp9000
fd24d0de2f Use atomics for allocation counter
I was getting cases where the CPU cache was causing issues with the
allocation counter, for the longest time I thought I was doing something
wrong, but when the allocation counter went below 0, I realized it was
because I didn't use atomics for incrementing/decrementing the
allocation counter variable.  The allocation counter now always should
have the correct value.
2014-04-07 01:25:38 -07:00
jp9000
906535022f Add window capture
Now that we have the priorties window in we can finally be able to
select windows for capture source such as window capture.  Only took
about an hour or two to write.

Also, fixed some depednency issues on winmm.lib with obs-outputs
2014-04-07 01:20:36 -07:00
Jim
e78dc5aa51 Merge pull request #57 from jp9000/new-gl-loader
More extensions, less bugs
2014-04-06 19:55:00 -07:00
Zachary Lund
92f253d65f More extensions, less bugs 2014-04-06 16:21:19 -05:00
Jim
11c949f22c Merge pull request #56 from jp9000/new-gl-loader
Added GLX_NV_copy_image extension, updated tools
2014-04-05 17:36:27 -07:00
Zachary Lund
1dd3917745 Added GLX_NV_copy_image extension, updated tools 2014-04-05 13:49:19 -05:00