Commit Graph

86 Commits

Author SHA1 Message Date
Rémi Denis-Courmont cc129a71d7 Remove old mail address from sources 2019-09-04 22:11:04 +03:00
Steve Lhomme 5363279805 remove the $Id$ in the source code 2019-01-17 12:21:18 +01:00
Steve Lhomme 1f17997348 rename VLC_TS_INVALID to VLC_TICK_INVALID 2018-07-03 07:10:07 +02:00
Francois Cartegnie 10318107ac date_t: always init to TS_INVALID 2018-05-25 11:09:47 +02:00
Rémi Denis-Courmont 05ba3c15d1 aout: factor out the default channel maps 2018-05-15 19:46:29 +03:00
Rémi Denis-Courmont 99e1771287 adpcm: fix invalid timestamps 2018-05-02 17:12:51 +03:00
Romain Vimont ff2901aff3 core: remove global *_sys_t typedefs
Do not declare *_sys_t typedefs globally in vlc_common.h. Instead,
declare them locally in each module that provides a definition.

This paves the way to move C++ definitions into anonymous namespaces in
order to respect C++ ODR.

The picture_resource_t and sout_stream_id_sys_t typedefs will be handled
separately, since they require specific additional changes.

See #18033

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2018-04-30 14:20:50 +02:00
Thomas Guillem 91f426996c es: replace i_original_channels with i_chan_mode
Rename i_original_channels to i_chan_mode. For now, chan modes can be
DOLBYSTEREO or DUALMONO.

This new value, i_chan_mode, should only be set by demuxes/codecs/packetizers
if there is a special stereo mode to handle.
2017-07-13 17:15:51 +02:00
Hugo Beauzée-Luyssen 5d168c429a adpcm: Fix fourcc mismatch 2017-07-13 09:44:49 +02:00
Hugo Beauzée-Luyssen 3b782cb9cd adpcm: Simplify
And reorder the fourccs to match the initialization switch
2017-07-13 09:34:45 +02:00
Steve Lhomme 788c0561fe vlc_fourcc: add a define for "XAJ\00" (EA ADPCM)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-07-12 12:17:55 +02:00
Steve Lhomme 5dbd54ec68 decoder/packetizer: no need to set the output ES category anymore
It's done when loading the decoder/packetizer.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-07-08 18:32:29 +02:00
Thomas Guillem 8d681ab672 adpcm: don't modify dec->fmt_in
A decoder can only modify fmt_out from the probe function.
2017-06-28 17:10:39 +02:00
Rémi Denis-Courmont 89504cd744 decoder: use "audio decoder" capability for audio decoders
This avoids probing video or SPU decoders for audio format and vice-
versa.
2017-06-19 20:42:11 +03:00
Francois Cartegnie 477abfabd5 codecs: fix discontinuity handling
corrupted block is implicitely a discontinuity
fixup of ce6db7865c
2017-02-18 18:26:43 +01:00
Thomas Guillem a8b249bc6b decoder: refactor pf_decode_* callbacks
Use only one callback for every decoder types:

int (*pf_decode)(decoder_t *, block_t *p_block);

There is now only one way to send output frames/blocks from a decoder module:
using decoder_QueueVideo(), decoder_QueueAudio() and decoder_QueueSub()
functions.

This fixes transcoding not receiving any output when a decoder used
decoder_Queue*() function.

The pf_packetize callback is kept unchanged. A packetizer shouldn't be
asynchronous at all (and this simplify the locking for decoder core).

The pf_decode callback returns, for now, only one value: SUCCESS. This will
allow a module to send more status.
2017-02-09 15:55:16 +01:00
Francois Cartegnie 2bf06d1705 codec: adpcm: set IMA WAV max channels
only ADPCM EA allows > 2 channels
2016-09-29 11:40:29 +02:00
Francois Cartegnie 4c17d06b91 codec: adpcm: check min samples prior read 2016-09-29 11:35:32 +02:00
Francois Cartegnie 7f2eeddd05 codec: adpcm: check computing of samples per block
we should not trust block size
2016-09-29 11:32:31 +02:00
Francois Cartegnie 301753e2a0 codec: adpcm: unify max channels checks 2016-09-29 11:11:50 +02:00
Francois Cartegnie bd85994455 codec: adpcm: check max channels 2016-09-29 11:02:00 +02:00
Francois Cartegnie ac73e91ba7 codec: adpcm: adpcm_ms: use samples count for extracting data (refs #17448)
Buffer is allocated according to samples count, but a fixed
depends on header which max only to 2 when
reading, and allow overflowing
2016-09-29 11:02:00 +02:00
Thomas Guillem 75e39eac45 decoder: audio: don't update format when creating a buffer
Decoder modules are now responsible for calling decoder_UpdateAudioFormat()
before decoder_NewAudioBuffer().

In a lot of modules, decoder_UpdateAudioFormat() could be called in a better
place. Just after dec->fmt_out is updated for example.
2016-09-26 17:08:48 +02:00
Rafaël Carré 458ed62bbe adpcm: reject invalid QuickTime IMA files
DecodeAdpcmImaQT() can only decode up to stereo files.
Fix out of bound write.

Reported by: Patrick Coleman <blinken@gmail.com>

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-05-26 18:40:13 +02:00
Rémi Denis-Courmont 73761ab710 adpcm: fix decoding and gapping memory leak (fixes #16953)
On the bright side, the regression was easy to find by just looking at
the list of recent commits
2016-05-15 22:02:12 +02:00
Thomas Guillem c94f68febd decoder: implement pf_flush for all decoders/packetizers
For now, a lot of decoder/packetizer are also flushing on
BLOCK_FLAG_DISCONTINUITY flag. Some others are also flushing on
BLOCK_FLAG_CORRUPTED flag (omxil, videotoolbox, avcodec audio).

This patch doesn't change the current behavior.
But maybe we shouldn't flush anymore on DISCONTINUOUS/CORRUPTED.
2015-12-05 12:53:38 +01:00
Jean-Paul Saman ce6db7865c codec: don't drop blocks marked BLOCK_FLAG_DISCONTINUITY 2015-11-05 06:46:55 +02:00
Ilkka Ollakka d0c5748146 Revert "codec: don't drop blocks marked BLOCK_FLAG_DISCONTINUITY"
This reverts commit 48a867c768.

Revert for futher checking
2015-10-13 23:31:07 +03:00
Jean-Paul Saman 48a867c768 codec: don't drop blocks marked BLOCK_FLAG_DISCONTINUITY
If blocks are marked BLOCK_FLAG_DISCONTINUITY then do not drop them,
unless BLOCK_FLAGS_CORRUPTED is set. Instead flush old blocks from decoder
queue and restart at this new stream access point (new timeline).

Signed-off-by: Ilkka Ollakka <ileoo@videolan.org>
2015-10-13 08:07:30 +03:00
Rémi Denis-Courmont 85a205b487 adpcm: do not abuse fmt_in.p_extra, fix double free 2015-06-06 18:25:13 +03:00
Rémi Denis-Courmont 2d5099799c adpcm: fix undefined signed shift 2014-06-09 19:58:00 +03:00
Rémi Denis-Courmont ba7cec949d adpcm: clean up and optimize 2014-06-09 19:58:00 +03:00
Daniel Verkamp c7283a4053 Fix Duck DK3/DK4 ADPCM mappings
Also give them VLC_CODEC_ names and use them in the adpcm decoder.

v2: Add codec description strings

Signed-off-by: Rafaël Carré <funman@videolan.org>
2013-11-09 11:08:00 +01:00
Jean-Baptiste Kempf fef270581f LGPL
Re-license almost all the playback modules to LGPLv2.1+ with
authorization from their respective contributors (230+)

This includes:
 - access, codec, packetizers, demux
 - audio filters, audio mixers, audio output
 - video filters, video chroma, video output
 - text renderers
 - XML parser
 - ARM NEON and SSE2 optimisations (mostly for chromas and filters)

Some modules are not concerned:
 - BDA and DShow access modules because Manol Manolov is AWOL
 - Real RTSP, because it is derived from Xine
 - x264 and t140 because they are encoders only
 - DLL Loader, because it is derived from MPlayer
 - DTS packetizer, because Jon Lech Johansen is AWOL
 - Shine and WMAfixed, because they are derived from Rockbox
 - Real demuxer, as it is derived from MPlayer and Wang Bo is AWOL
 - MPC demuxer, as Yavor Doganov is AWOL
 - Tivo demuxer, because it is derived from an MPlayer fork
 - Playlist demuxer, (WPL and ZPL parts missing), because suheaven is AWOL
 - iOS audio output and video display, because author refuses the license change
 - Equalizer and compressor, because Ronald Wright is AWOL
 - Mono, Headphone and Dolby, because author refuses the license change
 - hqdn3d and yadif, because they are from MPlayer/libavfilter
 - remoteosd, because it derives from RealVNC code
 - MMX optimisations, because Ollie Lho, from SiS, is AWOL
 - Rotate, because it depends on GPL motion

Nota Bene:
 - Some modules depend on GPL-only libraries, a LGPL module does not mean
   that the resulting binary module will be LGPL.
   Libraries affected would include liba52, libdvdcss, libdvdnav, libdvdread,
   faad2, libdca, libmad, libmpeg2, libpostproc, SRC, sid, zvbi and probably others.
2012-11-13 16:25:56 +01:00
Rémi Denis-Courmont e2b439cfa1 Replace remaining instances of aout_buffer_t with block_t 2012-05-22 23:21:16 +03:00
Rémi Denis-Courmont c8961f3a00 Remove unneeded #include <vlc_aout.h> 2012-03-06 21:22:56 +02:00
Laurent Aimar a8d9ae66fd Revert "block_t ** parameter is never NULL for audio decoding"
This reverts commit 48e39d4453.

 It is needed to apply the patch allowing to flush the packetizer/decoders
without having to change the API for now.
2011-09-06 20:18:55 +02:00
Rémi Denis-Courmont 48e39d4453 block_t ** parameter is never NULL for audio decoding 2011-08-25 20:07:43 +03:00
Rafaël Carré 6251b2d110 adpcm: use VLC_TS_INVALID (refs #3135) 2009-12-07 08:33:55 +01:00
Rémi Denis-Courmont 38c0878998 aout_buffer_t: store length instead of end timestamp
aout_buffer_t now looks very much like a subset of block_t at the
source code level. By the way, we might want to revisit the return value
of date_Increment()...
2009-09-23 19:57:40 +03:00
Rémi Denis-Courmont 8146a7f0e8 aout_buffer_t.start_data -> aout_buffer_t.i_pts
This will be needed to replace aout_buffer_t with block_t.
We also need to replace end_date with i_length, which is a bit more
involved.
2009-09-23 00:26:56 +03:00
Jean-Baptiste Kempf 7289f1e5bf Use VLC_CODEC for ADPCM_IMA_WAV 2009-08-28 09:18:31 +02:00
Jean-Baptiste Kempf 03609aedd3 Use a VLC_CODEC_ADPCM_MS for MS ADPCM 2009-08-28 09:18:26 +02:00
Laurent Aimar b881303107 Used date_t instead of audio_date_t in codecs. 2009-08-13 21:40:52 +02:00
Laurent Aimar cee16ae695 Replaced AOUT_FMT_*_NE/IE by by VLC_CODEC equivalents. 2009-05-15 22:05:37 +02:00
Rémi Denis-Courmont 0bafd9ff09 Adaptive PCM: set the output category (fixes assertion) 2009-03-14 22:29:50 +02:00
Rémi Denis-Courmont 0549228196 Remove most stray semi-colons in module descriptions
Those multi-lines are still to be done (it's going to be fun...)
See also 5af4cc854b.
2008-10-29 22:14:26 +02:00
Laurent Aimar 17485fb47d Added decoder_NewAudioBuffer/decoder_DeleteAudioBuffer helpers. 2008-10-23 21:31:23 +02:00
Rémi Denis-Courmont d794dd855b Format string fixes 2008-07-03 21:19:21 +03:00
Rémi Denis-Courmont 3ccefd743a Format string fixes 2008-07-03 20:47:02 +03:00