Commit graph

427 commits

Author SHA1 Message Date
Jim 31f9e3ef53 Merge pull request #31 from BtbN/cmake
More cmake adjustments
2014-01-25 17:13:19 -08:00
BtbN 668812ca3e Adjust file finding functions to also search the install root dir on Windows
This is because the installed versions of OBS is allways executed in the install root instead of inside the bin dir.
2014-01-26 02:04:37 +01:00
BtbN cfc3609a4e Fix/Workaround a cmake path seperator escaping bug on Windows 2014-01-26 02:04:36 +01:00
jp9000 4bf0855590 Add settings window files to VS project 2014-01-25 16:43:24 -07:00
jp9000 2fecfdb663 Add window-main.hpp to main VS project 2014-01-25 14:46:55 -07:00
Palana c1599a069a Remove unnecessary distinction between 32bit and 64bit on osx 2014-01-25 20:39:09 +01:00
Palana 8cd49b705f Update osx bundle info
OBS should not run as agent app
2014-01-25 20:37:53 +01:00
Palana 2aa4c1665a Remove Qt focus frame from various controls 2014-01-25 20:37:53 +01:00
jp9000 93d15ef254 Fix some formatting issues and fix cmake file 2014-01-25 12:34:37 -07:00
Jim 584e47e467 Merge pull request #30 from andy-kliman/master
add new icon for os x bundle
2014-01-25 10:49:23 -08:00
Jim 143f5e4bd6 Merge pull request #29 from BtbN/cmake
Restructure installation and package generation
2014-01-25 10:39:33 -08:00
BtbN 6a9dda87bd Restructure installation and package generation 2014-01-25 19:13:33 +01:00
jp9000 e964bea518 Update obs/CMakeLists.txt (forgot again) 2014-01-25 09:18:40 -07:00
jp9000 a801aac172 Merge branch 'master' of https://github.com/jp9000/obs-studio 2014-01-25 09:16:06 -07:00
jp9000 f09a9ed435 Apply a number of fixes to the main window
- Fix the size issue with list boxes on mac.  Was displaying the list
  boxes with an improper size.  Turns out it was just the wrong size
  policies on the frame below.

- Ensure the main windows are fully displayed *before* initializing
  subsystems.  This ensures that the graphics system will properly start
  up on macos, and allows the glitch fix.

- Made a workaround for weird QT glitch that would happen to the parent
  of a pure native widget that also has internal painting fully
  disabled.  (Should definitely write an example and report this bug on
  the QT forums)
2014-01-25 09:08:56 -07:00
Anry 99bf4bca85 added retina icon 2014-01-25 17:59:25 +04:00
Palana 3b664ae45c Mark method as override 2014-01-25 07:23:57 +01:00
Palana 88ad3777e3 Add Qt support for osx
Actual drawing fails due to initialization before there are any windows
2014-01-25 07:23:56 +01:00
jp9000 3922679bf4 Update CMakeLists.txt for last commit
Neglected to add the new files (window-settings-basic.*) to cmake.
2014-01-24 21:31:25 -07:00
jp9000 dd396c646a Merge branch 'master' of https://github.com/jp9000/obs-studio 2014-01-24 21:20:30 -07:00
jp9000 092f36fac4 Fix/update forms for main and settings window
- Had the wrong names set for the up/down widgets for sources/scenes

- Updated the settings dialog and gave most of the widgets actual object
  names

- Added code for the settings window.  Settings window should now at
  least display.
2014-01-24 21:19:50 -07:00
Zachary Lund e3299d5662 Added rudimentary support for Qt on Linux 2014-01-24 21:55:10 -06:00
Palana f2d0c98ffe Fix copy&paste error in AppKit cmake module
Only consider AppKit_LIBRARIES
2014-01-24 23:58:21 +01:00
Palana b9330d48f2 Update osx bundle files
The bundle icon now includes all recommended image resolutions and OBS
is now started as high resoltion application for high dpi displays,
still need to add high resolution images for icons used inside OBS
2014-01-24 23:22:34 +01:00
Palana 0fc7b1bbdc Require cmake 2.8.12 on osx
This requirement is due to rpath usage in the project and SDK location
changes[1] in more recent osx versions

[1] i.e. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1fce189e
2014-01-24 23:22:34 +01:00
Palana b6c5a26f97 Add explicit AppKit dependency for obs/platform-osx 2014-01-24 23:22:34 +01:00
jp9000 9f1249326b Fix a few formatting issues
Fixed a few files that went over 80 columns, mostly just a nitpack on my
part.

libobs/obs-nix.c had a rather bad case of leading whitespace.

Also, fixed the x86 obs-studio project files so that it would properly
output to the right directory.  It couldn't find libobs.lib because
obs-studio's project settings had it outputting to a different place
than the rest of the projects.
2014-01-24 12:52:22 -07:00
Jim 017a16ac7f Merge pull request #27 from BtbN/cmake
CMake Rewrite
2014-01-24 11:36:29 -08:00
BtbN bb35d2ce09 Fix building on non-MSVC compilers
This function is inline, and QVariant uses a copy-on-write like copying mechanism, like most datatypes in Qt.
2014-01-24 18:56:33 +01:00
BtbN 45ec80fb7d Full rewrite of all CMakeLists
CMake now works on all platforms
2014-01-24 18:56:32 +01:00
BtbN 8fa309c96e Clean old cmake files 2014-01-24 01:46:36 +01:00
jp9000 610d4415d5 Merge branch 'qt-ui' 2014-01-23 17:13:35 -07:00
jp9000 4cba9d336a Fix render issues with main preview widget
- I seem to have fixed ths issues with the main preview widget.  It
   seems you just need to set the right window attributes to stop it from
   breaking.  Though when opengl is enabled, there appears to be a weird
   background glitch in the Qt stuff -- I'm not entirely sure what's
   going on.  Bug in Qt?

   Also fixed the layout issues, and the widget now properly resizes and
   centers in to its parent widget.

 - Prevent the render loop from accessing data if the data isn't valid.
   Because obs->data is freed before the graphics stuff, it can cause
   the graphics to keep trying to query the obs->data.displays_mutex
   after it had already been destroyed.
2014-01-23 17:00:42 -07:00
jp9000 afeed34b7a Change the UI to Qt (work in progress)
--------------------------------------------------
Notes and details
--------------------------------------------------
Why was this done?  Because wxWidgets was just lacking in many areas.  I
know wxWidgets is designed to be used with native controls, and that's
great, but wxWidgets just is not a feature-complete toolkit for
multiplatform applications.  It lacks in dialog editors, its code is
archaic and outdated, and I just feel frustrated every time I try to do
things with it.

Qt on the other hand..  I had to actually try Qt to realize how much
better it was as a toolkit.  They've got everything from dialog editors,
to an IDE, a debugger, build tools, just everything, and it's all
top-notch and highly maintained.  The focus of the toolkit is
application development, and they spend their time trying to help
people do exactly that:  make programs.  Great support, great tools,
and because of that, great toolkit.  I just didn't want to alienate any
developers by being stubborn about native widgets.

There *are* some things that are rather lackluster about it and design
choices I disagree with though.  For example, I realize that to have an
easy to use toolkit you have to have some level of code generation.
However, in my personal and humble opinion, moc just feels like a
terrible way to approach the problem.  Even now I feel like there are a
variety of ways you could handle code generation and automatic
management of things like that.  I don't like the idea of circumventing
the language itself like that.  It feels like one giant massive hack.

--------------------------------------------------
Things that aren't working properly:
--------------------------------------------------
 - Settings dialog is not implemented.  The dialog is complete but the
   code to handle the dialog hasn't been constructed yet.

 - There is a problem with using Qt widgets as a device target on
   windows, with at least OpenGL: if I have the preview widget
   automatically resize itself, it seems to cause some sort of video
   card failure that I don't understand.

 - Because of the above, resizing the preview widget has been disabled
   until I can figure out what's going on, so it's currently only a
   32x32 area.

 - Direct3D doesn't seem to render correctly either, seems that the
   viewport is messed up or something.  I'm sort of confused about
   what's going on with it.

 - The new main window seems to be triggering more race conditions than
   the wxWidgets main window dialog did.  I'm not entirely sure what's
   going on here, but this may just be existing race conditions within
   libobs itself that I just never spotted before (even though I tend to
   be very thorough with race conditions any time I use variables
   cross-thread)
2014-01-23 11:53:55 -07:00
jp9000 b404fb7c75 Update jansson subtree to latest revision 2014-01-20 08:49:48 -07:00
jp9000 a3867aecde Make minor fix to new output code 2014-01-20 01:40:15 -07:00
jp9000 fc8851e9f4 Add preliminary ffmpeg plugin (still testing)
- Added some code for FFmpeg output that I'm still playing around with.
  Right now I'm just trying to get it to output to file and try to
  understand the FFmpeg/libav APIs.  Hopefully in the future this plugin
  can be used for any sort of output to FFmpeg.

- Fixed a cast warning in audio-io.c with size_t -> uint32_t

- Renamed the 'video_info' and 'audio_info' structures to
  'video_conver_info' and 'audio_convert_info' to better represent their
  actual purpose, and to avoid confusion with 'audio_output_info' and
  'video_output_info' structures.

- Removed a few macros from obs-def.h that were at one point going to be
  used but no longer going to be used (at least for now)
2014-01-19 03:16:41 -07:00
jp9000 8d63845dd4 Use macros to improve safety loading callbacks
Just a minor fix mostly because I noticed that I kept accidentally
forgetting to add checks to the code properly.  This is one of those
cases where macros come in useful, as macros can automate the process
and help prevent these mistakes from happening by accident.
2014-01-17 06:24:34 -07:00
jp9000 ff1afac5f8 Updated comments for outputs/encoders
Changed the comments to properly reflect the new callbacks, as I had
forgotten to update the comments for them both.

Also, changed "setbitrate" and "request_keyframe" return values to be
boolean.
2014-01-17 00:00:21 -07:00
jp9000 29b7d3621c Add preliminary output/encoder interface
- First, I redid the output interface for libobs.  I feel like it's
  going in a pretty good direction in terms of design.

  Right now, the design is so that outputs and encoders are separate.
  One or more outputs can connect to a specific encoder to receive its
  data, or the output can connect directly to raw data from libobs
  output itself, if the output doesn't want to use a designated encoder.
  Data is received via callbacks set when you connect to the encoder or
  raw output.  Multiple outputs can receive the data from a single
  encoder context if need be (such as for streaming to multiple channels
  at once, and/or recording with the same data).

  When an encoder is first connected to, it will connect to raw output,
  and start encoding.  Additional connections will receive that same
  data being encoded as well after that.  When the last encoder has
  disconnected, it will stop encoding.  If for some reason the encoder
  needs to stop, it will use the callback with NULL to signal that
  encoding has stopped.  Some of these things may be subject to change
  in the future, though it feels pretty good with this design so far.
  Will have to see how well it works out in practice versus theory.

- Second, Started adding preliminary RTMP/x264 output plugin code.

  To speed things up, I might just make a direct raw->FFmpeg output to
  create a quick output plugin that we can start using for testing all
  the subsystems.
2014-01-16 22:34:51 -07:00
jp9000 62c2b1d74e Simplify media i/o interfaces
Completely revamped the entire media i/o data and handlers.  The
original idea was to have a system that would have connecting media
inputs and outputs, but at a certain point I realized that this was an
unnecessary complexity for what we wanted to do.  (Also, it reminded me
of directshow filters, and I HATE directshow with a passion, and
wouldn't wish it upon my greatest enemy)

Now, audio/video outputs are connected to directly, with better callback
handlers, and will eventually have the ability to automatically handle
conversions such as 4:4:4 to 4:2:0 when connecting to an input that uses
them.  Doing this will allow the video/audio i/o handlers to also
prevent duplicate conversion, as well as make it easier/simple to use.

My true goal for this is to make output and encoder plugins as simple to
create as possible.  I want to be able to be able to create an output
plugin with almost no real hassle of having to worry about image
conversions, media inputs/outputs, etc.  A plugin developer shouldn't
have to handle that sort of stuff when he/she doesn't really need to.

Plugins will be able to simply create a callback via obs_video() and/or
obs_audio(), and they will automatically receive the audio/video data in
the formats requested via a simple callback, without needing to do
almost anything else at all.
2014-01-14 01:58:47 -07:00
jp9000 2c0118b2d7 Prevent debug break when not debugging 2014-01-12 22:04:41 -07:00
jp9000 02a101d1e8 Fix one minor bug with new timing code
When the first async video frame is used it would not set audio timing,
moved that code into obs_source_getframe.  Also, might consider renaming
obs_source_getframe.  "Query frame" instead perhaps?  Will sleep on it,
might not even bother.
2014-01-12 03:24:01 -07:00
jp9000 9f1a3c3112 Add preliminary handling of timestamp invalidation
- Add preliminary (yet to be tested) handling of timestamp invalidation
  issues that can happen with specific devices, where timestamps can
  reset or go backward/forward in time with no rhyme or reason.  Spent
  the entire day just trying to figure out the best way to handle this.

  If both audio and video are present, it will increment a reference
  counter if video timestamps invalidate, and decrement the reference
  counter when the audio timestamps invalidate.  When the reference
  counter is not 0, it will not send audio as the audio will have
  invalid timing.  What this does is it ensures audio data will never go
  out of bounds in relation to the video, and waits for both audio and
  video timestamps to "jump" together before resuming audio.

- Moved async video frame timing adjustment code into
  obs_source_getframe instead so it's automatically handled whenever
  called.

- Removed the 'audio wait buffer' as it was an unnecessary complexity
  that could have had problems in the future.  Instead, audio will not
  be added until video starts for sources that have both async
  audio/video.  Audio could have buffered for too long of a time anyway,
  who knows what devices are going to do.

- Fixed a minor conversion warning in audio-io.c
2014-01-12 02:40:51 -07:00
computerquip fc219e7d1d Merge pull request #26 from computerquip/upstream-merged
Add copyright and name to files it applies to.
2014-01-11 16:11:27 -08:00
Zachary Lund bb24591d48 Add copyright and name to files it applies to. 2014-01-11 18:09:48 -06:00
Jim d5f5d0edb7 Merge pull request #25 from computerquip/upstream-merged
Various changes for wxGTK
2014-01-11 14:54:04 -08:00
Zachary Lund 1deb27d502 Fixed os_gettime_ns to provide correct time in ns 2014-01-11 15:08:04 -06:00
jp9000 3f0b352d7f Clean up code in audio-io.c
Clean up a little bit of code that was unnecessarily nested.  Still a
little squishy but better than it was.
2014-01-10 19:21:32 -07:00
jp9000 4aa4858ac7 Account for thread pauses for audio data
- In the audio I/O code, if there's a pause in the program or its
   threads (especially the audio thread), it'll cause it to sample too
   much data, and increase line->base_timestamp to a potentially higher
   value than the next audio timestamp that may be added to the line.
   This would cause it to crash originally, because it expects audio
   data that is within the designated buffering limit.

   Because that audio data cannot be filled by that data anyway, just
   ignore the audio data until it goes back to the right timing (which
   it will as long as the code that is using the line accounts for its
   current system time)
2014-01-10 19:03:21 -07:00