- 12 8月, 2015 1 次提交
-
-
由 Palana 提交于
-
- 10 7月, 2015 1 次提交
-
-
由 jp9000 提交于
In case the encoder has to use a different sample rate (due to the sample rate being unsupported), we need an API function for the encoder to get the sample rate that the encoder is actually running at.
-
- 22 6月, 2015 1 次提交
-
-
由 jp9000 提交于
Allows obs-encoder callbacks to remove themselves while in a callback.
-
- 01 6月, 2015 1 次提交
-
-
由 Palana 提交于
Found via clang static analysis
-
- 12 5月, 2015 2 次提交
- 07 5月, 2015 1 次提交
-
-
由 Palana 提交于
-
- 18 4月, 2015 2 次提交
-
-
由 jp9000 提交于
I realized that the get_video_info and get_audio_info encoder callbacks always have to manually query the libobs audio/video information. This fixes that problem by passing the libobs video/audio information in the structures passed to those callbacks so they don't have to query it each time, reducing needless boilerplate code for encoders.
-
由 jp9000 提交于
Allows the ability to hint at encoders what format should be used. This is particularly useful if libobs is currently operating in planar 4:4:4, but you want to force an encoder used for streaming to convert to NV12 to prevent streaming issues.
-
- 11 2月, 2015 1 次提交
-
-
由 jp9000 提交于
When using multiple video encoders together with a single audio encoder, the audio wouldn't be in sync. The reason why this occurred is because the dts_usec variable of the encoder packet (which is based on system time) would always be reset to a value based upon the dts (which is not guaranteed to be based on system time) in the apply_interleaved_packet_offset function. This would then in turn cause it to miscalculate the starting audio/video offsets, which are required to calculate sync. So instead of calling that function unnecessarily, separate the check for whether audio/video has been received in to a new function, and only start applying the interleaved offsets after audio and video have actually started up and the starting offsets have been calculated.
-
- 05 2月, 2015 4 次提交
-
-
由 jp9000 提交于
'obs_encoder_get_type' to get the type of an existing encoder, and 'obs_get_encoder_type' to get the type via its identifier
-
由 jp9000 提交于
This allows the ability to get the codec of an encoder via its identifier string
-
由 jp9000 提交于
-
由 jp9000 提交于
API changed: -------------------------- void obs_output_set_audio_encoder( obs_output_t *output, obs_encoder_t *encoder); obs_encoder_t *obs_output_get_audio_encoder( const obs_output_t *output); obs_encoder_t *obs_audio_encoder_create( const char *id, const char *name, obs_data_t *settings); Changed to: -------------------------- /* 'idx' specifies the track index of the output */ void obs_output_set_audio_encoder( obs_output_t *output, obs_encoder_t *encoder, size_t idx); /* 'idx' specifies the track index of the output */ obs_encoder_t *obs_output_get_audio_encoder( const obs_output_t *output, size_t idx); /* 'mixer_idx' specifies the mixer index to capture audio from */ obs_encoder_t *obs_audio_encoder_create( const char *id, const char *name, obs_data_t *settings, size_t mixer_idx); Overview -------------------------- This feature allows multiple audio mixers to be used at a time. This capability was able to be added with surprisingly very little extra overhead. Audio will not be mixed unless it's assigned to a specific mixer, and mixers will not mix unless they have an active mix connection. Mostly this will be useful for being able to separate out specific audio for recording versus streaming, but will also be useful for certain streaming services that support multiple audio streams via RTMP. I didn't want to use a variable amount of mixers due to the desire to reduce heap allocations, so currently I set the limit to 4 simultaneous mixers; this number can be increased later if needed, but honestly I feel like it's just the right number to use. Sources: Sources can now specify which audio mixers their audio is mixed to; this can be a single mixer or multiple mixers at a time. The obs_source_set_audio_mixers function sets the audio mixer which an audio source applies to. For example, 0xF would mean that the source applies to all four mixers. Audio Encoders: Audio encoders now must specify which specific audio mixer they use when they encode audio data. Outputs: Outputs that use encoders can now support multiple audio tracks at once if they have the OBS_OUTPUT_MULTI_TRACK capability flag set. This is mostly only useful for certain types of RTMP transmissions, though may be useful for file formats that support multiple audio tracks as well later on.
-
- 03 1月, 2015 1 次提交
-
-
由 jp9000 提交于
When the encoder is set to scale to a different resolution than the obs output resolution, make sure it uses the current video colorspace and range by default.
-
- 22 12月, 2014 1 次提交
-
-
由 jp9000 提交于
If an encoder did not possess any SEI data, it would never send data at all because the sent_first_packet wasn't set despite the first packet being sent.
-
- 01 10月, 2014 1 次提交
-
-
由 Palana 提交于
-
- 27 9月, 2014 1 次提交
-
-
由 jp9000 提交于
This Fixes a minor flaw with the API where data had to always be mutable to be usable by the API. Functions that do not modify the fundamental underlying data of a structure should be marked as constant, both for safety and to signify that the parameter is input only and will not be modified by the function using it.
-
- 26 9月, 2014 1 次提交
-
-
由 jp9000 提交于
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.
-
- 11 8月, 2014 1 次提交
-
-
由 jp9000 提交于
API functions added: ----------------------------------------------- obs_output_set_preferred_size obs_output_get_width obs_output_get_height obs_encoder_set_scaled_size obs_encoder_get_width obs_encoder_get_height These functions allow for easier means of setting a custom resolution on an output or encoder. If an output uses an encoder and you set the preferred width/height using the output, then the output will attempt to set the scaled width/height for the encoder it's currently using. Outputs and encoders now should use these functions to determine the width/height of the raw frame data instead of using the video-io functions.
-
- 10 8月, 2014 2 次提交
-
-
由 jp9000 提交于
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
-
由 jp9000 提交于
Renamed: To: ------------------------------------------------------- obs_source_info::defaults obs_source_info::get_defaults obs_source_info::properties obs_source_info::get_properties obs_output_info::defaults obs_output_info::get_defaults obs_output_info::properties obs_output_info::get_properties obs_output_info::total_bytes obs_output_info::get_total_bytes obs_output_info::dropped_frames obs_output_info::get_dropped_frames obs_encoder_info::defaults obs_encoder_info::get_defaults obs_encoder_info::properties obs_encoder_info::get_properties obs_encoder_info::extra_data obs_encoder_info::get_extra_data obs_encoder_info::sei_data obs_encoder_info::get_sei_data obs_encoder_info::audio_info obs_encoder_info::get_audio_info obs_encoder_info::video_info obs_encoder_info::get_video_fino obs_service_info::defaults obs_service_info::get_defaults obs_service_info::properties obs_service_info::get_properties
-
- 09 8月, 2014 2 次提交
-
-
由 jp9000 提交于
Renamed: To: ------------------------------------------------------- obs_source_info::getname obs_source_info::get_name obs_source_info::getwidth obs_source_info::get_width obs_source_info::getheight obs_source_info::get_height obs_output_info::getname obs_output_info::get_name obs_encoder_info::getname obs_encoder_info::get_name obs_service_info::getname obs_service_info::get_name
-
由 jp9000 提交于
Previous names: New names: ----------------------------------------------------------- obs_view_setsource obs_view_set_source obs_view_getsource obs_view_get_source obs_source_getdisplayname obs_source_get_display_name obs_source_getwidth obs_source_get_width obs_source_getheight obs_source_get_height obs_filter_getparent obs_filter_get_parent obs_filter_gettarget obs_filter_get_target obs_source_filter_setorder obs_source_filter_set_order obs_source_getsettings obs_source_get_settings obs_source_getname obs_source_get_name obs_source_setname obs_source_set_name obs_source_setvolume obs_source_set_volume obs_source_getvolume obs_source_get_volume obs_scene_getsource obs_scene_get_source obs_scene_fromsource obs_scene_from_source obs_scene_findsource obs_scene_find_source obs_output_getdisplayname obs_output_get_display_name obs_output_getname obs_output_get_name obs_encoder_getname obs_encoder_get_name obs_service_getdisplayname obs_service_get_display_name obs_service_getname obs_service_get_name
-
- 29 7月, 2014 2 次提交
-
-
由 jp9000 提交于
With the recent change to module handling by BtbN, I felt that having this information might be useful in case someone is actually using make install to set up their libraries.
-
由 jp9000 提交于
Sources/Outputs/Services all use a find_* naming scheme, so it felt out of place for the encoder to use a different naming scheme.
-
- 13 7月, 2014 2 次提交
- 26 6月, 2014 1 次提交
-
-
由 jp9000 提交于
The locale parameter was a mistake, because it puts extra needless burden upon the module developer to have to handle this variable for each and every single callback function. The parameter is being removed in favor of a single centralized module callback function that specifically updates locale information for a module only when needed.
-
- 17 6月, 2014 1 次提交
-
-
由 jp9000 提交于
The 'initialize' callback is used before the encoders/output start up so it can adjust encoder settings to required values if needed. Also added the function 'obs_encoder_active' that returns true or false depending on whether that encoder is active or not.
-
- 24 4月, 2014 1 次提交
-
-
由 jp9000 提交于
- Updated the services API so that it links up with an output and the output gets data from that service rather than via settings. This allows the service context to have control over how an output is used, and makes it so that the URL/key/etc isn't necessarily some static setting. Also, if the service is attached to an output, it will stick around until the output is destroyed. - The settings interface has been updated so that it can allow the usage of service plugins. What this means is that now you can create a service plugin that can control aspects of the stream, and it allows each service to create their own user interface if they create a service plugin module. - Testing out saving of current service information. Saves/loads from JSON in to obs_data_t, seems to be working quite nicely, and the service object information is saved/preserved on exit, and loaded again on startup. - I agonized over the settings user interface for days, and eventually I just decided that the only way that users weren't going to be fumbling over options was to split up the settings in to simple/basic output, pre-configured, and then advanced for advanced use (such as multiple outputs or services, which I'll implement later). This was particularly painful to really design right, I wanted more features and wanted to include everything in one interface but ultimately just realized from experience that users are just not technically knowledgable about it and will end up fumbling with the settings rather than getting things done. Basically, what this means is that casual users only have to enter in about 3 things to configure their stream: Stream key, audio bitrate, and video bitrate. I am really happy with this interface for those types of users, but it definitely won't be sufficient for advanced usage or for custom outputs, so that stuff will have to be separated. - Improved the JSON usage for the 'common streaming services' context, I realized that JSON arrays are there to ensure sorting, while forgetting that general items are optimized for hashing. So basically I'm just using arrays now to sort items in it.
-
- 20 4月, 2014 1 次提交
-
-
由 jp9000 提交于
Add API for streaming services. The services API simplifies the creation of custom service features and user interface. Custom streaming services later on will be able to do things such as: - Be able to use service-specific APIs via modules, allowing a more direct means of communicating with the service and requesting or setting service-specific information - Get URL/stream key via other means of authentication such as OAuth, or be able to build custom URLs for services that require that sort of thing. - Query information (such as viewer count, chat, follower notifications, and other information) - Set channel information (such as current game, current channel title, activating commercials) Also, I reduce some repeated code that was used for all libobs objects. This includes the name of the object, the private data, settings, as well as the signal and procedure handlers. I also switched to using linked lists for the global object lists, rather than using an array of pointers (you could say it was.. pointless.) ..Anyway, the linked list info is also stored in the shared context data structure.
-
- 15 4月, 2014 1 次提交
-
-
由 Palana 提交于
Also remove an unused variable from obs-encoder.c (via clang static analysis)
-
- 11 4月, 2014 1 次提交
-
-
由 jp9000 提交于
- 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.
-
- 08 4月, 2014 1 次提交
-
-
由 jp9000 提交于
- 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.
-
- 05 4月, 2014 1 次提交
-
-
由 jp9000 提交于
- 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.
-
- 04 4月, 2014 1 次提交
-
-
由 jp9000 提交于
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.
-
- 02 4月, 2014 1 次提交
-
-
由 jp9000 提交于
- 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
-
- 28 3月, 2014 1 次提交
-
-
由 jp9000 提交于
- Make it so that encoders can be assigned to outputs. If an encoder is destroyed, it will automatically remove itself from that output. I specifically didn't want to do reference counting because it leaves too much potential for unchecked references and it just felt like it would be more trouble than it's worth. - Add a 'flags' value to the output definition structure. This lets the output specify if it uses video/audio, and whether the output is meant to be used with OBS encoders or not. - Remove boilerplate code for outputs. This makes it easier to program outputs. The boilerplate code involved before was mostly just involving connecting to the audio/video data streams directly in each output plugin. Instead of doing that, simply add plugin callback functions for receiving video/audio (either encoded or non-encoded, whichever it's set to use), and then call obs_output_begin_data_capture and obs_output_end_data_capture to automatically handle setting up connections to raw or encoded video/audio streams for the plugin. - Remove 'active' function from output callbacks, as it's no longer really needed now that the libobs output context automatically knows when the output is active or not. - Make it so that an encoder cannot be destroyed until all data connections to the encoder have been removed. - Change the 'start' and 'stop' functions in the encoder interface to just an 'initialize' callback, which initializes the encoder. - Make it so that the encoder must be initialized first before the data stream can be started. The reason why initialization was separated from starting the encoder stream was because we need to be able to check that the settings used with the encoder *can* be used first. This problem was especially annoying if you had both video/audio encoding. Before, you'd have to check the return value from obs_encoder_start, and if that second encoder fails, then you basically had to stop the first encoder again, making for unnecessary boilerplate code whenever starting up two encoders.
-
- 23 3月, 2014 1 次提交
-
-
由 jp9000 提交于
- Add a properties window for sources so that you can now actually edit the settings for sources. Also, display the source by itself in the window (Note: not working on mac, and possibly not working on linux). When changing the settings for a source, it will call obs_source_update on that source when you have modified any values automatically. - Add a properties 'widget', eventually I want to turn this in to a regular nice properties view like you'd see in the designer, but right now it just uses a form layout in a QScrollArea with regular controls to display the properties. It's clunky but works for the time being. - Make it so that swap chains and the main graphics subsystem will automatically use at least one backbuffer if none was specified - Fix bug where displays weren't added to the main display array - Make it so that you can get the properties of a source via the actual pointer of a source/encoder/output in addition to being able to look up properties via identifier. - When registering source types, check for required functions (wasn't doing it before). getheight/getwidth should not be optional if it's a video source as well. - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted libobs pointers - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to automatically disconnect them on destruction - Move the "scale and center" calculation in window-basic-main.cpp to its own function and in its own source file - Add an 'update' callback to WASAPI audio sources
-