summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-09-27Splitted ff_audio_handle_header_buffer() from ff_audio_decode_data()Petri Hintukainen
imported patch 10120.diff
2011-09-27ffmpeg audio: make sure decode_buffer is allocated only oncePetri Hintukainen
imported patch 10119.diff
2011-09-15ffmpeg audio: removed checks that are always true (context is allocated in init)Petri Hintukainen
imported patch 10116.diff
2011-09-15ffmpeg audio: make sure context is allocated only oncePetri Hintukainen
imported patch 10115.diff
2011-09-16Fixed "warning: cast from pointer to integer of different size"Petri Hintukainen
2011-09-16Simplify: check for BUF_FLAG_SPECIAL only once. Splitted special buffer ↵Petri Hintukainen
handling to separate function.
2011-09-16ffmpeg video: do not require preview buffers for mpeg1/2Petri Hintukainen
2011-09-16Splitted ff_init_mpeg12_mode() from ff_handle_preview_buffer()Petri Hintukainen
2011-09-13Merge.Darren Salt
2011-09-12Use AC_LANG_SOURCEPetri Hintukainen
2011-09-12Require automake 1.9.Petri Hintukainen
libtool 2.4 does not work with automake-1.8: Running aclocal: aclocal: macro `_LT_DECL_SED' required but not defined aclocal: macro `_LT_FUNC_STRIPNAME_CNF' required but not defined
2011-09-11Update parsing of program numbers from PATs.Chris Rankin
The order of programs is assumed not to change among otherwise identical PATs. (Not an unreasonable assumption).
2011-09-11demux_ts_buffer_pes() is called for video, audio and DVBSUB packets only.Chris Rankin
So why does it try to handle SPU_DVD packets? DVB subtitles don't seem to work yet anyway.
2011-09-12Count preview frames separately for all audio and video streams.Chris Rankin
Otherwise we risk not marking the first audio frame in each stream with BUF_FLAG_HEADER. This is the final fix for https://bugs.xine-project.org/show_bug.cgi?id=403
2011-09-10Remove the attempt to auto-detect audio/video streams from the MPEG-TS.Chris Rankin
The only way to identify which codec a stream is using is to wait for a PMT, at which time we know all the PIDs anyway. The codec ID is in no way related to (0x100 + stream ID), which is what this code was trying to do. Such a codec ID just hits the default path of "Unknown, using MPEG instead".
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.
2011-09-10Not every audio packet can be used to determine the sample rate and number ofChris Rankin
audio channels. So we must keep discarding packets that cannot be used to initialise the codec until we receive one that can be.
2011-09-10Pad end of audio data buffer with zeros, as instructed by the API documentation.Chris Rankin
2011-09-10Use xine's fast memcpy function instead of standard library one.Chris Rankin
2011-09-10Optimise flags usage.Chris Rankin
2011-09-10Tidy up flags usage.Chris Rankin
2011-09-05No longer require libarts.Darren Salt
2011-08-26DVB syncTorsten Jager
The problem When watching live DVB, data is delivered strictly at the broadcasters speed. We cannot change it through server commands. Our local systems clock usually runs slightly faster or slower than that, causing a/v fifos to run empty or full after a few minutes. Standard network buffering control only handles the first case by pausing the engine (not nice). The latter case ends up in severe stuttering and an a/v lag of several seconds (annoying). I tried quite a few differnt algorithms, and this one made it: a 3 point controller. There is a target buffer fill window with a center and some tolerated width: Minimum: definition: 1 second safety: clamped to 38% of fio size action: switch playback speed to 99.5% Center: definition: 2 seconds safety: clamped to 73% fifo size action: switch to normal playback speed Maximum: definition: 3 seconds safety: clamped to 98% fifo fill action: switch playback speed to 100.5% If the usual dvb audio to video muxing delay is more than 1 second, center time is increased. On low bitrate radio, window width is increased. Real TVs do adjust playback audio sampling rate to follow delivery speed. Some PC sound cards can do that, too. It could be implemented transparently (although I don't know yet how). This comes quite close, resampling audio to stretch. That half percent is large enough to cover clock deviation, and it is small enough not to cause audible pitch bending. Speed control consists of adjusting SCR and telling audio out. Doing just the first will cause metronom to drop and/or insert whole audio frames, not nice with music. BTW. this one needs demux_ts to send BUF_FLAG_FRAME_START.
2011-08-29Add AAC LATM support from FFmpeg 0.7+Chris Rankin
I've now tested this patch on Fedora 15 (FFmpeg 0.7) and Fedora 14 (FFmpeg 0.6), and am happy to report that it works fine on F15 and doesn't break xine-lib on F14. On F14, it also has the happy side effect of no longer trying to decode an LATM AAC stream with the xineplug_decode_faad.so plugin. (Which was something which never ended well anyway.)
2011-08-09Cosmetics: reordered functionsPetri Hintukainen
2011-08-09ffmpeg VC-1: scan for extradata (sequence header) from preview buffersPetri Hintukainen
2011-08-14Fixed multithreaded decoding with lavc >= 52.112.0.Petri Hintukainen
avcodec_thread_init() was deprecated in lavc 52.112.0 (2011-02-09)
2011-08-23Logic error with AC3 demuxerChris Rankin
This is a small mistake, but I'm fairly sure the index should be "j" and not "i".
2011-08-22Video deadlock fixTorsten Jager
When watching TV with Kaffeine I frequently had complete engine lockups. Multiple mutexes were waiting on each other. net_buf_ctrl requires the demuxer to keep running while playback is still paused. The diff might look a bit confusing. Basically, all I did was to replace phtread_mutex_lock (); ... pthread_mutex_unlock (); with if (pthread_mutex_trylock ()) { ... pthread_mutex_unlock (); } at a place where it does the least damage.
2011-08-22UI freeze fixTorsten Jager
xine_play () gets suspended after start or seek until first frame gets displayed. This often wont work on slow machines when first frame gets dropped because its too old. Consequently, UI freezes for full 10 seconds. Let's wake up xine_play when this happens as well. OK, this is a luxury convenience fix ;-)
2011-08-22Audio crash fixTorsten Jager
Audio decoder loop creates a sorted map of available audio channels on the fly. If neither user nor dvdnav intervene, it will pass the first (= lowest index) audio channel to decoders. Now imagine a TV recording with 2 audio channels: audio.0: eac3 5.1 (fra) audio.1: eac3 stereo (qaa) By chance, first audio frame to be demuxed is for channel #1. Track map will be [0]: eac3, channel 1 Audio loop opens ffmpeg audio decoder / stereo out. Fine. Then, first frame for channel #0 comes in. [0]: eac3, channel 0 [1]: eac3, channel 1 Both are same codec, so audio loop just switches to channel 0 without further notice. Audio decoder then runs into a mem leak, or worse, crashes audio out who still thinks we're only stereo. Whenever we insert something at track map index 0, and its going to be auto-selected later, reset current codec type. This forces a clean decoder/output switch.
2011-08-13rv30 & rv40 supportTorsten Jager
2011-08-13VP8 supportTorsten Jager
2011-08-13ffmpeg audio crash fix (sse2 alignment)Torsten Jager
Certain ffmpeg audio decoders use 32 bit float samples internally (wma, eac3, ...). They are then exported to the calling application as 16 bit integer. That conversion is done by faster sse2 code if your processor supports it. However, sse2 instructions require data buffers to be 16 byte aligned, or hit a segfault otherwise. Plain malloc() / realloc() ensures only 8 byte alignment, giving a 50% chance of a crash. FFmpeg internally uses aligned buffers a lot. It seems to be a good idea to do likewise for input buffers as well, even if current version does not strictly need it yet. Libavutil/av_realloc() has a bug that can break the alignment when enlarging an existing buffer. Thus I included a fixed version of it within ff_audio_decoder.c.
2011-08-10Merge.Darren Salt
2011-07-18demux_ts: added m2ts and mts file extensionsPetri Hintukainen
2011-08-02demux_ts: added buffer size checks to adaptation field parsingPetri Hintukainen
2011-07-18Fixed writing outside of buffer when there are more than MAX_PIDS scrambled ↵Petri Hintukainen
pids.
2011-07-22demux_ts: Added buffer size checks. Make sure buffer size is not set to ↵Petri Hintukainen
negative value (that results writing out of buffer when buffering payload). Check buffer size before checking substream header bytes.
2011-07-16parse_pes_header(): eliminated local variable by simplifying the code that ↵Petri Hintukainen
skips pes header
2011-07-16demux_ts: Fixed reading outside of buffer: check header length before ↵Petri Hintukainen
parsing pts.
2011-07-16demux_ts: Fixed reading outside of buffer. Checking if pes header length == ↵Petri Hintukainen
6 is not enough ; anything less than 9 is invalid (header length byte at [8] can't be used if it is outside of buffer). Moved check to beginning of parse_pes_header() to avoid reading outside of buffer.
2011-08-01demux_ts: removed unneeded check ((stream_id & 0xf0) == 0xe0 implies ↵Petri Hintukainen
stream_id >= 0xbc)
2011-07-18Removed unneeded checkPetri Hintukainen
2011-07-15Factorized known audio pid search codePetri Hintukainen
2011-07-15Removed unused parameterPetri Hintukainen
2011-07-22demux_ts: Removed unused and write-only variablesPetri Hintukainen
2011-07-09Fixed 20-bit BluRay PCM audio. In this format samples are padded to 24 bits, ↵Petri Hintukainen
4 lowest bits are 0 --> Handle as 24-bit BluRay PCM.
2011-07-09Fixed 24-bit BluRay PCM audio broken by commit 7b6c2dc0ac98. Samples are 24 ↵Petri Hintukainen
bit BE, not in DVD format.
2011-07-09Composition descriptor state is only two bitsPetri Hintukainen