summaryrefslogtreecommitdiffstats
path: root/libaf/af.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-700/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* audio: untypedef af_streamStefano Pigozzi2012-11-021-16/+16
|
* audio: untypedef af_instanceStefano Pigozzi2012-11-021-24/+24
|
* audio: untypedef af_infoStefano Pigozzi2012-11-021-26/+26
|
* audio: untypedef af_data and rename it to mp_audioStefano Pigozzi2012-11-021-12/+12
| | | | this is to have something specular to mp_image
* AF: remove af_statswm42012-08-031-2/+0
| | | | This was not very useful.
* af: some spelling/grammar fixesmplayer-svn2012-08-031-3/+3
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34349 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* af: fix crash on invalid channel countmplayer-svn2012-08-031-0/+4
| | | | | | | | | | Sanitize channel count for libaf to avoid crashes since it is used unchecked. af_downmix is an example of a function that can/will crash for invalid values. 0 is not invalid since it is used as "autodetect" for output. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34342 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* AF: remove af_gate and af_compwm42012-08-021-4/+0
| | | | | | | To quote the manpage: "This filter is untested, maybe even unusable." And it seems they were never touched again after it was added many years ago (except for cosmetic changes). Just get rid of them.
* af: fix crash when trying to use volume controls with AC3 pass-throughwm42012-01-181-1/+8
| | | | | | | | | | | | | | | Changing the volume when softvol is enabled or if the audio output driver doesn't support volume controls causes insertion of the "volume" filter. This fails with AC3. Since the filter wasn't removed after that, and the filter chain was in a bogus state, random crashes occured past this point. Fix it by reinitializing the filter chain completely on failure. Volume controls simply won't work. (This can't be fixed, because AC3 is a compressed format, and would require additional decoding/encoding passes in order to support arbitrary volume changes.) This also affects balance controls.
* af: print audio filter chain in verbose modewm42012-01-181-0/+35
| | | | The string format used in print_fmt() is taken from init_audio_filters().
* configure, build: remove --disable-libav supportUoti Urpala2011-12-111-7/+1
| | | | | Remove support for building the player without libavcodec and libavformat. These libraries are now always required.
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-141-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* libaf: Make af_reinit "public", to allow using it in future patchesreimar2010-11-021-4/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32504 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio: auto-add downmix filter when stereo output is requestedcigaes2010-11-021-0/+25
| | | | | | | | | | When -channels 2 [default] is specified and the audio decoder used does not support internal downmixing, automatically add a pan filter after the decoder to downmix to stereo. Patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32356 b3059339-0415-0410-9bf9-f77b7e298cf2
* af.c: Minor simplification of af_initreimar2010-11-021-5/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32347 b3059339-0415-0410-9bf9-f77b7e298cf2
* af.c: add "const" to af_append(), af_prepend() prototypesreimar2010-11-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32346 b3059339-0415-0410-9bf9-f77b7e298cf2
* build: enable/disable all FFmpeg libraries togetherUoti Urpala2010-11-021-3/+3
| | | | | | | | | Enable all of libavcodec, libavformat, libswscale, and libpostproc together (libavutil is always required). based on svn commit by diego: git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32226 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_lavcac3enc: actually enable the filter by defaultUoti Urpala2010-05-261-3/+1
| | | | | The filter was changed earlier to allow building without FFmpeg internal symbols. Make it actually available by default.
* Merge svn changes up to r30663Uoti Urpala2010-03-101-42/+55
|\ | | | | | | | | | | | | Conflicts: gui/cfg.c libmpcodecs/vd_dmo.c mplayer.c
| * Move code that makes the filter chain match the desired output format intoreimar2010-02-191-42/+55
| | | | | | | | | | | | | | | | | | a separate function. Call this function also from af_add, fixes audio corruption with e.g. -softvol -af format=s16be (bug #1561). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30659 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30375Uoti Urpala2010-01-251-0/+1
|\|
| * Add a proper header for our strsep implementation so strsep willreimar2010-01-171-0/+1
| | | | | | | | | | | | | | not be used without a declaration, causing issues on 64 bit systems. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30355 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-43/+43
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | build: Readd support for code depending on FFmpeg internalsUoti Urpala2009-07-261-1/+1
| | | | | | | | | | | | | | | | Add configure option --ffmpeg-source-dir=PATH. If the user specifies this option then building code that depends on FFmpeg internals is enabled and the files files which use internal lavf headers will get them from this path. The FFmpeg libraries linked with must export needed internal symbols.
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-43/+43
|/
* Add libbs2b audio filter itself.bircoph2009-04-021-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29132 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary malloc.h #includes and related #ifdeffery.diego2009-04-021-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29126 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove af_msg special-casing API in libaf.bircoph2009-03-281-18/+15
| | | | | | | Replace it by standard mp_msg message system. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29088 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing #include "config.h", fixes the warning:diego2009-02-211-0/+1
| | | | | | | libaf/af.c:23:5: warning: "HAVE_MALLOC_H" is not defined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28697 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add statistics audio filter that prints information about the audio stream.diego2009-02-211-0/+2
| | | | | | | patch by Nicolas George, nicolas.george normalesup org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28696 b3059339-0415-0410-9bf9-f77b7e298cf2
* Convert HAVE_MALLOC_H into a 0/1 definition, fixes the warning:diego2009-02-171-1/+1
| | | | | | | mem.c:32:5: warning: "HAVE_MALLOC_H" is not defined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28629 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace informal license notices by standard license headerdiego2009-01-051-0/+18
| | | | | | | and add standard license header where missing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28264 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename a bunch of miscellaneous preprocessor directives.diego2008-08-071-1/+1
| | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27423 b3059339-0415-0410-9bf9-f77b7e298cf2
* Start unifying names of internal preprocessor directives.diego2008-07-301-4/+4
| | | | | | | | Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add new audio filter for encoding multi-channel audio into ac3 at runtime.ulion2007-12-131-0/+4
| | | | | | | | And if set first parameter of this filter to 1, it will do ac3 passthrough like hwac3 did. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25385 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix my wrong code in r25530.ulion2007-12-101-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25334 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix missing command line bug by making the input parameter constant.ulion2007-12-101-6/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25330 b3059339-0415-0410-9bf9-f77b7e298cf2
* Prevent from using data->len when data is NULL (when play() return NULL).ulion2007-11-231-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25143 b3059339-0415-0410-9bf9-f77b7e298cf2
* A/V sync: take audio filter buffers into accountuau2007-11-011-1/+2
| | | | | | | | | | | | | | | | | | Substract the delay caused by filter buffering when calculating currently playing audio position. This matters for af_scaletempo which buffers significant and varying amounts of data. For other current filters the effect is normally insignificant. Instead of the old time-based filter delay field (which was ignored) this version stores the per-filter delay in units of bytes input read without corresponding output. This allows the current scaletempo behavior where other filters before and after it can see the same nominal samplerate even though the real duration of the data varies; in this case the other filters can not know the delay they're causing in terms of real time. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24928 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add audio filter scaletempouau2007-11-011-0/+2
| | | | | | | Patch by Robert Juliano, juliano.1 osu edu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24924 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change decode_audio() interfaceuau2007-11-011-20/+3
| | | | | | | | | | | | Rewrite decode_audio to better deal with filters that handle input in large blocks. It now always places output in sh_audio->a_out_buffer (which was always given as a parameter before) and reallocates the buffer if needed. After the changes filters can return arbitrarily large blocks of data without some of it being lost. The new version also allows simplifying some code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24920 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some pointless 'inline' qualifiersuau2007-11-011-1/+1
| | | | | | | Most of these functions aren't even used in the same translation unit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24918 b3059339-0415-0410-9bf9-f77b7e298cf2
* libaf: Remove rational number implementationuau2007-11-011-47/+0
| | | | | | | | Remove the mul/cancel/gcd functions and some related code. Use ff_gcd instead of the removed af_gcd in af_resample.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24917 b3059339-0415-0410-9bf9-f77b7e298cf2
* libaf: change filter input/output ratio calculationsuau2007-11-011-27/+16
| | | | | | | | | | Change the audio filters to use a double instead of rationals for the ratio of output to input size. The rationals could overflow when calculating the overall ratio of a filter chain and gave no real advantage compared to doubles. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24916 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused functions in af.cuau2007-11-011-33/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24915 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change value used to indicate "unknown audio format" from 0 to -1.uau2006-11-081-2/+4
| | | | | | | 0 collided with a valid format value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20787 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix stupid use of multiplication to check signs which fails because of uau2006-09-181-5/+1
| | | | | | | | overflow. Negative values do not seem to be used so just remove the failing test. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19889 b3059339-0415-0410-9bf9-f77b7e298cf2
* makes several libaf functions static coz they are not used outside their ↵reynaldo2006-07-091-5/+5
| | | | | | source files. Patch by Stefan Huehner, stefan AT huehner-org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18972 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename sinesupress to sinesuppress, including af_sinesupress.c file rename.corey2006-06-071-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18612 b3059339-0415-0410-9bf9-f77b7e298cf2
* New karaoke afreynaldo2006-05-131-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18471 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get ride of the several if(identify) messy lines and rearangment of some of ↵reynaldo2006-04-241-2/+0
| | | | | | the output, both patches by Kiriuja mplayer-patches AT en-directo_net, his changes are barely unrelated, nevertheless Im commiting them thogeter just for the sake of my mental healt, I had both patches already applied on my local three git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18238 b3059339-0415-0410-9bf9-f77b7e298cf2
* very simple filter which can remove a sine at a specified frequency, usefull ↵michael2006-04-131-0/+2
| | | | | | | | | to get rid of the 50/60hz noise on ultra crappy equipment probably works only with 1 channel input git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18083 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix memory leak when filter with given name does not exist.reimar2006-03-081-4/+4
| | | | | | | Also prints which filter failed in the malloc-failed case git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17781 b3059339-0415-0410-9bf9-f77b7e298cf2
* semi-hack: avoid passing 0-length blocks to audio filters.reimar2005-10-201-0/+1
| | | | | | | Fixes bugzilla bug #391 (lavcresample crashes). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16816 b3059339-0415-0410-9bf9-f77b7e298cf2
* documentation-only patch: make doxygen compatible and createreimar2005-10-011-6/+10
| | | | | | | af_chain and af_filter doxygen modules. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16628 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid hang with -af-adv force=3reimar2005-07-231-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16073 b3059339-0415-0410-9bf9-f77b7e298cf2
* make -srate work again, unify audio filter init and preinit.reimar2005-06-241-15/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15812 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix mp_msg vs af_msg usage as pointed out by Ivo.diego2005-06-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15792 b3059339-0415-0410-9bf9-f77b7e298cf2
* adds some more -identify output, patch by kiriuja < mplayer DASH patches PAM ↵gpoirier2005-06-201-0/+2
| | | | | | en DASH directo POUM net> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15790 b3059339-0415-0410-9bf9-f77b7e298cf2
* Prevent segfault when filter chain is empty (e.g. because allreimar2005-05-011-0/+5
| | | | | | | filters returned AF_DETACH). Fixes bugzilla bug #293. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15313 b3059339-0415-0410-9bf9-f77b7e298cf2
* change list traversal so the loop begins at the first filter after removinghenry2005-04-161-13/+12
| | | | | | | one, instead at the second git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15192 b3059339-0415-0410-9bf9-f77b7e298cf2
* finally remove the refences to bps outside libaf. also simplification of ↵alex2005-02-251-5/+6
| | | | | | some messages and removed redundants git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14819 b3059339-0415-0410-9bf9-f77b7e298cf2
* filter for adding a center channel, adding a high pass filter would be nicealex2005-02-211-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14751 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make this file compile with gcc-4.0.0:gpoirier2005-01-221-3/+3
| | | | | | | | It's syntacticly incorrect to use the "&" operand to take the address of a variable that is declared as "register" as a register has no address. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14570 b3059339-0415-0410-9bf9-f77b7e298cf2
* always cancel down fractions (frac_t) to avoid overflows and playbackreimar2005-01-081-6/+46
| | | | | | | | problems (e.g. when using resample and equalizer filters together, see http://mplayerhq.hu/pipermail/mplayer-users/2004-December/050058.html) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14434 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_bits2fmt and af_str2fmt_short, also removed the extra FORMAT_BPS control ↵alex2005-01-031-4/+4
| | | | | | in format.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14336 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use lavcresample only when libavcodec is compiled in.reimar2005-01-031-8/+21
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14327 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make af_control_any_rev return the matching filterreimar2005-01-01