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>
Adds support in Media Foundation (MFT) module to use decoders whose FCC is
not found from the hardcoded list. Improves compatibility and adds support
for common uncompressed formats decoders might prefer.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
The skins2 thread as a Gui interface uses OLE/COM set up as 'appartment threaded' for DragNDrop. This thread also uses the vlc decoding facilities to decode still images and therefore is likely to probe decoder modules.
Calling CoInitializeEx() in multithreaded mode is not compatible with the already 'appartment threaded' setting, and therefore fails. In debug mode, this causes an unreachable assert. In non debug mode, the Open() is executed, fails and calls an undue CoUninitialize() which silently breaks the whole OLE setting of the thread.
The patch just gracefully returns on failure.
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.
If there is a palette we don't want to use the same pointer otherwise there
will be a double free.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
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.
Decoder modules are now responsible for calling decoder_UpdateVideoFormat()
before decoder_NewPicture().
In a lot of modules, decoder_UpdateVideoFormat() could be called in a better
place. Just after dec->fmt_out is updated for example.
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.
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>
When needed (fmt->b_packetized == false), create a packetizer before creating a
decoder. The fmt_in of the decoder is copied either from the fmt_out of the
packetizer, or from the fmt of CreateDecoder.
The input stream id is completely unrelated to the input
sample buffer index - the sample allocated in AllocateInputSample
contains one single media buffer, at index 0.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Media Foundation is a framework for encoding/decoding multimedia
content on Windows Vista and above. A Media Foundation Transform (MFT)
is a module implementing an encoder, a decoder or a filter.
MFTs can be enumerated and initialized using the function MFTEnumEx.
A MFT can be SW or HW, synchronous or asynchronous.