Commit Graph

1455 Commits (83853a3e340bd3861ed44bc0a2bda18b21a3111c)

Author SHA1 Message Date
Jim 83853a3e34 Merge pull request #254 from BtbN/cmake-fix
CMake fixes for iconv and Freetype finding
2014-08-21 08:57:19 -07:00
BtbN 5101ca84f6 Fix HINTS/PATHS in Findv4l2 module 2014-08-21 17:37:16 +02:00
BtbN 2bf8a7dce9 Include FindPackageHandleStandardArgs.cmake in every find module using it
It just worked so far because FindCXX11 happend to include it
already, and it also happend to be the first FindModule used.
2014-08-21 16:38:49 +02:00
BtbN 5ec0d2ded4 Fix FindFreetype naming and find logic
Freetype is quite complicated, copied most of the logic from the
original FindFreetype module.
2014-08-21 16:36:21 +02:00
BtbN 997b4f9161 Fix FindIconv naming consistency 2014-08-21 15:28:44 +02:00
Jim ffe74f5903 Merge pull request #252 from palana/mac-window-capture
Add window capture options for OSX
2014-08-21 05:52:51 -07:00
jp9000 4654eca6b8 Remove GL shader debug text 2014-08-21 03:04:20 -07:00
jp9000 cf1b106a26 Fix null pointer dereference
When looking up translated font names within font files, it was not
checking for null on the 'charset' variable (the translation character
set wasn't added/availble).
2014-08-20 16:46:50 -07:00
Jim 911c885b3b Merge pull request #253 from drekryan/patch-1
Remove Justin.tv references/service
2014-08-20 16:13:07 -07:00
Derrick Lambert 1b4d8221dd Remove Justin.tv references/service 2014-08-20 18:41:18 -04:00
jp9000 b54ab482b5 Fix freetype cmake module
On fedora, the freetype cmake module would not find the correct
location.  This is because it wasn't using the pkg-cofig include
directory, which is different from the main ft2build.h header directory
(which is /usr/include).

This modification may be a good thing to do on all the cmake packages,
actually.  Currently, they all just search for the location of a
specific header, and ignore the pkg-config includes if they find it in
specific hint locations.
2014-08-20 15:17:12 -07:00
jp9000 5291760cf8 Fix gs_matrix_* issues
Multiplication of the matricies was being done in the wrong direction.
This caused source transformations to come out looking incorrect, for
example the linux-xshm source's cursor would not be drawn correctly or
in the right position if the source was moved/scaled/rotated.  The
problem just turned out to be that the gs_matrix_* functions were
multiplying in the wrong direction.  Reverse the direction of
multiplication, and the problem is solved.
2014-08-20 13:04:13 -07:00
jp9000 8d1d1ddd14 Add reverse matrix multiply functions
The *_i functions multiply the value by the matrix instead of the other
way around, then store the result.
2014-08-20 12:34:44 -07:00
Palana f8ed37dec4 Add Window Capture to mac-capture plugin 2014-08-20 00:50:18 +02:00
Palana 7b6c4a130a Add Display Capture crop modes 2014-08-20 00:50:17 +02:00
Palana bc64fa97a0 Add CoreGraphics window utilities 2014-08-20 00:42:56 +02:00
Jim cf00fc1986 Merge pull request #249 from BtbN/cmake-fix
Fix double invocation of install_obs_plugin in every single plugin
2014-08-19 05:33:01 -07:00
BtbN 02725acdd4 Fix double invocation of install_obs_plugin in every single plugin 2014-08-19 14:24:59 +02:00
Jim 7eee45fb7f Merge pull request #248 from benklett/cmake-fixes
Fix the cmake code for text-freetype2
2014-08-19 05:01:42 -07:00
benklett f2723aa11e Fix the cmake code for text-freetype2
it is now possible to build text-freetype2 on linux if you comment out a return() otherwise there would have been an error
Also i made the word iconv in find_package lower case, to match the APPLE cmake code
2014-08-19 13:57:22 +02:00
Jim a0897b0adf Merge pull request #243 from jp9000/font-test-mac
Merge freetype text plugin
2014-08-19 03:01:10 -07:00
jp9000 7f0ae838d7 Add system font lookup for mac/windows
This changes the font plugin from using a font file to using a specific
installed system font, which is searched for on each specific system and
associated with the font file.  It now uses a font property instead of a
path property, and font size has been removed because the font property
now handles that.

When the module is first loaded, it will build up a list of system fonts
in order to be usable by Freetype.  It was quite painful to program this
because font files can contain multiple localized versions of their face
names, and then there was the issue where windows likes to mangle
custom style types to the font name.  Regardless, it all seems to have
worked out pretty well.

Minor issues:
- Truetype/Opentype fonts sometimes do not automatically have
  italic and/or bold styles available, it seems that the system applies
  transformations manually in those cases.  We don't do this yet,
  however, so right now a user might select a font with italic/bold
  only to discover that italic/bold doesn't always work.  Not entirely
  sure what to do about this yet.  There's probably a freetype function
  to do something like that somehow,

This also requires that iconv be used for non-windows systems to be able
to look up localized font names within font files.  Windows will use
the win32 API and code page IDs to translate font names.
2014-08-19 02:11:37 -07:00
Jim b03036734a Merge pull request #247 from fryshorts/xshm-input
Fix cursor position in xshm plugin
2014-08-18 13:09:30 -07:00
fryshorts 8f206def32 Fix cursor position in xshm plugin
By premultiplying the cursor translation the cursor is positioned
relative, and thus correctly, when the source has transformations
applied to it.
2014-08-18 20:19:26 +02:00
Jim 6e9b70b046 Merge pull request #240 from jkoan/master
Fix Remove Dialog
2014-08-18 00:23:00 -07:00
jp9000 1a5eca34db Add font property to properties widget
Displays the full name of the font in the font's designated settings,
with a "Select Font" button which brings up a font chooser dialog.
2014-08-18 00:14:02 -07:00
jp9000 0bf9736ddd Add font property
Adds the following function:
------------------------------
obs_properties_add_font

This function creates a 'font' property to allow selection of a system
font.  Implementation by the UI should treat the setting as an obs_data
sub-object with four sub-items:
 - face:   face name (string)
 - style:  style name (string)
 - size:   size (integer)
 - flags:  font flags (integer)

'flags' can be any combination of the following values:
 - OBS_FONT_BOLD
 - OBS_FONT_ITALIC
 - OBS_FONT_UNDERLINE
 - OBS_FONT_STRIKEOUT
2014-08-18 00:14:02 -07:00
paibox e1611b431c Merge Freetype text plugin 2014-08-18 00:14:02 -07:00
Jkoan cc5884c136 Fix Remove Dialog
Remove failed test and add other Messagebox to correct Text with Language support

Add Title again -,-
2014-08-17 14:40:03 +02:00
Jim 83fe23e168 Merge pull request #242 from Gol-D-Ace/master
Update crowdin url for translator instructions
2014-08-16 01:00:20 -07:00
Gol-D-Ace 9078ee72df Update crowdin url for translator instructions
crowdin moved from .net to .com
2014-08-16 06:52:18 +02:00
Jim 4d02563d2f Merge pull request #235 from Socapex/master
Alert user when using existing source name.
2014-08-15 15:09:05 -07:00
Jim 69b9e722b8 Merge pull request #234 from fryshorts/v4l2-input
Make input selectable in v4l2 plugin.
2014-08-14 00:24:48 -07:00
Socapex 6597206d93 Alert user when using existing source name. 2014-08-12 17:07:59 -04:00
jp9000 38d2cf591d Use the correct logging name for FLV outputs 2014-08-12 01:08:23 -07:00
jp9000 6680d3230a Improve FLV output logging
Log when the FLV file output has started and when it has finished.
2014-08-12 01:00:12 -07:00
jp9000 a8d4774eef Fix D3D11 render target blending issues
The alpha source and destination blend values were always being set to
one and zero, when they should have been set to the same as the color
values.  This caused the alpha of the source texture to always overwrite
the alpha of the destination texture, rather than apply the blend
function upon it.  Needless to say that it seriously screwed up the
render target if you rendered something with alpha on it.

Thanks to paibox for pointing this issue out and yelling at me to fix
it.  I apologize for not getting to this sooner.
2014-08-11 17:40:35 -07:00
fryshorts cd6d2eb9b6 Fix crash in v4l2 plugin.
This adds checks to make sure munmap and bfree are only called
when there was actually memory mapped and allocated.
2014-08-11 23:35:43 +02:00
fryshorts d73d2b22f8 Fix infinite loop in v4l2 plugin.
When initialization of the device fails the plugin may hang
trying to join a non-existing pthread.
2014-08-11 23:35:43 +02:00
fryshorts 71200051b0 Move some functions to separate file for v4l2 plugin.
This moves some functions that are generic to a separate source
file. While doing so the api to those functions was improved to
be more generic and not depend on knowledge about the internal
structure of the plugin.
2014-08-11 23:35:43 +02:00
fryshorts 7e4972e747 Small cleanups in v4l2 plugin. 2014-08-11 23:35:43 +02:00
fryshorts 07d4c5f037 Make device inputs selectable for v4l2 plugin.
This adds an additional property to the plugin to select
an input if the device has multiple ones.
2014-08-11 23:35:43 +02:00
fryshorts 3031cb4b4c Minor code refactoring in v4l2 plugin. 2014-08-11 23:00:57 +02:00
jp9000 f75a1ebf63 Plugins: Use new encoder/output size functions 2014-08-10 17:10:20 -07:00
jp9000 a0f679bc40 Add API functions for output/encoder scaling
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.
2014-08-10 16:50:44 -07:00
jp9000 f36f82b036 video-io: Add function to just get video format 2014-08-10 16:39:36 -07:00
jp9000 72fbdc7eaa Fix bug with automatic video scaling
This is sort of hard to explain:  the scale_video_output function was
overwriting the current frame.  If scaling was disabled, it would do
nothing, and return success, and all would be well.  If it was enabled,
it would then call the scaler, and then replace the contents of the
'data' function parameter with the scaled frame data.  The problem with
this is that I was passing video_output::cur_frame directly, which
overwrites its previous value with the scaled frame data.  Then if
cur_frame was not updated on time, it would end up trying to scale the
previously scaled image, if that makes sense.  it would call the video
scaler with the same from for both the source and destination.

So the simple fix was to simply use a local variable and pass that in as
a parameter to prevent this bug from occurring.
2014-08-10 12:49:44 -07:00
jp9000 7608f77e8b (API Change) Rename autoselect/default functions
For the sake of consistency, renamed these two functions to include
_value at the end so they are consistent.

Renamed:                         To:
-------------------------------------------------------
obs_data_has_default             obs_data_has_default_value
obs_data_has_autoselect          obs_data_has_autoselect_value
obs_data_item_has_default        obs_data_item_has_default_value
obs_data_item_has_autoselect     obs_data_item_has_autoselect_value
2014-08-09 14:36:38 -07:00
jp9000 5780f3f177 (API Change) Improve graphics API consistency
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
2014-08-09 11:57:38 -07:00
jp9000 50ec8b0d55 (API Change) libobs/callback: Unsquish names
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
2014-08-09 11:57:38 -07:00