- 28 12月, 2014 8 次提交
-
-
由 jp9000 提交于
The copy_audio_data function really shouldn't be inlined because it's being called twice. It's somewhat unnecessary, I think I left it inline by accident.
-
由 jp9000 提交于
This flag is actually useful under a number of circumstances, and has been requested a number of times.
-
由 jp9000 提交于
This changes the way source volume handles transitioning between being active and inactive states. The previous way that transitioning handled volume was that it set the presentation volume of the source and all of its sub-sources to 0.0 if the source was inactive, and 1.0 if active. Transition sources would then also set the presentation volume for sub-sources to whatever their transitioning volume was. However, the problem with this is that the design didn't take in to account if the source or its sub-sources were active anywhere else, so because of that it would break if that ever happened, and I didn't realize that when I was designing it. So instead, this completely overhauls the design of handling transitioning volume. Each frame, it'll go through all sources and check whether they're active or inactive and set the base volume accordingly. If transitions are currently active, it will actually walk the active source tree and check whether the source is in a transitioning state somewhere. - If the source is a sub-source of a transition, and it's not active outside of the transition, then the transition will control the volume of the source. - If the source is a sub-source of a transition, but it's also active outside of the transition, it'll defer to whichever is louder. This also adds a new callback to the obs_source_info structure for transition sources, get_transition_volume, which is called to get the transitioning volume of a sub-source.
-
由 jp9000 提交于
The reason to keep a reference counter for transitions is due to an optimization I'm planning on when calculating transition volumes. I'm planning on walking the source tree to be able to calculate the current base volume of a source, but *only* if there are transitions active, because the only time that the volume can be anything other than 1.0 or 0.0 is when there are active transitions, which may change the base volume of a source.
-
由 jp9000 提交于
Changes OBS_SOURCE_UNBUFFERED to OBS_SOURCE_FLAG_UNBUFFERED to make naming a bit better for source flags.
-
由 jp9000 提交于
When the presentation volume is set for a source, it's set for all of its children and their children. The original intention for doing this was to be able to use it for transitioning, but honestly it's just bad design, and I feel there are better ways to handle transitioning volume.
-
由 jp9000 提交于
Adds a signal is called when the sync offset has changed for a source.
-
由 jp9000 提交于
Changed the design from using obs_source::enum_refs to just simply preventing infinite source recursion in general, rather than allowing it through the enum_refs variable. obs_source_add_child has been changed so that it now returns a boolean, and if the function fails, it means that the child cannot be added due to that potential recursion.
-
- 25 12月, 2014 1 次提交
-
-
由 jp9000 提交于
..Apparently I left this function unimplemented. This function just returns whether a source is currently active or not.
-
- 22 12月, 2014 1 次提交
-
-
由 jp9000 提交于
-
- 15 12月, 2014 1 次提交
-
-
由 fryshorts 提交于
Remove the calculation of volume levels and the corresponding signal from obs_source since this is now handled in the volume meter. Code that is interested in the volume levels can either use the volmeter provided from obs_audio_controls or use the audio_data signal to gain access to the raw audio data.
-
- 13 12月, 2014 1 次提交
-
-
由 fryshorts 提交于
This adds a new signal to (audio) sources which is emitted whenever new audio data is received from the source. This enables other code that is interested in the raw audio data to directly access it when it becomes available.
-
- 05 12月, 2014 1 次提交
-
-
由 fryshorts 提交于
This replaces the old code for the audio meter that was using calculations in two different places with the new audio meter api. The source signal will now emit simple levels instead of dB values, in order to avoid dB conversion and calculation in the source. The GUI on the other hand now expects simple position values from the volume meter api with no knowledge about dB calculus either. That way all code that handles those conversions is in one place, with the option to easily add new mappings that can be used everywhere.
-
- 27 11月, 2014 1 次提交
-
-
由 jp9000 提交于
Because a vec3 structure can contain a __m128 variable and not the expected three floats x, y, and z, you must use vec3_set when setting a value for a vec3 structure to ensure that it uses the proper intrinsics internally if necessary.
-
- 20 11月, 2014 2 次提交
-
-
由 jp9000 提交于
If you look at the previous commits, you'll see I had added obs_source_draw before. For custom drawn sources in particular, each time obs_source_draw was called, it would restart the effect and its passes for each draw call, which was not optimal. It should really use the effect functions for that. I'll have to add a function to simplify effect usage. I also realized that including the color matrix parameters in obs_source_draw made the function kind of messy to use; instead, separating the color matrix stuff out to obs_source_draw_set_color_matrix feels a lot more clean. On top of that, having the ability to set the position would be nice to have as well, rather than having to mess with the matrix stuff each time, so I also added that for the sake of convenience. obs_source_draw will draw a texture sprite, optionally of a specific size and/or at a specific position, as well as optionally inverted. The texture used will be set to the 'image' parameter of whatever effect is currently active. obs_source_draw_set_color_matrix will set the color matrix value if the drawing requires color matrices. It will set the 'color_matrix', 'color_range_min', and 'color_range_max' parameters of whatever effect is currently active. Overall, these feel much more clean to use than the previous iteration.
-
- 17 11月, 2014 2 次提交
-
-
由 jp9000 提交于
This function simplifies drawing textures for sources in order to help reduce boilerplate code. If a source is a custom drawn source, it will automatically set up the effect to draw the sprite. If it's not a custom drawn source, it will simply draw the sprite as per normal. If the source uses a specific color matrix, it will also handle that as well.
-
由 fryshorts 提交于
This replaces the call to fmaxf with the equivalent inline comparison which is a bit faster (at least on linux).
-
- 24 10月, 2014 2 次提交
-
-
由 jp9000 提交于
This moves the 'flags' variable from the obs_source_frame structure to the obs_source structure, and allows user flags to be set for a specific source. Having it set on the obs_source_frame structure didn't make much sense. OBS_SOURCE_UNBUFFERED makes it so that the source does not buffer its async video output in order to try to play it on time. In other words, frames are played as soon as possible after being received. Useful when you want a source to play back as quickly as possible (webcams, certain types of capture devices)
-
- 23 10月, 2014 4 次提交
-
-
由 jp9000 提交于
If audio timestamps are within the operating system timing threshold, always use those values directly as a timestamp, and do not apply the regular jump checks and timing adjustments that normally occur. This potentially fixes an issue with plugins that use OS timestamps directly as timestamp values for their audio samples, and bypasses the timing conversions to system time for the audio line and uses it directly as the timestamp value. It prevents those calculations from potentially affecting the audio timestamp value when OS timestamps are used. For example, if the first set of audio samples from the audio source came in delayed, while the subsequent samples were not delayed, those first samples could have potentially inadvertently triggered the timing adjustments, which would affect all subsequent audio samples.
-
由 jp9000 提交于
This combines the 'direct' timestamp variance threshold with the maximum timestamp jump threshold (or rather just removes the max timestamp jump threshold and uses the timestamp variance threshold for both timestamp jumps and detecting timestamps). The reason why this was done was because a timestamp jump could occur at a higher threshold than the threshold used for detecting OS timestamps within a certain threshold. If timestamps got between those two thresholds it kind of became a weird situation where timestamps could be sort of 'stuck' back or forward in time more than intended. Better to be consistent and use the same threshold for both values.
-
由 jp9000 提交于
Add 'flags' member variable to obs_source_frame structure. The OBS_VIDEO_UNBUFFERED flags causes the video to play back as soon as it's received (in the next frame playback), causing it to disregard the timestamp value for the sake of video playback (however, note that the video timestamp is still used for audio synchronization if audio is present on the source as well). This is partly a convenience feature, and partly a necessity for certain plugins (such as the linux v4l plugin) where timestamp information for the video frames can sometimes be unreliable.
-
由 jp9000 提交于
-
- 10 10月, 2014 1 次提交
-
-
由 fryshorts 提交于
Due to a small error in the timestamp smoothing code the timestamp of audio packages that were too early was always set to the next expected timestamp, even if the difference was bigger than the smoothing threshold. This would cause obs to simply append all audio data to the buffer even if the real timestamp was way smaller than the next that was expected. This should reduce corruption problems with for example the pulseaudio plugin, which resends data under certain conditions.
-
- 01 10月, 2014 2 次提交
- 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.
-
- 20 9月, 2014 1 次提交
-
-
由 jp9000 提交于
-
- 16 9月, 2014 1 次提交
-
-
由 kc5nra 提交于
-
- 13 9月, 2014 2 次提交
-
-
由 jp9000 提交于
This helps ensure that an asynchronous video source is played as close to its framerate as possible, reduces the risk of duplication as much as possible, and helps to ensure that playback is as smooth as possible.
-
由 jp9000 提交于
This prevents multiple needless calls to obs_source_get_frame and other functions. If the texture has already been processed, then just render it as-is in any subsequent calls to obs_source_video_render.
-
- 05 9月, 2014 1 次提交
-
-
由 jp9000 提交于
This is actually unnecessary now that there's a hard limit on the maximum offset in which audio can be inserted. This also assumes too much about the audio; it assumes audio is always on, where as with some devices (such as the elgato) audio is not on until the stream starts, and when the video has already incremented the counter.
-
- 31 8月, 2014 1 次提交
-
-
由 jp9000 提交于
-
- 29 8月, 2014 1 次提交
-
-
由 jp9000 提交于
If the audio didn't start at the 0 timestamp, it would misinterpret it as a timestamp jump because obs_source::next_audio_ts_min is set to 0 on creation. Timestamp starting values should be allowed to start at any arbitrary value.
-
- 10 8月, 2014 4 次提交
-
-
由 jp9000 提交于
Summary: - Prefix all graphics subsystem names with gs_ or GS_ - Unsquish funciton names (for example _setfloat to _set_float) - Changed create functions to be more consistent with the rest of the API elsewhere. For exmaple, instead of gs_create_texture/gs_texture_destroy, it's now gs_texture_create/gs_texture_destroy - Renamed gs_stencil_op enum to gs_stencil_op_type From: To: ----------------------------------------------------------- tvertarray gs_tvertarray vb_data gs_vb_data vbdata_create gs_vbdata_create vbdata_destroy gs_vbdata_destroy shader_param gs_shader_param gs_effect gs_effect effect_technique gs_effect_technique effect_pass gs_effect_pass effect_param gs_effect_param texture_t gs_texture_t stagesurf_t gs_stagesurf_t zstencil_t gs_zstencil_t vertbuffer_t gs_vertbuffer_t indexbuffer_t gs_indexbuffer_t samplerstate_t gs_samplerstate_t swapchain_t gs_swapchain_t texrender_t gs_texrender_t shader_t gs_shader_t sparam_t gs_sparam_t effect_t gs_effect_t technique_t gs_technique_t eparam_t gs_eparam_t device_t gs_device_t graphics_t graphics_t shader_param_type gs_shader_param_type SHADER_PARAM_UNKNOWN GS_SHADER_PARAM_UNKNOWN SHADER_PARAM_BOOL GS_SHADER_PARAM_BOOL SHADER_PARAM_FLOAT GS_SHADER_PARAM_FLOAT SHADER_PARAM_INT GS_SHADER_PARAM_INT SHADER_PARAM_STRING GS_SHADER_PARAM_STRING SHADER_PARAM_VEC2 GS_SHADER_PARAM_VEC2 SHADER_PARAM_VEC3 GS_SHADER_PARAM_VEC3 SHADER_PARAM_VEC4 GS_SHADER_PARAM_VEC4 SHADER_PARAM_MATRIX4X4 GS_SHADER_PARAM_MATRIX4X4 SHADER_PARAM_TEXTURE GS_SHADER_PARAM_TEXTURE shader_param_info gs_shader_param_info shader_type gs_shader_type SHADER_VERTEX GS_SHADER_VERTEX SHADER_PIXEL GS_SHADER_PIXEL shader_destroy gs_shader_destroy shader_numparams gs_shader_get_num_params shader_getparambyidx gs_shader_get_param_by_idx shader_getparambyname gs_shader_get_param_by_name shader_getviewprojmatrix gs_shader_get_viewproj_matrix shader_getworldmatrix gs_shader_get_world_matrix shader_getparaminfo gs_shader_get_param_info shader_setbool gs_shader_set_bool shader_setfloat gs_shader_set_float shader_setint gs_shader_set_int shader_setmatrix3 gs_shader_setmatrix3 shader_setmatrix4 gs_shader_set_matrix4 shader_setvec2 gs_shader_set_vec2 shader_setvec3 gs_shader_set_vec3 shader_setvec4 gs_shader_set_vec4 shader_settexture gs_shader_set_texture shader_setval gs_shader_set_val shader_setdefault gs_shader_set_default effect_property_type gs_effect_property_type EFFECT_NONE GS_EFFECT_NONE EFFECT_BOOL GS_EFFECT_BOOL EFFECT_FLOAT GS_EFFECT_FLOAT EFFECT_COLOR GS_EFFECT_COLOR EFFECT_TEXTURE GS_EFFECT_TEXTURE effect_param_info gs_effect_param_info effect_destroy gs_effect_destroy effect_gettechnique gs_effect_get_technique technique_begin gs_technique_begin technique_end gs_technique_end technique_beginpass gs_technique_begin_pass technique_beginpassbyname gs_technique_begin_pass_by_name technique_endpass gs_technique_end_pass effect_numparams gs_effect_get_num_params effect_getparambyidx gs_effect_get_param_by_idx effect_getparambyname gs_effect_get_param_by_name effect_updateparams gs_effect_update_params effect_getviewprojmatrix gs_effect_get_viewproj_matrix effect_getworldmatrix gs_effect_get_world_matrix effect_getparaminfo gs_effect_get_param_info effect_setbool gs_effect_set_bool effect_setfloat gs_effect_set_float effect_setint gs_effect_set_int effect_setmatrix4 gs_effect_set_matrix4 effect_setvec2 gs_effect_set_vec2 effect_setvec3 gs_effect_set_vec3 effect_setvec4 gs_effect_set_vec4 effect_settexture gs_effect_set_texture effect_setval gs_effect_set_val effect_setdefault gs_effect_set_default texrender_create gs_texrender_create texrender_destroy gs_texrender_destroy texrender_begin gs_texrender_begin texrender_end gs_texrender_end texrender_reset gs_texrender_reset texrender_gettexture gs_texrender_get_texture GS_BUILDMIPMAPS GS_BUILD_MIPMAPS GS_RENDERTARGET GS_RENDER_TARGET gs_device_name gs_get_device_name gs_device_type gs_get_device_type gs_entercontext gs_enter_context gs_leavecontext gs_leave_context gs_getcontext gs_get_context gs_renderstart gs_render_start gs_renderstop gs_render_stop gs_rendersave gs_render_save gs_getinput gs_get_input gs_geteffect gs_get_effect gs_create_effect_from_file gs_effect_create_from_file gs_create_effect gs_effect_create gs_create_vertexshader_from_file gs_vertexshader_create_from_file gs_create_pixelshader_from_file gs_pixelshader_create_from_file gs_create_texture_from_file gs_texture_create_from_file gs_resetviewport gs_reset_viewport gs_set2dmode gs_set_2d_mode gs_set3dmode gs_set_3d_mode gs_create_swapchain gs_swapchain_create gs_getsize gs_get_size gs_getwidth gs_get_width gs_getheight gs_get_height gs_create_texture gs_texture_create gs_create_cubetexture gs_cubetexture_create gs_create_volumetexture gs_voltexture_create gs_create_zstencil gs_zstencil_create gs_create_stagesurface gs_stagesurface_create gs_create_samplerstate gs_samplerstate_create gs_create_vertexshader gs_vertexshader_create gs_create_pixelshader gs_pixelshader_create gs_create_vertexbuffer gs_vertexbuffer_create gs_create_indexbuffer gs_indexbuffer_create gs_gettexturetype gs_get_texture_type gs_load_defaultsamplerstate gs_load_default_samplerstate gs_getvertexshader gs_get_vertex_shader gs_getpixelshader gs_get_pixel_shader gs_getrendertarget gs_get_render_target gs_getzstenciltarget gs_get_zstencil_target gs_setrendertarget gs_set_render_target gs_setcuberendertarget gs_set_cube_render_target gs_beginscene gs_begin_scene gs_draw gs_draw gs_endscene gs_end_scene gs_setcullmode gs_set_cull_mode gs_getcullmode gs_get_cull_mode gs_enable_depthtest gs_enable_depth_test gs_enable_stenciltest gs_enable_stencil_test gs_enable_stencilwrite gs_enable_stencil_write gs_blendfunction gs_blend_function gs_depthfunction gs_depth_function gs_stencilfunction gs_stencil_function gs_stencilop gs_stencil_op gs_setviewport gs_set_viewport gs_getviewport gs_get_viewport gs_setscissorrect gs_set_scissor_rect gs_create_texture_from_iosurface gs_texture_create_from_iosurface gs_create_gdi_texture gs_texture_create_gdi gs_is_compressed_format gs_is_compressed_format gs_num_total_levels gs_get_total_levels texture_setimage gs_texture_set_image cubetexture_setimage gs_cubetexture_set_image swapchain_destroy gs_swapchain_destroy texture_destroy gs_texture_destroy texture_getwidth gs_texture_get_width texture_getheight gs_texture_get_height texture_getcolorformat gs_texture_get_color_format texture_map gs_texture_map texture_unmap gs_texture_unmap texture_isrect gs_texture_is_rect texture_getobj gs_texture_get_obj cubetexture_destroy gs_cubetexture_destroy cubetexture_getsize gs_cubetexture_get_size cubetexture_getcolorformat gs_cubetexture_get_color_format volumetexture_destroy gs_voltexture_destroy volumetexture_getwidth gs_voltexture_get_width volumetexture_getheight gs_voltexture_get_height volumetexture_getdepth gs_voltexture_getdepth volumetexture_getcolorformat gs_voltexture_get_color_format stagesurface_destroy gs_stagesurface_destroy stagesurface_getwidth gs_stagesurface_get_width stagesurface_getheight gs_stagesurface_get_height stagesurface_getcolorformat gs_stagesurface_get_color_format stagesurface_map gs_stagesurface_map stagesurface_unmap gs_stagesurface_unmap zstencil_destroy gs_zstencil_destroy samplerstate_destroy gs_samplerstate_destroy vertexbuffer_destroy gs_vertexbuffer_destroy vertexbuffer_flush gs_vertexbuffer_flush vertexbuffer_getdata gs_vertexbuffer_get_data indexbuffer_destroy gs_indexbuffer_destroy indexbuffer_flush gs_indexbuffer_flush indexbuffer_getdata gs_indexbuffer_get_data indexbuffer_numindices gs_indexbuffer_get_num_indices indexbuffer_gettype gs_indexbuffer_get_type texture_rebind_iosurface gs_texture_rebind_iosurface texture_get_dc gs_texture_get_dc texture_release_dc gs_texture_release_dc
-
由 jp9000 提交于
Renamed: To: ------------------------------------------------- calldata_getdata calldata_get_data calldata_getint calldata_get_int calldata_getfloat calldata_get_float calldata_getbool calldata_get_bool calldata_getptr calldata_get_ptr calldata_getstring calldata_get_string calldata_setdata calldata_set_data calldata_setint calldata_set_int calldata_setfloat calldata_set_float calldata_setbool calldata_set_bool calldata_setptr calldata_set_ptr calldata_setstring calldata_set_string
-
由 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
-