summaryrefslogtreecommitdiff
path: root/src/xine-engine/xine.c
AgeCommit message (Collapse)Author
2011-10-10Fixed asprintf usagePetri Hintukainen
2011-09-10Ensure that the stream reference inside each event queue is counted,Chris Rankin
and that each stream object is removed from its parent xine object's list before it starts destroying itself.
2010-11-30Various small memory leaks in xine engine.František Dvořák
2010-10-30Proper place for log mutex initialization (logging can start after ↵František Dvořák
xine_new()). Fixed a leak.
2010-02-04Fix a ticket-related memory leak.Darren Salt
2009-11-30Trim trailing space & reduce space+tab.Darren Salt
2009-02-16Protect audio loop so it cannot write to a paused device (fixMiguel Freitas
pause/resume freeze with pulseaudio).
2009-02-09Fix race conditions in gapless_switch (ref. kde bug #180339)Miguel Freitas
2008-06-20Ask the input plugin which demuxer to use.Darren Salt
This overrides the normal content/extension detection, but can be overridden by the user. This is an input plugin API extension; ABI is unchanged. The version is not bumped (we can't bump it due to 1.2).
2008-06-11Provide a useful implementation of xine_register_log_cb().Darren Salt
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-12Provide xine_get_current_frame_data which passes more data via a structure.Reinhard Nißl
The new structure xine_current_frame_data_t additionally contains cropping and interlacing information, which both are required for proper conversion of the image. The existing functions have been adopted to use the code of the new function. The changeset should be ABI compatible.
2008-05-09Use size_t rather than int to store the return value of strlen().Diego 'Flameeyes' Pettenò
2008-05-09Remove a new bunch of xine_malloc() calls.Diego 'Flameeyes' Pettenò
Also don't reset memory after it's allocated if we do that with calloc.
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-07Merge file removal.Diego 'Flameeyes' Pettenò
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
2008-05-07Mark internal functions and data structures static.Diego 'Flameeyes' Pettenò
Functions and data structures that are not exported and are only ever used in the same unit they are defined should be marked static to improve compiler's ability to optimise them. This applies to xine_dispose_internal() function for xine-lib, the extended_to_int() function in the AIFF demuxer, the bandwidths array in QuickTime demuxer, the wc_pal_lookup table in the WC3 movie demuxer, and the rm_header and pnm_data_header arrays in pnm input plugin.
2008-05-05Make open_internal static again.Darren Salt
2008-03-14xine_init(): mutex objs not initializedCarlo Bramini
The problem comes from the fact that into xine_probe_fast_memcpy() there is a call to xprintf, which excutes some actions to this->log_lock. But the "log_lock" field is still uninitialized. Under Windows, the xine_init() always crashes because that type is implemented as a structure, so the lock receives a NULL pointer and the execution is halted. The attached patch proposes to move the mutex objects to the top of xine_init() function. --HG-- extra : transplant_source : %07%1D%7F%F0%97%7D%06%3E%9F%2Ar%03%1DQ%14%F3%D1%EF%1D%93
2008-03-14Unportable pthread_t compare in xine.cCarlo Bramini
With Pthreads for Win32/Win64 I cannot compare two pthread_t items because they are implemented as structures. This patch fixes the comparison by using pthread_equal() function. --HG-- extra : transplant_source : %9D%98%CE%83%5E%BD%A9u%11%C7%3BmP%28%EBH%D0%B6I%DF
2008-03-10Fixed long delay when closing stream on dual core systems [Bug #33]Miguel Freitas
2008-03-10Support # stream parameter separator in raw filenames as well as in full MRLs.Miguel Freitas
Changeset 8ffe18290ba5 fixed bug 1784272 (opening raw filenames with # character, like "show #1.mpg") but at the cost of killing # separator in raw filenames completely. Although this might be a valid requirement in a new devel branch, imho, such change in stable branch should be considered a regression. The original idea of passing partial MRL for the input plugins to try doesn't work because plugin will generate error messages for every failed attempt to open the file (like "show " above), even thought the complete MRL is valid and will be played. So, since raw filenames are an exception for the MRL scheme anyway, we try stat'ing the partial filenames to determine what user means with the #.
2008-03-06Fix _x_get_current_frame_impl() to not abort when used legally.Reinhard Nißl
Retrieving frame size and format is a legal operation even for otherwise not supported frame formats like XXMC.
2008-03-02Provide safe and convenient implementations of xine_get_current_frame().Reinhard Nißl
xine_get_current_frame() relies on the caller to provide a sufficiently sized buffer. To calculate the required size of the buffer, one has to call xine_get_current_frame() to retrieve the necessary parameters. But as the image can change between two successive calls one has to pause the stream for consistency. To improve the situation, xine_get_current_frame_s() has been introduced which requires to specify the buffer size when an image is going to be retrieved. Furthermore, it will return the required/used buffer size. In that way, it can prevent copying data into a too small buffer and therefore can be considered safe. For convenience, xine_get_current_frame_alloc() is provided which takes care to allocate a sufficiently sized buffer. This function avoids pausing the stream as the image will be returned in a single call.
2008-01-20Unmaking a # of it.Darren Salt
2008-01-20Unescape the "#save:" filename, allowing ";" etc. in file names.Darren Salt
This has a side effect: versions older than 1.1.10 do not unescape, so "#save:foo%23.ts" will result in a file named "foo%23.ts". Front end maintainers, beware :-)
2008-01-20Don't unescape #subtitle:scheme://data.Darren Salt
This was broken in 1.1.8 when #subtitle:/file was fixed.
2007-04-15Avoid locking log_lock once the buffer has been allocated.Reinhard Nißl
(transplanted from 4988e864d1a9db84756668ea33a9f6860ded879e) --HG-- extra : transplant_source : I%88%E8d%D1%A9%DB%84ufh%EA3%A9%F6%86%0D%ED%87%9E
2007-12-18Don't treat # in MRLs as literals or URI-decode raw filenames. [Bug 1784272]Darren Salt
2007-11-23Merge.Darren Salt
2007-11-23log if send_headers returned with DEMUX_FINISHEDMatthias Kretz
2007-11-19add support for GNU/kFreeBSDPetr Salinger ext:(%20)
It changes some "defined (__FreeBSD__)" into "defined (__FreeBSD_kernel__)" and "__FreeBSD_version" into "__FreeBSD_kernel_version". The changes are performed on places, where feature of kernel is tested. On some other places, feature of userland/libc is tested, on them "defined (__FreeBSD__)" remains. As proposed, include/configure.h cause __FreeBSD_kernel__ be defined if __FreeBSD__ is defined. --HG-- extra : transplant_source : %25%96K%05%E4Y%B15%94%60%15%FE1%8Ah%26Xy%8C/
2007-11-10Delete most of the CVS $Id$/$Log$ lines.Darren Salt
--HG-- extra : transplant_source : %E0%D0%C5%8B%BEU%DD%24%5D7%1F%ADV%AD%EB%23%CBU%80%EB
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-08-15Workaround for recent glibc & -D_FORTIFY_SOURCE=2 (defines open() as a macro).Darren Salt
According to bug 1773769, this breaks foo->open(). The fix (as used in Ville Skyttä's patch, which doesn't cover all cases) is to replace this with (foo->open)(). This patch was generated using sed -i -re 's/(([[:alnum:]_]+(->|\.))+open) ?\(/(\1) (/' `grep '[>.]open \?(' include -rIl` One change (in a comment) is not committed.
2007-07-13Prevent ticket system deadlock when using DVB subtitlesSimon Farnsworth
When using DVB subtitles on an SMP machine, we see occasional lockups, which appear to be caused by one thread acquiring the same ticket twice. Fix this, by preventing acquire() and release() from blocking if the current thread has already acquired the ticket. Code sequences like the following can still block in all acquires and releases: ticket->acquire(...) /* Do something */ ticket->release(...) However, code sequences like the following, which used to deadlock if ticket was revoked at just the wrong moment, now succeed: ticket->acquire(...) /* Do something */ ticket->acquire(...) /* This acquire cannot block */ /* Do something */ ticket->release(...) /* This release cannot block */ /* Do something */ ticket->release(...) Without this patch, the inner acquire() and release() calls could block if ticket was revoked at the wrong time. revoke() would not unblock the blocking acquire until there have been as many release()s as acquire()s, which cannot happen.
2007-07-08Rename mrl_unescape and export it for use by plugins.Darren Salt
2007-04-12Provide a function to query buffer usage.Reinhard Nißl
This function shall be used to poll the number of remaining frames from a certain point in time on until the reported numbers are all 0. At that point in time, the content on screen is identical to a certain state of the stream, at which for example, a hardcopy may be taken.
2007-04-12Extend ticket system for nonblocking ticket acquiries.Reinhard Nißl
The current code has a race condition which can block arbitrary threads that call for example xine_get_current_frame() until the stream gets unpaused again. This can happen when the internal ticket acquiration collides with a ticket revokation for example when another thread is going to pause the stream. There are a few situations where a port ticket needs to be acquired for calling a port function but where it is absolutely undesireable to get blocked for an undetermined period of time. Therefore the ticket system should be extended by nonblocking functions which allow ticket acquiration even when a ticket revokation is in progress. And in the case where blocking is not avoidable, it should simply be indicated that no ticket was acquired. The caller can then choose to repeat the call at a later point in time.
2007-02-20const++Diego 'Flameeyes' Pettenò
CVS patchset: 8609 CVS date: 2007/02/20 00:36:08
2007-02-19Fix warning about incompatible pointer type.Diego 'Flameeyes' Pettenò
CVS patchset: 8600 CVS date: 2007/02/19 23:20:19
2006-12-22Removed INPUT_CAP_NOCACHE.Claudio Ciccani
CVS patchset: 8432 CVS date: 2006/12/22 16:38:15
2006-12-19Mark string-type configuration items according to whether they're plainDarren Salt
strings or names of files, device nodes or directories. This information is available to front ends (via .num_value) so that they can present file/dir-open dialogue boxes if they so choose. Subtitle font selection is split up due to this. CVS patchset: 8425 CVS date: 2006/12/19 19:10:50
2006-12-19Added some cleanup code to make some calls cancelable (at least xine_open ↵Claudio Ciccani
can be safely canceled now). CVS patchset: 8424 CVS date: 2006/12/19 14:10:35
2006-12-18Added INPUT_CAP_NOCACHE: disable usage of internal input cache by default.Claudio Ciccani
CVS patchset: 8421 CVS date: 2006/12/18 21:22:45
2006-12-13Lock the log buffer while updating it.Darren Salt
CVS patchset: 8411 CVS date: 2006/12/13 18:30:30
2006-10-16Fixed several warnings (but warnings due to APIs not solved).František Dvořák
CVS patchset: 8344 CVS date: 2006/10/16 22:18:24
2006-09-25Free the filename variable after usage (_x_rip_plugin_get_instance uses ↵Diego 'Flameeyes' Pettenò
strdup() properly). CVS patchset: 8277 CVS date: 2006/09/25 23:11:19
2006-09-14Add missing blanks.Philipp Hahn
CVS patchset: 8253 CVS date: 2006/09/14 06:46:31