summaryrefslogtreecommitdiff
path: root/src/xine-engine/demux.c
AgeCommit message (Collapse)Author
2010-07-21Remove duplicate codeLorenzo Desole
2010-07-21Normalize timevalMatthias Drochner
In demux_loop(), a time value is calculated by adding to the fractional part. In case a second barrier is crossed, the value is not in its canonical form anymore - the fractional part is larger than 10^9-1. It should be normalized for portability. While I haven't found a formal requirement for this in POSIX, NetBSD's libpthread checks for it and complains.
2009-11-30Trim trailing space & reduce space+tab.Darren Salt
2009-06-07Fix _x_compute_interval for OS X.Matthias Ringwald
The new _x_compute_interval functions uses clock_gettime() which is not provided on OS X. If _POSIX_TIMERS is not defined, use the older gettimeofday().
2009-04-22Demux timing fixes (Windows)Carlo Bramini
m4/pthreads.m4 * Mingw GCC says that '-pthread' option is unknown. * Correct library name under Mingw is -lpthreadGC2. src/xine-engine/demux.c * function _x_compute_interval cannot be compiled
2009-02-24Make _x_compute_interval static (never exported).Diego E. 'Flameeyes' Pettenò
2009-02-09demux_unstick_ao_loop() reports that xine might be stuck != is stuckLorenzo Desole
Don't give up immediately if demux_unstick_ao_loop() reports that xine might be stuck, because it's not necessarily so. According to my tests, this fixes http://bugs.kde.org/show_bug.cgi?id=180339#c42 and http://bugs.debian.org/514114. This has been tested with Amarok and kde 4.1.x (with phonon) and kaffeine.
2009-02-09Fix race conditions in gapless_switch (ref. kde bug #180339)Miguel Freitas
2009-02-08Remove a break which causes some front ends to hang. (cset ce60f8b5995a)Darren Salt
(If this causes xine-lib to hang on certain broken streams, we have a problem.)
2009-01-18Remove '#include "config.h"' from all public header files.Darren Salt
This requires that many other files include config.h themselves. Also convert <config.h> to "config.h".
2009-01-02Prevent another possible hang on stream stop (demuxer waiting for audio out).Darren Salt
The test stream sometimes causes the ASF demuxer to report "unknown GUID" several times then act as if the headers have been received, with the audio output thread waiting forever for data to be passed to it by the decoder, in this case the ffmpeg audio decoder. This particular hang occurs if playback is stopped before the demuxer has decided that headers have been received (later, and we'd have the problem which the parent cset of this cset fixes); having the demuxer control insert empty audio buffers where it would otherwise wait forever for the audio output thread to receive some data. Test stream: mmsh://213.92.19.8:80/radiodeejay?MSWMExt=.asf
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-09Use size_t to keep the value returned by strlen().Diego 'Flameeyes' Pettenò
When using a variable to store the result of strlen(), make sure its type is size_t just like the function returns, rather than using a smaller type like int. --HG-- extra : transplant_source : %B0%D5%3B%D7%1Dy%0A%7E%7D%7C%023%08%B2%CE%D3t%0B3%D7
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-03-10Fixed long delay when closing stream on dual core systems [Bug #33]Miguel Freitas
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-01-18Make _x_demux_check_extension() accept constant strings.Diego 'Flameeyes' Pettenò
CVS patchset: 8520 CVS date: 2007/01/18 23:28:46
2006-12-03should fix bug reported by Christophe Thommeret where avi+subtitlesxine-1_1_3-release1.1.3Miguel Freitas
(actually master/slave streams) could cause demux to get into an endless loop. CVS patchset: 8401 CVS date: 2006/12/03 19:23:16
2006-08-13move image presentation support to xine-libMiguel Freitas
CVS patchset: 8180 CVS date: 2006/08/13 23:51:33
2006-08-08new mutex to synchronize order of pairwise A/V buffer operationsMiguel Freitas
by Reinhard Nissl CVS patchset: 8167 CVS date: 2006/08/08 03:25:03
2006-04-051) various warning fixesFrantišek Dvořák
2) [coverity] fixes: - 279 (w32): test should be on input parametr type, not typeW - 267 (aout): can be ignored but there was warning anyway - 234 (w32): missing free on error & exit - 152 (w32): missing free on error & exit - 148 (w32): fixed bound of static array in test - 101 (ffdec): defense code when avodec_encode_video will fail (just defense to the future, should never happen with current ffmpeg in xine) - 98, 99 (w32): check negative handle by _x_assert (it's used as index to array) - 90 (w32): negate pointer check (+added check for size) - 89 (w32): added NULL and size check CVS patchset: 7959 CVS date: 2006/04/05 22:12:17
2006-01-24A bit of defensive programming to protect "_x_demux_send_data" and ↵Mathieu Olivier
"_x_demux_read_send_data" from negative "size" parameters CVS patchset: 7843 CVS date: 2006/01/24 22:25:34
2005-10-30gapless playback stream switching supportMiguel Freitas
CVS patchset: 7784 CVS date: 2005/10/30 02:18:35
2005-08-25*BUGFIX*František Dvořák
Windows ports fixes and improvements due to my current work on toxine: - first experiments with external win32 pthreads, more portable code (pthread_t may be a struct) - headers refactored - moved dirent win32 replacement to lib/, hide it for frontends, used system version, if found, not used non-POSIX dirent->d_reclen (this item doesn't work in MinGW), fix memleak in dvb - separated settings for postproc and avcodec when using external ffmpeg - check for malloc.h in public xine.m4, used it conditionally in xine headers - replaced random() by POSIX more common rand() - prevent one segfault in directx vo plugin, if fails - M$VC port update CVS patchset: 7709 CVS date: 2005/08/25 15:36:29
2005-07-17Improve ASX parsing.Darren Salt
Add an extended MRL reference event which includes the item title, start time and duration. (Both events are sent; front ends should only listen for one of them.) CVS patchset: 7656 CVS date: 2005/07/17 23:11:33
2005-03-20Fixed problem when play_internal called _x_demux_start_thread and the ↵Thibaut Mattern
previous demux thread has not been joined. CVS patchset: 7442 CVS date: 2005/03/20 18:41:55
2005-03-06Fixed pthread leak, the demuxer thread was not joined in all cases.Thibaut Mattern
See this thread for more info: http://thread.gmane.org/gmane.comp.video.xine.devel/12377 CVS patchset: 7432 CVS date: 2005/03/06 11:08:40
2005-02-10**BUGFIX**Michael Roitzsch
prevent a possible deadlock situation by un-nesting the resource locking CVS patchset: 7397 CVS date: 2005/02/10 11:33:31
2004-12-19stop stream if audio device failed to open. user receives a notificationMiguel Freitas
and should check if any other application is using the device. CVS patchset: 7282 CVS date: 2004/12/19 20:24:30
2004-10-30fixed seeking unresponsiveness when using external subtitlesMiguel Freitas
do not flush slave subtitle streams. since the output ports are the same for both streams, they will get flushed twice causing frames to be discarded. (possible improvement: check if slave output port is the same as master's) CVS patchset: 7089 CVS date: 2004/10/30 12:45:26
2004-10-27flush on end of streamMiguel Freitas
CVS patchset: 7080 CVS date: 2004/10/27 16:41:34
2004-10-14Implemented stream_t reference counter idea.Thibaut Mattern
See these two threads: http://thread.gmane.org/gmane.comp.video.xine.devel/10819 http://thread.gmane.org/gmane.comp.video.xine.devel/10424 Fixed _x_handle_stream_end __stop_internal race. See this thread: http://thread.gmane.org/gmane.comp.video.xine.devel/10818 If the lib is broken after this patch, you know who to blame ;-) CVS patchset: 7036 CVS date: 2004/10/14 23:25:24
2004-06-13implement steps 1, 2, 3 and 4 of the seeking proposal:Miguel Freitas
http://article.gmane.org/gmane.comp.video.xine.devel/9532 it is now up to demuxers to decide what the 0..65535 position means. demuxers tested: ogg, voc, flac, rm, asf, vqa, vob, avi, y4m, au, mov, ts, mp3, mpg, wav, ra, mve CVS patchset: 6686 CVS date: 2004/06/13 21:28:52
2004-05-16From: Reinhard Nissl.James Courtier-Dutton
The fix stopps dropping properly received data. I realized the problem when switching channels in VDR. From time to time, it happend that switching took more than 50 ms (the timeout value used in _x_read_abort()), which caused the select() to timeout. In the case where 'stream->demux_action_pending' was set, the already received data was dropped due to returning 0. This finally resulted in your demuxer to fail with DEMUX_END, as it couldn't read 6 bytes from the PES header. So for the case, that there is some data available, it now takes twice the timeout (i. e. 100 ms), before a return 0 happens. Some more information: as in rare cases switching channels could take even longer than 100 ms, I've also added a loop around _x_read_about() in my VDR input plugin, which returns 0 just after this state lasts for 5 seconds. CVS patchset: 6557 CVS date: 2004/05/16 21:45:24
2004-04-07Michael's patch for improving playback with subtitles, fix the long seeking.František Dvořák
CVS patchset: 6342 CVS date: 2004/04/07 18:10:20
2004-03-03use the _x_abort() macro instead of abort, since it prints some debug infoMichael Roitzsch
before aborting CVS patchset: 6211 CVS date: 2004/03/03 20:09:11
2004-02-12acquire the ticket on engine flushMichael Roitzsch
CVS patchset: 6138 CVS date: 2004/02/12 18:19:44
2004-01-11add _x_demux_read_send_dataJames Stembridge
CVS patchset: 6025 CVS date: 2004/01/11 15:54:23
2003-12-23- some more endianness fixes to ogg demuxerMiguel Freitas
- new helper function for demuxers (send data to fifo easily, provided it was already loaded to memory) CVS patchset: 5936 CVS date: 2003/12/23 21:22:38
2003-12-05cleanup phase II. use xprintf when it's relevant, use xine_xmalloc when it's ↵Daniel Caujolle-Bert
relevant too. Small other little fix (can't remember). Change few internal function prototype because it xine_t pointer need to be used if some xine's internal sections. NOTE: libdvd{nav,read} is still too noisy, i will take a look to made it quit, without invasive changes. To be continued... CVS patchset: 5844 CVS date: 2003/12/05 15:54:56
2003-11-26lprintf cleanup, pass I.Daniel Caujolle-Bert
CVS patchset: 5796 CVS date: 2003/11/26 19:43:26
2003-11-20"Anti audio fifo null" patch ;)Thibaut Mattern
Makes things a bit more symetric: - the audio fifo (demuxer->decoder) can't be NULL - the video driver can be NULL A dummy fifo (5 buffers) is used if the audio driver or video driver is NULL. Audio frontends (rhythmbox, seedeexeen, quark) do not need to instanciate a video driver anymore. CVS patchset: 5767 CVS date: 2003/11/20 00:42:14
2003-11-16actually not every engine file uses internals, so we do not need to defineMichael Roitzsch
XINE_ENGINE_INTERNAL for every file CVS patchset: 5753 CVS date: 2003/11/16 15:41:15
2003-11-15start xine_stream_t separation (public/private).Miguel Freitas
(we should finish this before rc3.) - stream_info and meta_info variables are private now. obs: everything must be recompiled due xine_stream_t changes CVS patchset: 5733 CVS date: 2003/11/15 14:54:30
2003-11-12fix CVS placeholderMichael Roitzsch
CVS patchset: 5725 CVS date: 2003/11/12 17:54:30
2003-11-11rename internal API function (_x_<function>).Daniel Caujolle-Bert
CVS patchset: 5721 CVS date: 2003/11/11 18:44:50
2003-10-14just a little commentThibaut Mattern
CVS patchset: 5523 CVS date: 2003/10/14 23:22:10
2003-09-25Correct/add comment about xine_demux_flush_engine.Rocky Bernstein
CVS patchset: 5412 CVS date: 2003/09/25 02:57:51
2003-07-16more cleanup; remove unused variables; use lprintfMarco Zuehlke
CVS patchset: 5168 CVS date: 2003/07/16 14:14:17