00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef VLC_CODEC_H
00025 #define VLC_CODEC_H 1
00026
00027 #include <vlc_block.h>
00028 #include <vlc_es.h>
00029
00030
00031
00032
00033
00034
00035 typedef struct decoder_owner_sys_t decoder_owner_sys_t;
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 struct decoder_t
00051 {
00052 VLC_COMMON_MEMBERS
00053
00054
00055 module_t * p_module;
00056 decoder_sys_t * p_sys;
00057
00058
00059 es_format_t fmt_in;
00060
00061
00062 es_format_t fmt_out;
00063
00064
00065 bool b_need_packetized;
00066
00067
00068 bool b_pace_control;
00069
00070
00071 picture_t * ( * pf_decode_video )( decoder_t *, block_t ** );
00072 aout_buffer_t * ( * pf_decode_audio )( decoder_t *, block_t ** );
00073 subpicture_t * ( * pf_decode_sub) ( decoder_t *, block_t ** );
00074 block_t * ( * pf_packetize ) ( decoder_t *, block_t ** );
00075
00076
00077
00078
00079
00080
00081
00082 block_t * ( * pf_get_cc ) ( decoder_t *, bool pb_present[4] );
00083
00084
00085
00086
00087
00088
00089 aout_buffer_t * ( * pf_aout_buffer_new) ( decoder_t *, int );
00090 void ( * pf_aout_buffer_del) ( decoder_t *, aout_buffer_t * );
00091
00092
00093 picture_t * ( * pf_vout_buffer_new) ( decoder_t * );
00094 void ( * pf_vout_buffer_del) ( decoder_t *, picture_t * );
00095 void ( * pf_picture_link) ( decoder_t *, picture_t * );
00096 void ( * pf_picture_unlink) ( decoder_t *, picture_t * );
00097
00098
00099 subpicture_t * ( * pf_spu_buffer_new) ( decoder_t * );
00100 void ( * pf_spu_buffer_del) ( decoder_t *, subpicture_t * );
00101
00102
00103 decoder_owner_sys_t *p_owner;
00104 };
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118 struct encoder_t
00119 {
00120 VLC_COMMON_MEMBERS
00121
00122
00123 module_t * p_module;
00124 encoder_sys_t * p_sys;
00125
00126
00127 es_format_t fmt_in;
00128
00129
00130 es_format_t fmt_out;
00131
00132 block_t * ( * pf_encode_video )( encoder_t *, picture_t * );
00133 block_t * ( * pf_encode_audio )( encoder_t *, aout_buffer_t * );
00134 block_t * ( * pf_encode_sub )( encoder_t *, subpicture_t * );
00135
00136
00137 int i_threads;
00138 int i_iframes;
00139 int i_bframes;
00140 int i_tolerance;
00141
00142
00143 config_chain_t *p_cfg;
00144 };
00145
00146
00147
00148
00149
00150 VLC_EXPORT( input_attachment_t *, decoder_GetInputAttachment, ( decoder_t *, const char *psz_name ) );
00151 VLC_EXPORT( int, decoder_GetInputAttachments, ( decoder_t *p_dec, input_attachment_t ***ppp_attachment, int *pi_attachment ) );
00152 VLC_EXPORT( mtime_t, decoder_GetDisplayDate, ( decoder_t *, mtime_t ) );
00153
00154 #endif