Fixed a small Memory Leak
Fix destructor video outputs.

This fixes a crash on Linux that supposedly occurs when pthread_join
is called multiple times.
Close rtmp connection when stream is stopped.

This will close the connection to the server when the stream
is stopped.
Merge pull request #71 from fryshorts/master

Some minor fixes
Improve output packet interleaving

The 'wait' constant was a terrible means of trying to ensure that the
packets were interleaved.  Instead, calculate the current highest
timestamps of each encoder that's present in the interleaved buffer, and
use that as a means of detecting whether the current packet should be
sent off.  This will guarantee sorting without relying on some arbirary
constant that 'assumes' that it'll be interleaved.  It also reduces
buffering any more than what is needed to interleave.
Fix bug with matrix rotation function
Add helper functions to obs_data and fix bug

Add math helpers to the obs_data functions for vec2/3/4 and quat, and
fix a bug where it wouldn't load arrays from json
Add preliminary saving/loading of scene/sources

This saves scenes/sources from json on exit, and properly loads it back
up when starting up the program again, as well as the currently active
scene.

I had to add a 'load' and 'save' callback to the source interface
structure because I realizes that certain sources (such as scenes)
operate different with their saved data; scenes for example would have
to keep track of their settings information constantly, and that was
somewhat unacceptable to make it functional.

The optional 'load' callback will be called only after having loaded
setttings specifically from file/imported data, and the 'save' function
will be called only specifically when data actually needs to be saved.

I also had to adjust the obs_scene code so that it's a regular input
source type now, and I also modified it so that it doesn't have some
strange custom creation code anymore.  The obs_scene_create function is
now simply just a wrapper for obs_source_create.  You could even create
a scene with obs_source_create manually as well.
Fix a few warnings
Enforce minimum source size for the preview window

Otherwise sources that return 0 width/height trigger errors in
gs_setviewport
Add async texrender to cleanup
Add support for changing the audio device while recording

Changing the audio device in the source properties will now cause
the plugin to switch recording to the new device.
Implement defaults functions

The defaults functions will now return the default device for the
input/output as provided by pulseaudio.
The default output device is the monitor of the default sink.
Add option to use alternative timestamps

With this option enabled the plugin will generate timestamps
based on the system time instead of using the ones provided by
pulse audio. This might fix problems with audio desync and may
become the default/only option in the future.
Add basic OSX AV capture plugin

Currently only cameras using interleaved 4:2:2 YCbCr are supported, e.g.
recent internal iSight cameras
Merge pull request #72 from fryshorts/pulse-input

Several Improvements to the pulseaudio capture
async vid.: Fix potential endless buffering issue

If a source with async video wasn't currently active, it would endlessly
buffer the video data, which would cause memory to grow endlessly until
available memory was extinguished.

This really needs to be replaced with a proper caching mechanism at some
point.
Hide audio captures as sources in basic mode

Still not 100% decided on this, but I already see people getting
confused over this, so I'm just going to hide them for the time being.
Mac A/V capture:  Fix minor issue

Use the port clock instead of the master clock
Fix Obj-C property usage

...I really need to go through my Objective-C reading material