- Sep 26, 2014
-
-
GoaLitiuM authored
-
Jim authored
Typedef pointers are unsafe. If you do: typedef struct bla *bla_t; then you cannot use it as a constant, such as: const bla_t, because that constant will be to the pointer itself rather than to the underlying data. I admit this was a fundamental mistake that must be corrected. All typedefs that were pointer types will now have their pointers removed from the type itself, and the pointers will be used when they are actually used as variables/parameters/returns instead. This does not break ABI though, which is pretty nice.
-
- Sep 04, 2014
-
-
Jim authored
Audio that goes below the minimum expecting timing (current time - buffering time) is automatically removed. However, delayed audio is not removed regardless of its delay. This puts a hard cap of 6 seconds from current time that the maximum delay audio can have. This will also prevent the circular buffer from dynamically growing too large.
-
- Aug 30, 2014
-
-
Jim authored
Doing timestamp smoothing in obs-source.c is good because timestamps can typically operate on a different timebase, however, obs-source.c can also change that time base dynamically (such as with async video and unexpected timestamp jumps), so in order to ensure that audio is seamless in the output as well, perform timestamp smoothing in audio-io.c as well just as an extra precautionary measure.
-
- Aug 09, 2014
-
-
Jim authored
Renamed: To: ----------------------------------------------------------- audio_output_blocksize audio_output_get_block_size audio_output_planes audio_output_get_planes audio_output_channels audio_output_get_channels audio_output_samplerate audio_output_get_sample_rate audio_output_getinfo audio_output_get_info audio_output_createline audio_output_create_line video_output_getinfo video_output_get_info video_gettime video_output_get_time video_getframetime video_output_get_frame_time video_output_width video_output_get_width video_output_height video_output_get_height video_output_framerate video_output_get_frame_rate video_output_num_skipped_frames video_output_get_skipped_frames video_output_total_frames video_output_get_total_frames
-
- Jun 08, 2014
-
-
Danni authored
-
- Jun 07, 2014
-
-
Jim authored
-
- Jun 03, 2014
-
-
Jim authored
Also, Remove the volume level processing from audio-io.c, it was moved to obs_source instead.
-
- May 24, 2014
- May 20, 2014
-
-
Danni authored
-
- Apr 14, 2014
-
-
Palana authored
Also remove an unused variable from obs-encoder.c (via clang static analysis)
-
- Apr 01, 2014
-
-
Jim authored
- obs-outputs module: Add preliminary code to send out data, and add an FLV muxer. This time we don't really need to build the packets ourselves, we can just use the FLV muxer and send it directly to RTMP_Write and it should automatically parse the entire stream for us without us having to do much manual code at all. We'll see how it goes. - libobs: Add AVC NAL packet parsing code - libobs/media-io: Add quick helper functions for audio/video to get the width/height/fps/samplerate/etc rather than having to query the info structures each time. - libobs (obs-output.c): Change 'connect' signal to 'start' and 'stop' signals. 'start' now specifies an error code rather than whether it simply failed, that way the client can actually know *why* a failure occurred. Added those error codes to obs-defs.h. - libobs: Add a few functions to duplicate/free encoder packets
-
- Mar 16, 2014
-
-
Jim authored
- Implement OBS encoder interface. It was previously incomplete, but now is reaching some level of completion, though probably should still be considered preliminary. I had originally implemented it so that encoders only have a 'reset' function to reset their parameters, but I felt that having both a 'start' and 'stop' function would be useful. Encoders are now assigned to a specific video/audio media output each rather than implicitely assigned to the main obs video/audio contexts. This allows separate encoder contexts that aren't necessarily assigned to the main video/audio context (which is useful for things such as recording specific sources). Will probably have to do this for regular obs outputs as well. When creating an encoder, you must now explicitely state whether that encoder is an audio or video encoder. Audio and video can optionally be automatically converted depending on what the encoder specifies. When something 'attaches' to an encoder, the first attachment starts the encoder, and the encoder automatically attaches to the media output context associated with it. Subsequent attachments won't have the same effect, they will just start receiving the same encoder data when the next keyframe plays (along with SEI if any). When detaching from the encoder, the last detachment will fully stop the encoder and detach the encoder from the media output context associated with the encoder. SEI must actually be exported separately; because new encoder attachments may not always be at the beginning of the stream, the first keyframe they get must have that SEI data in it. If the encoder has SEI data, it needs only add one small function to simply query that SEI data, and then that data will be handled automatically by libobs for all subsequent encoder attachments. - Implement x264 encoder plugin, move x264 files to separate plugin to separate necessary dependencies. - Change video/audio frame output structures to not use const qualifiers to prevent issues with non-const function usage elsewhere. This was an issue when writing the x264 encoder, as the x264 encoder expects non-const frame data. Change stagesurf_map to return a non-const data type to prevent this as well. - Change full range parameter of video scaler to be an enum rather than boolean
-
- Mar 10, 2014
-
-
Jim authored
...The reason why audio didn't work was because I overwrote the bitrate values. As for semaphores, mac doesn't support unnamed semaphores without using mach semaphores. So, I just implemented a semaphore wrapper for each OS.
-
- Mar 08, 2014
-
-
Jim authored
Had the audio restart slot connected to things that didn't require a restart
-
- Mar 07, 2014
-
-
Jim authored
- Fix a bug where the initial audio data insertion would cause all audio data to unintentionally clear (mixed up < and > operators, damn human error) - Fixed a potential interdependant lock scenario with channel mutex locks and graphics mutex locks. The main video thread could lock the graphics mutex and then while in the graphics mutex could lock the channels mutex. Meanwhile in another thread, the channel mutex could get locked, and then the graphics mutex would get locked, causing a deadlock. The best way to deal with this is to not let mutexes lock within other mutexes, but sometimes it's difficult to avoid such as in the main video thread. - Audio devices should now be functional, and the devices in the audio settings can now be changed as desired.
-
- Feb 28, 2014
-
-
Jim authored
LOG_ERROR should be used in places where though recoverable (or at least something that can be handled safely), was unexpected, and may affect the user/application. LOG_WARNING should be used in places where it's not entirely unexpected, is recoverable, and doesn't really affect the user/application.
-
Jim authored
Also, make it use 'veryfast' preset. Still testing this, might have to revise this later.
-
- Feb 27, 2014
-
-
Jim authored
- Add CoreAudio device input capture for mac audio capturing. The code should cover just about everything for capturing mac input device audio. Because of the way mac audio is designed, users may have no choice but to obtain the open source soundflower software to capture their mac's desktop audio. It may be necessary for us to distribute it with the program as well. - Hide event backend - Use win32 events for windows - Allow timed waits for events - Fix a few warnings
-
- Feb 24, 2014
-
-
Jim authored
-
- Feb 23, 2014
-
-
Jim authored
Implement a few audio options in to the user interface as well as a few inline audio functions in audio-io.h. Make it so ffmpeg plugin automatically converts to the desired format. Use regular interleaved float internally for audio instead of planar float.
-
- Feb 22, 2014
-
-
Jim authored
This allows the changing of bideo settings without having to completely reset all graphics data. Will recreate internal output/conversion buffers and such and reset the main preview.
-
- Feb 21, 2014
-
-
Jim authored
Make it so obs_data settings input in to *_update are applied to the existing settings rather than fully replace the existing settings. That way you can update with only certain specific settings, leaving other settings untouched. Of course if you're already using the original settings pointer in the first place then you've already done that, so it'll just ignore it because you've already applied them.
-
Jim authored
Make sure audio multiplication is clamped, and also make sure that larger volume values can be safely used.
-
- Feb 18, 2014
-
-
Jim authored
Add a scaler interface (defaults to swscale), and if a separate output wants to use a different scale or format than the default output format, allow a scaler instance to be created automatically for that output, which will then receive the new scaled output.
-
- Feb 17, 2014
- Feb 14, 2014
-
-
Jim authored
...I neglected to put a '%' character before using the PRI* macros.
-
Jim authored
-
Jim authored
There were a *lot* of warnings, managed to remove most of them. Also, put warning flags before C_FLAGS and CXX_FLAGS, rather than after, as -Wall -Wextra was overwriting flags that came before it.
-
- Feb 09, 2014
-
-
Jim authored
Reduces needless code repetition and still allows for proper memory alignment. Cleans up the code a bit.
-
Jim authored
-
Jim authored
- Fill in the rest of the FFmpeg test output code for testing so it actually properly outputs data. - Improve the main video subsystem to be a bit more optimal and automatically output I420 or NV12 if needed. - Fix audio subsystem insertation and byte calculation. Now it will seamlessly insert new audio data in to the audio stream based upon its timestamp value. (Be extremely cautious when using floating point calculations for important things like this, and always round your values and check your values) - Use 32 byte alignment in case of future optimizations and export a function to get the current alignment. - Make os_sleepto_ns return true if slept, false if the time has already been passed before the call. - Fix sinewave output so that it actually properly calculates a middle C sinewave. - Change the use of row_bytes to linesize (also makes it a bit more consistent with FFmpeg's naming as well)
-
- Feb 07, 2014
-
-
Jim authored
- Add planar audio support. FFmpeg and libav use planar audio for many encoders, so it was somewhat necessary to add support in libobs itself. - Improve/adjust FFmpeg test output plugin. The exports were somewhat messed up (making me rethink how exports should be done). Not yet functional; it handles video properly, but it still does not handle audio properly. - Improve planar video code. The planar video code was not properly accounting for row sizes for each plane. Specifying row sizes for each plane has now been added. This will also make it more compatible with FFmpeg/libav. - Fixed a bug where callbacks wouldn't create properly in audio-io and video-io code. - Implement 'blogva' function to allow for va_list usage with libobs logging.
-
- Jan 19, 2014
-
-
Jim authored
- 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)
-
- Jan 14, 2014
-
-
Jim authored
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.
-
- Jan 12, 2014
-
-
Jim authored
- 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
-
- Jan 10, 2014
-
-
Jim authored
Clean up a little bit of code that was unnecessarily nested. Still a little squishy but better than it was.
-
Jim authored
- 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)
-