Changeset 57d88c823edb427bdba7ed9d77da707064d90f2e

Show
Ignore:
Timestamp:
04/06/08 13:14:12 (4 months ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1212578052 +0200
git-parent:

[69c6803c9cdf2232a76903722a542e26146e7d51]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1212525846 +0200
Message:

New filter chain handling API. This should make it possible to factorize
a lot of code everywhere a filter_t chain is used ("video filter2":
vout core, transcode, chain.c video filter; "sub filter": spu_Init;
"audio filter2": transcode; the other types of filter_t objects are
never chained)

Btw, why aren't "audio filter2" filters used anywhere in the aout core?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_filter.h

    r218efb9 r57d88c8  
    11/***************************************************************************** 
    2  * vlc_filter.h: filter related structures 
     2 * vlc_filter.h: filter related structures and functions 
    33 ***************************************************************************** 
    4  * Copyright (C) 1999-2003 the VideoLAN team 
     4 * Copyright (C) 1999-2008 the VideoLAN team 
    55 * $Id$ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@videolan.org> 
     8 *          Antoine Cellerier <dionoea at videolan dot org> 
    89 * 
    910 * This program is free software; you can redistribute it and/or modify 
     
    5657    /* Output format of filter */ 
    5758    es_format_t         fmt_out; 
     59    bool                b_allow_fmt_out_change; 
    5860 
    5961    /* Filter configuration */ 
     
    8284    picture_t     * ( * pf_vout_buffer_new) ( filter_t * ); 
    8385    void            ( * pf_vout_buffer_del) ( filter_t *, picture_t * ); 
    84     void            ( * pf_picture_link)    ( picture_t * ); 
    85     void            ( * pf_picture_unlink)  ( picture_t * ); 
     86    /* void            ( * pf_picture_link)    ( picture_t * ); 
     87    void            ( * pf_picture_unlink)  ( picture_t * ); */ 
    8688 
    8789    /* SPU output callbacks */ 
     
    126128    } 
    127129 
     130/** 
     131 * Filter chain management API 
     132 */ 
     133 
     134typedef struct filter_chain_t filter_chain_t; 
     135 
     136VLC_EXPORT( filter_chain_t *, __filter_chain_New, ( vlc_object_t *, const char *, bool, int (*)( filter_t *, void * ), void (*)( filter_t * ), void *  ) ); 
     137#define filter_chain_New( a, b, c, d, e, f ) __filter_chain_New( VLC_OBJECT( a ), b, c, d, e, f ) 
     138VLC_EXPORT( void, filter_chain_Delete, ( filter_chain_t * ) ); 
     139VLC_EXPORT( void, filter_chain_Reset, ( filter_chain_t *, const es_format_t *, const es_format_t * ) ); 
     140 
     141VLC_EXPORT( filter_t *, filter_chain_AppendFilter, ( filter_chain_t *, const char *, config_chain_t *, const es_format_t *, const es_format_t * ) ); 
     142VLC_EXPORT( int, filter_chain_AppendFromString, ( filter_chain_t *, const char * ) ); 
     143VLC_EXPORT( int, filter_chain_DeleteFilter, ( filter_chain_t *, filter_t * ) ); 
     144 
     145VLC_EXPORT( filter_t *, filter_chain_GetFilter, ( filter_chain_t *, int, const char * ) ); 
     146VLC_EXPORT( int, filter_chain_GetLength, ( filter_chain_t * ) ); 
     147VLC_EXPORT( const es_format_t *, filter_chain_GetFmtOut, ( filter_chain_t * ) ); 
     148 
     149/** 
     150 * Apply the filter chain 
     151 */ 
     152VLC_EXPORT( picture_t *, filter_chain_VideoFilter, ( filter_chain_t *, picture_t * ) ); 
     153VLC_EXPORT( block_t *, filter_chain_AudioFilter, ( filter_chain_t *, block_t * ) ); 
     154VLC_EXPORT( void, filter_chain_SubFilter, ( filter_chain_t *, mtime_t ) ); 
     155 
    128156#endif /* _VLC_FILTER_H */ 
  • src/Makefile.am

    rb46ba41 r57d88c8  
    363363    misc/devices.c \ 
    364364    extras/libc.c \ 
     365    misc/filter_chain.c \ 
    365366    $(NULL) 
    366367 
  • src/libvlccore.sym

    r53c7457 r57d88c8  
    9494EnsureUTF8 
    9595filename_sanitize 
     96filter_chain_AppendFilter 
     97filter_chain_AppendFromString 
     98filter_chain_AudioFilter 
     99filter_chain_Delete 
     100filter_chain_DeleteFilter 
     101filter_chain_GetFilter 
     102filter_chain_GetFmtOut 
     103filter_chain_GetLength 
     104__filter_chain_New 
     105filter_chain_Reset 
     106filter_chain_SubFilter 
     107filter_chain_VideoFilter 
    96108FromLocale 
    97109FromLocaleDup