summaryrefslogtreecommitdiff
path: root/src/xine-engine/osd.c
AgeCommit message (Collapse)Author
2014-04-19Fix memset() sizePetri Hintukainen
2014-03-10Silence compiler warnings on register_enum () arg #4.Torsten Jager
Making them all "const char * const *" did work too (even with Kaffeine build/run), but that would be an API change.
2013-09-13Copyright year update by hg log infoTorsten Jager
script execution time: 55"
2012-02-01Merge from 1.1.Darren Salt
2012-01-30Compile failure in osd.c with sys-libs/zlib-1.2.6Ulrich Müller
2011-12-21Merge from 1.1.Darren Salt
--HG-- rename : src/libdts/xine_dts_decoder.c => src/audio_dec/xine_dts_decoder.c rename : src/libxineadec/xine_lpcm_decoder.c => src/audio_dec/xine_lpcm_decoder.c rename : src/combined/decoder_flac.c => src/combined/flac_decoder.c rename : src/combined/demux_flac.c => src/combined/flac_demuxer.c rename : src/libsputext/xine_sputext_decoder.c => src/spu_dec/sputext_decoder.c
2011-12-16Fixed osd_hide() return valuePetri Hintukainen
--HG-- branch : point-release
2011-10-17Merge from 1.1Petri Hintukainen
2011-10-10Fixed asprintf usagePetri Hintukainen
2011-02-06Fix argb_layer handling in xine-libs OSD stack.Reinhard Nißl
xine-libs OSD stack is event driven and some memory blocks are not copied but responsibility to free the memory moves to different layers of the OSD stack. When argb_layer was introduced, this behavior was not taken into account and as such it is likely that for example osd_free_object() frees the argb_layer while vdpau_overlay_* functions still access the memory. Passing responsibility for the argb_layer is not that easy as it seems as the design goal of the argb_layer was to not duplicate any memory of the argb_buffer which all other OSD functions usually do. To solve this issue, argb_layer_t will be turned into a managed data structure by introducing a ref_count member. ref_count increases as more layers of the OSD stack hold a reference to that memory block, and it decreases when they are no longer interested in it. When ref_count reaches zero the memory block is freed automatically. To deal with ref counting, set_argb_layer_ptr() has been introduced. Some functions of the OSD layers had to be modified to deal with reference tracking. For convinience, osd_free_object() should clear the argb_buffer pointer so that the buffer may be freed safely after returning.
2010-01-06Update to libxdg-basedir 1.0.2; adapt accordingly, and default to external.Darren Salt
2009-11-30Trim trailing space & reduce space+tab.Darren Salt
2009-06-11Provide framework to define a video output area within the OSD area.Reinhard Nißl
The supplied functions and constants allow to define a video output area (called video window) within the OSD area to show for example a small preview of the current channel in the top right corner while zapping through the channel list displayed as OSD. A VDPAU enabled xine-lib implements VO_CAP_VIDEO_WINDOW_OVERLAY already.
2009-01-11Merge from 1.1.Darren Salt
--HG-- rename : src/libmpeg2/motion_comp.c => src/video_dec/libmpeg2/motion_comp.c
2009-01-02Extend OSD framework by ARGB layer and custom extent specification.Reinhard Nißl
The ARGB layer is based on the idea and scratch implementation of Julian Scheel. Each OSD object may be associated with a client ARGB buffer which holds the content of the OSD, hence there is no need to copy the buffer content. So far an OSD's reference coordinate system was defined by coded video resolution. By specifing an OSD's extent, capable hardware or software implementations my scale an arbitrarily sized OSD to the video output area while blending. Additional constants have been defined to allow vo_drivers to report their capabilities and to allow clients to check whether an OSD implementation supports these new features.
2008-11-03Free up resources when we finish with a Freetype font.Maximilian Schwerin
2009-11-30Trim trailing space & reduce space+tab.Darren Salt
2008-07-17Merge from 1.1.Darren Salt
--HG-- rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : src/demuxers/demux_nsf.c => src/combined/nsf_demuxer.c rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c rename : src/libspucmml/xine_cmml_decoder.c => src/spu_dec/cmml_decoder.c rename : src/libspudec/xine_spu_decoder.c => src/spu_dec/spu_decoder.c rename : src/libspudvb/xine_spudvb_decoder.c => src/spu_dec/spudvb_decoder.c rename : src/libsputext/xine_sputext_decoder.c => src/spu_dec/sputext_decoder.c rename : src/libsputext/demux_sputext.c => src/spu_dec/sputext_demuxer.c
2008-07-04Use calloc to allocate the area for the OSD.Diego 'Flameeyes' Pettenò
--HG-- extra : transplant_source : %99%9B%D5%B3Ro%87%BFV%E9%2BY%AA%83QE/%CD%5D%ED
2008-05-29Merge from 1.1.Darren Salt
--HG-- rename : src/xine-utils/array.h => include/xine/array.h rename : src/xine-utils/attributes.h => include/xine/attributes.h rename : src/xine-engine/audio_out.h => include/xine/audio_out.h rename : src/xine-engine/broadcaster.h => include/xine/broadcaster.h rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : src/xine-engine/configfile.h => include/xine/configfile.h rename : src/xine-utils/list.h => include/xine/list.h rename : src/xine-engine/metronom.h => include/xine/metronom.h rename : src/xine-engine/osd.h => include/xine/osd.h rename : src/xine-utils/pool.h => include/xine/pool.h rename : src/xine-engine/refcounter.h => include/xine/refcounter.h rename : src/xine-utils/ring_buffer.h => include/xine/ring_buffer.h rename : src/xine-engine/scratch.h => include/xine/scratch.h rename : src/xine-utils/sorted_array.h => include/xine/sorted_array.h rename : src/xine-engine/video_out.h => include/xine/video_out.h rename : src/xine-engine/video_overlay.h => include/xine/video_overlay.h rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h rename : src/xine-utils/xineutils.h => include/xine/xineutils.h rename : src/libspucc/cc_decoder.c => src/spu_dec/cc_decoder.c
2008-05-23Remove MIN/MAX macro definitions on unit.Diego 'Flameeyes' Pettenò
Now that the macro are either imported from the system or defined by configure. don't define them in every source file.
2008-05-23Mark initialisation functions with malloc attribute.Diego 'Flameeyes' Pettenò
All the initialisation functions returning a new object instance that was allocated through malloc() or calloc() can get the malloc attribute so that the compiler can optimise their call.
2008-05-23Merge from 1.1. VDR needs to be updated.Diego 'Flameeyes' Pettenò
--HG-- rename : src/liba52/parse.c => contrib/a52dec/parse.c rename : include/xine.h.in => include/xine.h rename : src/xine-engine/alphablend.h => include/xine/alphablend.h rename : src/xine-utils/attributes.h => include/xine/attributes.h rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : src/input/input_plugin.h => include/xine/input_plugin.h rename : src/xine-utils/xineutils.h => include/xine/xineutils.h rename : src/libxineadec/fooaudio.c => src/audio_dec/fooaudio.c rename : src/libxineadec/gsm610.c => src/audio_dec/gsm610.c rename : src/liba52/xine_a52_decoder.c => src/audio_dec/xine_a52_decoder.c rename : src/libdts/xine_dts_decoder.c => src/audio_dec/xine_dts_decoder.c rename : src/libfaad/xine_faad_decoder.c => src/audio_dec/xine_faad_decoder.c rename : src/libxineadec/xine_lpcm_decoder.c => src/audio_dec/xine_lpcm_decoder.c rename : src/libmad/xine_mad_decoder.c => src/audio_dec/xine_mad_decoder.c rename : src/libmusepack/xine_musepack_decoder.c => src/audio_dec/xine_musepack_decoder.c rename : src/combined/decoder_flac.c => src/combined/flac_decoder.c rename : src/combined/demux_flac.c => src/combined/flac_demuxer.c rename : src/libxineadec/nsf.c => src/combined/nsf_decoder.c rename : src/demuxers/demux_nsf.c => src/combined/nsf_demuxer.c rename : src/combined/combined_wavpack.h => src/combined/wavpack_combined.h rename : src/combined/decoder_wavpack.c => src/combined/wavpack_decoder.c rename : src/combined/demux_wavpack.c => src/combined/wavpack_demuxer.c rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c rename : src/libxineadec/xine_speex_decoder.c => src/combined/xine_speex_decoder.c rename : src/libxinevdec/xine_theora_decoder.c => src/combined/xine_theora_decoder.c rename : src/libxineadec/xine_vorbis_decoder.c => src/combined/xine_vorbis_decoder.c rename : src/libspucc/cc_decoder.c => src/spu_dec/cc_decoder.c rename : src/libspucmml/xine_cmml_decoder.c => src/spu_dec/cmml_decoder.c rename : src/libspudec/xine_spu_decoder.c => src/spu_dec/spu_decoder.c rename : src/libspudec/spu.c => src/spu_dec/spudec.c rename : src/libspudvb/xine_spudvb_decoder.c => src/spu_dec/spudvb_decoder.c rename : src/libsputext/xine_sputext_decoder.c => src/spu_dec/sputext_decoder.c rename : src/libsputext/demux_sputext.c => src/spu_dec/sputext_demuxer.c rename : src/libspucc/xine_cc_decoder.c => src/spu_dec/xine_cc_decoder.c rename : src/libxinevdec/bitplane.c => src/video_dec/bitplane.c rename : src/libxinevdec/foovideo.c => src/video_dec/foovideo.c rename : src/libxinevdec/gdkpixbuf.c => src/video_dec/gdkpixbuf.c rename : src/libxinevdec/image.c => src/video_dec/image.c rename : src/libmpeg2/xine_mpeg2_decoder.c => src/video_dec/libmpeg2/xine_mpeg2_decoder.c rename : src/libxinevdec/rgb.c => src/video_dec/rgb.c rename : src/libxinevdec/yuv.c => src/video_dec/yuv.c
2008-05-21Free up resources when we finish with Freetype.Darren Salt
2008-05-07Use asprintf() rather than malloc() + sprintf().Diego 'Flameeyes' Pettenò
Using asprintf() instead of malloc() + sprintf() reduces the lines of code in xine-lib (moving the allocation to the C library or asprintf replacement), makes it safer to access the string and can also improve performance whenever the value returned by a function was used as parameter, as before it had to run the function twice in almost every case (once for strlen(), once for sprintf()).
2008-05-07xine_xmalloc() deprecation: replace its use with static and non-zero size.Diego 'Flameeyes' Pettenò
The xine_xmalloc() function is going to be deprecated, as its behaviour is rarely needed as such, and it's thus misused. With this, almost all uses of xine_xmalloc() with static size (for instance the value returned by sizeof()) or with a size that is guaranteed not to be zero (like strlen()+1) are replaced with calls to either calloc(1, ...) or malloc(). malloc() is used whenever the allocated memory is going to be immediately overwritten, while calloc() is used in every other case, as it sets the whole memory area to zero. --HG-- extra : transplant_source : %8F%98%EC%02%1E%83%F0s%06X%83C%205Y%80%B12%CC%E1
2007-12-22Merge -headers-reshuffle branch into main.Diego 'Flameeyes' Pettenò
--HG-- rename : src/xine-engine/osd.h => include/xine/osd.h
2007-12-19Move code out of osd.h that was present only with __OSD_C__ defined.Diego 'Flameeyes' Pettenò
2007-12-19Update all the code to the new headers layout.Diego 'Flameeyes' Pettenò
2007-11-09Merge FSF address changes from 1.1 branch.Diego 'Flameeyes' Pettenò
--HG-- rename : src/combined/decoder_flac.c => src/combined/flac_decoder.c rename : src/combined/demux_flac.c => src/combined/flac_demuxer.c rename : src/libxineadec/nsf.c => src/combined/nsf_decoder.c rename : src/demuxers/demux_nsf.c => src/combined/nsf_demuxer.c rename : src/combined/combined_wavpack.c => src/combined/wavpack_combined.c rename : src/combined/combined_wavpack.h => src/combined/wavpack_combined.h rename : src/combined/decoder_wavpack.c => src/combined/wavpack_decoder.c rename : src/combined/demux_wavpack.c => src/combined/wavpack_demuxer.c rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c rename : src/libxineadec/xine_speex_decoder.c => src/combined/xine_speex_decoder.c rename : src/libxinevdec/xine_theora_decoder.c => src/combined/xine_theora_decoder.c rename : src/libxineadec/xine_vorbis_decoder.c => src/combined/xine_vorbis_decoder.c rename : src/liba52/xine_a52_decoder.c => src/libxineadec/xine_a52_decoder.c rename : src/libdts/xine_dts_decoder.c => src/libxineadec/xine_dts_decoder.c rename : src/libfaad/xine_faad_decoder.c => src/libxineadec/xine_faad_decoder.c rename : src/libmusepack/xine_musepack_decoder.c => src/libxineadec/xine_musepack_decoder.c
2007-11-09Update FSF address on non-contributed code and COPYING files.Diego 'Flameeyes' Pettenò
For contributed code, leave whatever the version we last synced for is using to make simpler future syncs.
2007-07-13Merge from 1.1.Darren Salt
2007-07-12Remove realloc from osd.c to prevent memory leak due to fragmentationSimon Farnsworth
show() in osd.c uses realloc in an effort to minimise the amount of memory actually used for rle objects. In practice, this caused xine to fragment memory, and gradually use more and more RAM (measured over a period of 24 to 72 hours). Change osd.c to allocate the maximum amount of memory it could need; because it touches this memory in a linear fashion, lazy page allocation will ensure that most of the memory used is needed. Further, because this makes the per-drawing allocations the same size, it avoids virtual address space fragmentation.
2007-06-14Merge from 1.1 branch.Diego 'Flameeyes' Pettenò
2007-06-13Fix parameter type.Albert Lee
2007-04-14Search also in user's XDG_DATA_HOME.Diego 'Flameeyes' Pettenò
2007-04-13Check inside the fonts/ directory inside the package's XDG_DATA_DIR, rather ↵Diego 'Flameeyes' Pettenò
than in the root of it.
2007-04-13Also preload bitmap fonts on XDG directories.Diego 'Flameeyes' Pettenò
With this commit, also fix the previous mistakes in the iteration.
2007-04-13Search for fonts to render with FreeType2 on XDG Data directories.Diego 'Flameeyes' Pettenò
With this change, when rendering a font through FreeType2 (and not using FontConfig) the directories looked up are the ones defined in XDG_DATA_DIRS, right after XDG_DATA_HOME; this way the user can decide to have fonts data in a different place than its home directory. This also splits up the lookup for fontconfig and non-fontconfig cases in two different functions, to avoid gotos and labels.
2007-04-04Reorder and pack the structures that are defined inside compilation units ↵nopadding_no_abi_changeDiego 'Flameeyes' Pettenò
instead of headers (and thus are not part of public ABI).
2007-03-03Fix a build error, introduced in the previous commit, which bites when buildingDarren Salt
without Freetype support. CVS patchset: 8642 CVS date: 2007/03/03 22:59:37
2007-03-03Free the FreeType object when freeing the OSD object, should solve a ↵Diego 'Flameeyes' Pettenò
possible memory leak. CVS patchset: 8641 CVS date: 2007/03/03 14:12:50
2007-02-20Fix a lot of format warnings in lprintf calls (mostly %ldd -> %"PRId64").Diego 'Flameeyes' Pettenò
CVS patchset: 8608 CVS date: 2007/02/20 00:34:55
2006-12-14Added configure option --enable-antialing (disabled by default becauseClaudio Ciccani
RLE encoded antialiased fonts don't look good). CVS patchset: 8415 CVS date: 2006/12/14 10:14:48
2006-09-29Improve FreeType2 rendering: do not disable hinting.Diego 'Flameeyes' Pettenò
CVS patchset: 8323 CVS date: 2006/09/29 20:16:44
2006-09-29Add an optional dependency over fontconfig, so that if present it is used to ↵Diego 'Flameeyes' Pettenò
identify which font to load for OSD and subtitles. This allows to use truetype fonts by specifying their friendly name and just that. Also prefer FreeType2 loaded fonts to bitmap fonts. CVS patchset: 8321 CVS date: 2006/09/29 18:36:52
2006-09-12Fixed iconv warnings on FreeBSD, fixed build w/o iconv but require it as ↵František Dvořák
default. CVS patchset: 8223 CVS date: 2006/09/12 21:24:18
2006-04-10Fixed incorrect rectangle clipping.Claudio Ciccani
CVS patchset: 7967 CVS date: 2006/04/10 17:42:14
2006-04-05Fixed primitive clipping.Claudio Ciccani
Also negative coordinates are legal now. CVS patchset: 7958 CVS date: 2006/04/05 12:44:32
2006-03-27osd_line() and osd_filled_rect() should clip the coordinates to prevent ↵Claudio Ciccani
buffer overflows. CVS patchset: 7954 CVS date: 2006/03/27 10:43:11