Commit 6c643e6f authored by Filip Roséen's avatar Filip Roséen Committed by Thomas Guillem

stream_extractor: enable cache for block based extractors

In order to extract an entity from a stream, some heavy lifting is normally
required, as such it makes sense to cache data coming out from a
stream_extractor in order to save CPU (and more importantly battery life on
mobile devices).

This will especially make a big impact when block-based stream_extractors are
used, since they will not be asked to potentially regenerate the same block
data over and over.
parent 669756d1
......@@ -272,6 +272,11 @@ se_AttachWrapper( struct stream_extractor_private* priv, stream_t* source )
priv->source = source;
if( priv->wrapper->pf_read )
priv->wrapper = stream_FilterChainNew( priv->wrapper, "cache_read" );
else if( priv->wrapper->pf_block )
priv->wrapper = stream_FilterChainNew( priv->wrapper, "cache_block" );
return VLC_SUCCESS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment