summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/ad_pcm.c
Commit message (Collapse)AuthorAgeFilesLines
* rawaudio: use mplayer audio format for format optionwm42012-09-181-0/+6
| | | | | | | | | | | | | | | The rawaudio demuxer had a rather hard to use way to set the audio format with the --rawaudio=format=value option. The user had to pass a numeric value, which then was set as wFormatTag member in the WAVEFORMATEX header. Make it use the mplayer audio format (the same as --af=format=value). Add a new internal pseudo audio codec tag, which is hopefully unused, which makes ad_pcm use the value in wFormatTag as internal mplayer audio format. Playing non-PCM formats is disabled. (At least AC3 can be played directly.)
* ad_pcm: add back raw decoderwm42012-09-181-0/+214
| | | | | | | | | | | This was removed in commit 6a26b4a66504. Add it back, because it was needed by demuxer_rawaudio and for PCM audio with demuxers other than demux_lavf. (In practice, this broke rawaudio and PCM-in-Matroska only.) Unlike with raw video, there is no single raw audio "decoder" in libavcodec. Instead of trying to mess raw audio input into ad_ffmpeg using a table to map audio formats to the respective libavcodec decoders, it seems advantageous to simply add back ad_pcm.
* libmpcodecs: remove redundant audio and video decoderswm42012-08-201-214/+0
| | | | | | | | Probably all of these are supported by libavcodec. Missing things can be added back. Also remove qtpalette.h. It was used by demux_mov.c, and should have been deleted with commit 1fde09db6f4ce.
* audio: disallow partial samples, fix ad_pcm to complyUoti Urpala2011-05-071-3/+8
| | | | | | | | Add some asserts to check that decoders/filters produce complete samples (byte amounts must be multiples of channels*datatype_size) and that audio output drivers also accept input in complete units. Fix ad_pcm which was known to violate this if its last input packet didn't stop at a sample boundary.
* ad_pcm, codecs.conf: support 'lpcm' in mov and float in aiffcehoyos2011-04-131-0/+2
| | | | | | | | | | | Support 'lpcm' in mov files, has audible (clipping?) artefacts on some systems. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33075 b3059339-0415-0410-9bf9-f77b7e298cf2 Support 32bit big endian float pcm in aiff. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33076 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"Uoti Urpala2010-05-291-4/+4
| | | | | | | Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun.
* ad_pcm: don't rely on demux packets staying validUoti Urpala2010-05-151-9/+23
| | | | | | | | | Change ad_pcm to copy input packet data into an internal buffer instead of relying on the packet still existing at the next decode() call. The extra memcpy could be avoided by improving the demuxer API a bit but I don't feel like implementing that now. Also add a ADCTRL_RESYNC_STREAM handler to drop buffered data from previous stream position.
* ad_pcm: fix crash at EOFUoti Urpala2010-05-151-1/+1
| | | | | | | Fix use of unsigned type where negative values were needed. When playing a file with multichannel PCM audio the bug could result in the channel reorder function scrambling memory at the end of playback, causing a crash.
* cosmetics: reindent ad_pcm.cUoti Urpala2010-05-151-117/+120
|
* Merge svn changes up to r30463Uoti Urpala2010-03-091-0/+18
|\ | | | | | | | | | | Note that r30455 is wrong, that commit does not in fact change the default behavior as claimed in the commit message. It only breaks "-af-adv force=0", which was already pretty much useless though.
| * Add missing license headers to all files in the libmpcodecs directory.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30463 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30437Uoti Urpala2010-01-281-0/+2
|\|
| * Fail ad_pcm initialization of WAVEFORMATEX header is missing instead of ↵reimar2010-01-241-0/+2
| | | | | | | | | | | | crashing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30428 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | ad_pcm: Track pts explicitlyUoti Urpala2008-08-031-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | ad_pcm used the old audio timestamp tracking system that calculated timestamp at end of decoder output as last_timestamp_in_input_decoder_has_read + bytes_read_after_that_timestamp / input_bitrate. For PCM this can be accurate as input bitrate is constant. However it relies on input bitrate being known and actually set. At least in some case with .mov input and libavformat demuxer it wasn't set. Instead of special-casing PCM to make sure input bitrate is set (in general it may not be known or constant at all) change ad_pcm to explicitly set the pts information on the decoder output side.
* | Make audio decoder description structs constUoti Urpala2008-04-261-1/+1
|/ | | | | | Make the per-decoder struct ad_functions and its ->info struct constants. Same for the mpcodecs_ad_drivers[] table of pointers to those structs.
* Fix all current known multi-channel wrong order problems by addingulion2007-12-101-0/+7
| | | | | | | | | | | common functions for channel reordering. This fixes these modules by adding channel reordering code for 5.0/5.1 audio: ao: pcm ad: dmo, faad, ffmpeg(ac3, dca, libfaad, liba52), pcm ae: faac, lavc(ac3, libfaac), pcm git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25343 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix comment, it's 'sowt', not 'swot' ('twos' reversed)reimar2006-11-051-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20720 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change pcm decode_audio to return data based on minlen instead of maxlenuau2006-08-131-1/+5
| | | | | | | to avoid demuxing unnecessarily much at once. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19389 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove twos workaround, this bug was fixed in mov demuxerrtognimp2006-03-141-7/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17869 b3059339-0415-0410-9bf9-f77b7e298cf2
* in24/in32/fl32 little/big-endian QuickTime PCM audio supportrathann2006-03-131-0/+20
| | | | | | | approved by rxt git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17859 b3059339-0415-0410-9bf9-f77b7e298cf2
* QuickTime in24 and in32 PCM audio supportrathann2006-03-111-0/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17814 b3059339-0415-0410-9bf9-f77b7e298cf2
* Unify include path handling, -I.. is in CFLAGS.diego2005-11-181-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17013 b3059339-0415-0410-9bf9-f77b7e298cf2
* avoid reading more than maxlen bytes.reimar2005-08-251-2/+2
| | | | | | | | Has the sideeffect that the amount read will be close to maxlen instead of minlen as before. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16308 b3059339-0415-0410-9bf9-f77b7e298cf2
* lavf demuxer with raw PCM fix (and a related hang)reimar2005-07-281-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16135 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for 32-bit float WAV files and support for extended WAV filesivo2005-02-261-0/+4
| | | | | | | with 4, 6, 8, ... channels of audio. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14834 b3059339-0415-0410-9bf9-f77b7e298cf2
* removing AFMT_ dependancyalex2004-12-271-15/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14246 b3059339-0415-0410-9bf9-f77b7e298cf2
* fl32: BE float32 PCM audio in mov filesrtognimp2004-11-271-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14056 b3059339-0415-0410-9bf9-f77b7e298cf2
* make use of 24bit afmtalex2004-10-041-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13554 b3059339-0415-0410-9bf9-f77b7e298cf2
* More support for audio format 0x0rtognimp2004-06-061-0/+1
| | | | | | | Patch by Reimar Doeffinger git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12540 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix "raw " audio in mov files.rtognimp2004-05-231-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12499 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for 24 bit pcm/wav filesreimar2004-05-161-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12479 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix bigendian problems (left-right swapped 8bit pcms), add 32bit supportreimar2004-05-081-12/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12448 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert my old twos fix, it seems to break more files than it fixed.rtognimp2004-03-281-0/+5
| | | | | | | If your file sound wrong, please uncomment and test git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12081 b3059339-0415-0410-9bf9-f77b7e298cf2
* twos 16bit 2 channels fixed.rtognimp2003-12-021-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11549 b3059339-0415-0410-9bf9-f77b7e298cf2
* qt swot supportalex2002-11-041-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8103 b3059339-0415-0410-9bf9-f77b7e298cf2
* -afm/-vfm migration from ID (int) to NAME (string) - simplifies code and ↵arpi2002-08-301-1/+0
| | | | | | makes dlopen()'ing possible git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7181 b3059339-0415-0410-9bf9-f77b7e298cf2
* 8bit 'twos' S8 pcm audio support - fixes MOTI1E.MOVarpi2002-05-301-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6234 b3059339-0415-0410-9bf9-f77b7e298cf2
* bigendian fix - thx to Rogério Brito <linuxconsult@yahoo.com.br>arpi2002-04-251-1/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5828 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanuparpi2002-04-011-6/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5456 b3059339-0415-0410-9bf9-f77b7e298cf2
* twos audio fixedarpi2002-04-011-1/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5454 b3059339-0415-0410-9bf9-f77b7e298cf2
* imported from MPlayerXP, dlopen() hack removed, some bugs fixed, interface ↵arpi2002-03-251-0/+66
functions changed to static, info->author field added git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5341 b3059339-0415-0410-9bf9-f77b7e298cf2