Fix log_level check
Fix getting the X11 display with the Qt ui
Merge pull request #53 from BtbN/fixes

Fix gswindow display with Qt
Use Qt provided display with GLX functions for consistency.
Remove unneeded assignment from previous code.
Delete per window GL context for Cocoa and just swap the view instead

This unfortunately re-introduces undesirable rendering behaviour for
slow renderers (e.g. first gen Intel HD graphics/Apple software
renderer) when the property window is open, but fixes property window
preview rendering for sufficiently fast renderers
Use bzalloc instead of bmalloc+memset
This commit contains more than I intended. Read below for more info.

1) Fixed the preview window. It now correctly displays the source.
2) The GLX backend now correctly uses the devices current swap.
3) We now set device->cur_swap to a default so we don't have to check it in every function.
4) Minor syntactical cleanups and perhaps some messiness added.
Removed no longer valid comment
Merge branch 'master' of https://github.com/jp9000/obs-studio
Improve properties API

Improve the properties API so that it can actually respond somewhat to
user input.  Maybe later this might be further improved or replaced with
something script-based.

When creating a property, you can now add a callback to that property
that notifies when the property has been changed in the user interface.
Return true if you want the properties to be refreshed, or false if not.
Though now that I think about it I doubt there would ever be a case
where you would have this callback and *not* refresh the properties.

Regardless, this allows functions to change the values of properties or
settings, or enable/disable/hide other property controls from view
dynamically.
Add NV12 conversion shader
Make OBS basic and obs-ffmpeg-output use NV12 by default
Add packet interleaving and improve encoder API

 - Add interleaving of video/audio packets for outputs that are encoded
   and expect both video and audio data, sorting the packets and sending
   them to the output when both video and audio is received.

 - Combine create and initialize callbacks for the encoder API callback
   interface.
Add FFmpeg's AAC enoder

This just adds FFmpeg's default AAC encoder as an audio encoder.  Going
to try to start getting things going with the RTMP output library next.
AAC: Use obs_data_set_default_int function
Remove the weird size stuff from OBS_DECLARE_MODULE

Instead of doing this, just use macros to handle this situation.

Also, fix a minor bug in AAC encoder
And fix another bug that I just made

Accidentally removed a function from the main module declaration macro.
Well, that was embarassing.  (Remove size macro)

...I think I need sleep.  That last commit before this one shows it
quite clearly.
Add compatiblity for some older ffmpeg versions
Define DEBUG and _DEBUG on debug build