Commit Graph

103 Commits

Author SHA1 Message Date
Steve Lhomme 651ca66cc7 filter_chain: add function to get the current output video context
Similar to how we get the current output video format.
2019-12-02 13:42:15 +01:00
Steve Lhomme 21a11d7370 filter_chain: keep the input video context on Reset
It will be passed to the first filter when it's created.

It is only set when calling filter_chain_Reset() and no filter has been added yet.

We should not be using the filter chain unless filter_chain_Reset() has been called.
2019-12-02 13:42:12 +01:00
Steve Lhomme d4db4b9067 filters: set the input/output video context on video filters
The input context pushed by the decoder (and soon by the preceding filter in chain).

The output context is similar to the output video video context set by the decoder.

The filter should hold a reference to the output video context and release it
when it doesn't need it anymore.
2019-12-02 13:42:12 +01:00
Steve Lhomme 7f4e81b24b filters: add an inline function to get the decoder device by type 2019-12-02 13:42:10 +01:00
Steve Lhomme 6d41261399 filters: provide the decoder device to filter so they can create a video context
Typically used when a CPU to GPU converter is used. It cannot deduce the decoder
device or the video context from the input. Since we are pushing the video
context we don't want to get it from the output/environment either.

When the callback is not provided, a NULL decoder device is returned.
2019-12-02 13:42:10 +01:00
Steve Lhomme 5f29d983b2 filter_chain: remove always NULL parameter from AppendFilter 2019-11-14 08:17:18 +01:00
Steve Lhomme 46b94a5d6c filter_chain: remove always NULL parameter from AppendConverter 2019-11-14 08:17:17 +01:00
Steve Lhomme 684cf993da filter: use a specific type for blend filters
Blend video filters use the pf_video_blend() callback, not to be confused with
video filters using the pf_video_filter() callback and which can be chained.
2019-09-18 09:05:50 +02:00
Steve Lhomme 97ac6ec0ce filter_chain: add a specific function to clear (empty) a filter chain
filter_chain_Reset is reserved for restating new input/output formats and does
not allow empty format anymore.

filter_chain_Clear doesn't change the input/output formats, only remove all the
filters.
2019-09-18 09:05:50 +02:00
Steve Lhomme 66df6e220e filters: allow the filter owner not to provide pictures
In that case the internal allocator of the default allocator are used.
2019-09-18 09:05:49 +02:00
Steve Lhomme b2d1ef6bec filter: allow the owner not to provide a buffer callback
In this case we just allocate a picture from the filter output format.
2019-09-18 09:05:48 +02:00
Steve Lhomme 4bda0d9dae vlc_filter: rename filter_chain_New() to filter_chain_NewSPU()
Similar to filter_chain_NewVideo() as this is the only use of this supposedly
generic function.

Also fix the function documentation.
2019-07-22 11:44:25 +02:00
Rémi Denis-Courmont 250654ce54 filter: remove filter_chain_MouseEvent() no-op 2019-05-15 20:26:33 +03:00
Rémi Denis-Courmont a2b9bf8798 filter: remove unused SPU mouse callback 2019-05-15 20:24:14 +03:00
Rémi Denis-Courmont e3270f2ae4 objects: merge vlc_object_t and vlc_common_members
This should fix historical aliasing issues.
2019-04-14 22:24:33 +03:00
Steve Lhomme 834f031326 filter_chain: filter_chain_GetFmtOut can use a const input 2018-12-11 16:18:06 +01:00
Thomas Guillem 02ed1b6765 filters: removed now unused filter_owner_sys_t type 2018-11-05 16:42:28 +01:00
Steve Lhomme ff56c92a5e rename mtime_t to vlc_tick_t
Keep a copy of vlc_tick_tfor backward compatibility.
2018-06-22 13:19:24 +02:00
Rémi Denis-Courmont 2b7ef42e48 filter: fix copy-paste doc error 2018-06-10 18:56:47 +03:00
Rémi Denis-Courmont 537ef170ca filter: use constant callback structures 2018-06-10 15:37:00 +03:00
Romain Vimont 4c8b741e48 core: replace filter_sys_t* by void*
See #17078

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2018-04-26 01:35:44 +02:00
Rémi Denis-Courmont c3dea95c4a Expand VLC_COMMON_MEMBERS
This is now a one-liner. Expansion helps readability/high-lighting.
2017-12-11 18:55:12 +02:00
Rémi Denis-Courmont 9f74ef90be filter_chain: replace GetLength with IsEmpty
Nothing cares about the actual length if it is non-zero. Also constify.
2017-07-26 21:31:21 +03:00
Steve Lhomme 36da65bb94 vlc_filter.h: add more comment on filter_chain_Reset
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-07-21 14:03:49 +02:00
Thomas Guillem 426710c117 aout: handle viewpoint change via audio filters 2017-07-19 18:06:26 +02:00
Steve Lhomme 0c2508b0a0 filter_chain: pass the ES category to use
This will avoid creating ES with UNKNOWN_ES

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-07-08 18:32:29 +02:00
Jean-Baptiste Kempf 11d731b114 Revert "filter_chain: uniform filter_chain_Append{Converter,Filter} return type"
This reverts commit 40bd2515d9.

There is no need to access to the video filter converter since you can't do
anything with it.
2017-07-02 14:04:27 +02:00
Victorien Le Couviour--Tuffet 6e6eec3970 filter: move filter proxy callbacks system from vout to filter 2017-07-01 18:24:18 +02:00
Victorien Le Couviour--Tuffet 40bd2515d9 filter_chain: uniform filter_chain_Append{Converter,Filter} return type 2017-07-01 18:24:18 +02:00
Thomas Guillem c2a5c39080 filters: add filter name
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-06-01 12:49:48 +02:00
Rémi Denis-Courmont e7eaa33c9c Add filter_chain_AppendConverter() 2016-12-12 20:24:54 +02:00
Rémi Denis-Courmont ba6144f7f4 Remove unused filter_chain_AudioFilter() 2016-12-12 19:41:49 +02:00
Rémi Denis-Courmont c06e3ed9d9 Remove most nested headers from <vlc_filter.h> 2016-11-25 23:07:43 +02:00
Rémi Denis-Courmont f961b58a63 filter: remove filter_chain_New() constant parameter 2016-11-14 20:26:17 +02:00
Rémi Denis-Courmont 830871ab61 filter: unexport filter_chain_New()
Modules use higher-level wrappers, currently filter_chain_NewVideo().
2016-11-14 20:26:17 +02:00
Rémi Denis-Courmont d7cb099f49 filter: merge audio and video flush
The callbacks return nothing (unlike drain), so they can be treated
identically regardless of the ES category.
2015-11-08 13:37:05 +02:00
Rémi Denis-Courmont bde25912f6 filter: document callbacks 2015-11-08 13:33:23 +02:00
Thomas Guillem 9dc41985c9 filter: add pf_audio_flush and pf_audio_drain
pf_audio_flush will flush/reset the state of an audio filter.
pf_audio_drain will drain an audio filter, it'll returns a block_t containing
the drained output.
2015-11-03 16:18:38 +01:00
Hugo Beauzée-Luyssen f2e43bd7ec Subtitle renderers: Merge RenderText & RenderHTML
The current workflow is often parsing a subtitle format, then convert it
in a common HTML and then push it to the renderer as HTML. The renderer
will reparse the HTML and try to render it. Of course, that means that
only one renderer can do that correctly, and so we bloat the freetype
renderer as much as we can.
It also means that we have 2 render callbacks for subtitles, one for
normal text and one for styled text, and we sometimes reparse the HTML
to remove the tags, for the first.

We now only use a text_segment, with new segments at every style change;
an unique render function and the renderer can decide to honor or not
the style.

It's a big commit, so regressions can arise, but it was tested for most
common cases.
2015-07-28 16:01:33 +02:00
Rémi Denis-Courmont aee51fec5a include: add/fix more Doxygen groups 2015-06-14 23:25:38 +03:00
Rémi Denis-Courmont a17b85a5a9 Fix some Doxygen parameter names 2015-06-14 19:04:50 +03:00
Rémi Denis-Courmont 4ee1038059 include: improve Doxygen modules
In particular, move \file stanzas inside groups.
2015-06-14 19:04:50 +03:00
Rémi Denis-Courmont 3512e4087e spu: remove filter_DeleteSubpicture()
This is only used in error corner cases, and is always the same as
calling subpicture_Delete() directly.
2014-10-30 17:26:43 +02:00
Rémi Denis-Courmont dfae0979f0 filter: remove filter_DeletePicture()
All variants of the filter_t.video.buffer_del callback invoke
picture_Release() - possibly through recursion.

Most filters used picture_Release() directly already.
2014-10-30 17:26:38 +02:00
Rémi Denis-Courmont ed1879cb1f filter_chain: inline filter_chain_DeleteFilter() and drop return value 2014-07-29 00:54:10 +03:00
Rémi Denis-Courmont d6e6460d38 filter_chain: introduce dedicated filter_chain_NewVideo() for video filters
Also remove the filter chain buffer functions update hack, keep constant
callbacks for video filters in the filter chain, remove now useless
parameters from filter_chain_New(), and inline
filter_chain_AppendFilterInternal().
2014-07-29 00:42:37 +03:00
Rémi Denis-Courmont 6650b32164 spu: fix ugly cast in filter chain (and unexport function) 2014-07-29 00:25:10 +03:00
Rémi Denis-Courmont 0a5922714a filter_chain: add filter_chain_ForEach() helper 2014-07-28 23:16:30 +03:00
Rémi Denis-Courmont 398cabc620 filter: separate owner structure from the filter itself 2014-07-28 23:14:26 +03:00
Rémi Denis-Courmont b2c7e1447f audio filters: remove old filter_NewAudioBuffer() 2013-03-01 17:59:56 +02:00