* modules/codec/vorbis.c,flac.c,theora.c,speex.c: use encoder if forced.
/* Module properties */
module_t * p_module;
encoder_sys_t * p_sys;
+ vlc_bool_t b_force;
block_t * ( * pf_header )( encoder_t * );
block_t * ( * pf_encode_video )( encoder_t *, picture_t * );
/* Properties of the output of the encoder */
es_format_t fmt_out;
- /* Number of threads to use during encoding */
- int i_threads;
+ /* Common encoder options */
+ int i_threads; /* Number of threads to use during encoding */
+ int i_iframes; /* One I frame per i_iframes */
+ int i_bframes; /* One B frame per i_bframes */
+ int i_tolerance; /* Bitrate tolerance */
/* Encoder config */
sout_cfg_t *p_cfg;
* flac.c: flac decoder/packetizer/encoder module making use of libflac
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: flac.c,v 1.9 2004/02/25 17:48:52 fenrir Exp $
+ * $Id$
*
- * Authors: Gildas Bazin <gbazin@netcourrier.com>
+ * Authors: Gildas Bazin <gbazin@videolan.org>
* Sigmund Augdal <sigmunau@idi.ntnu.no>
*
* This program is free software; you can redistribute it and/or modify
encoder_t *p_enc = (encoder_t *)p_this;
encoder_sys_t *p_sys;
- if( p_enc->fmt_out.i_codec != VLC_FOURCC('f','l','a','c') )
+ if( p_enc->fmt_out.i_codec != VLC_FOURCC('f','l','a','c') &&
+ !p_enc->b_force )
{
return VLC_EGENERIC;
}
}
p_enc->p_sys = p_sys;
p_enc->pf_encode_audio = Encode;
+ p_enc->fmt_out.i_codec = VLC_FOURCC('f','l','a','c');
+
p_sys->i_headers = 0;
p_sys->p_buffer = 0;
p_sys->i_buffer = 0;
SpeexMode *p_speex_mode = &speex_nb_mode;
int i_quality;
- if( p_enc->fmt_out.i_codec != VLC_FOURCC('s','p','x',' ') )
+ if( p_enc->fmt_out.i_codec != VLC_FOURCC('s','p','x',' ') &&
+ !p_enc->b_force )
{
return VLC_EGENERIC;
}
p_enc->pf_header = Headers;
p_enc->pf_encode_audio = Encode;
p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
+ p_enc->fmt_out.i_codec = VLC_FOURCC('s','p','x',' ');
speex_init_header( &p_sys->header, p_enc->fmt_in.audio.i_rate,
1, p_speex_mode );
encoder_t *p_enc = (encoder_t *)p_this;
encoder_sys_t *p_sys = p_enc->p_sys;
- if( p_enc->fmt_out.i_codec != VLC_FOURCC('t','h','e','o') )
+ if( p_enc->fmt_out.i_codec != VLC_FOURCC('t','h','e','o') &&
+ !p_enc->b_force )
{
return VLC_EGENERIC;
}
p_enc->pf_header = Headers;
p_enc->pf_encode_video = Encode;
p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
+ p_enc->fmt_out.i_codec = VLC_FOURCC('t','h','e','o');
#define frame_x_offset 0
#define frame_y_offset 0
*****************************************************************************/
#include <vlc/vlc.h>
#include <vlc/decoder.h>
+#include <vlc/sout.h>
#include <ogg/ogg.h>
encoder_t *p_enc = (encoder_t *)p_this;
encoder_sys_t *p_sys;
- if( p_enc->fmt_out.i_codec != VLC_FOURCC('v','o','r','b') )
+ if( p_enc->fmt_out.i_codec != VLC_FOURCC('v','o','r','b') &&
+ !p_enc->b_force )
{
return VLC_EGENERIC;
}
p_enc->pf_header = Headers;
p_enc->pf_encode_audio = Encode;
p_enc->fmt_in.i_codec = VLC_FOURCC('f','l','3','2');
+ p_enc->fmt_out.i_codec = VLC_FOURCC('v','o','r','b');
/* Initialize vorbis encoder */
vorbis_info_init( &p_sys->vi );
id->p_encoder->fmt_out.i_bitrate = id->f_dst.i_bitrate;
id->p_encoder->p_cfg = p_stream->p_sys->p_audio_cfg;
+ if( p_stream->p_sys->psz_aenc &&
+ *p_stream->p_sys->psz_aenc ) id->p_encoder->b_force = VLC_TRUE;
/* Attach object to parent so object variables inheritance works */
vlc_object_attach( id->p_encoder, p_stream );
id->p_vresample = NULL;
id->p_encoder->p_cfg = p_sys->p_video_cfg;
+ if( p_stream->p_sys->psz_venc &&
+ *p_stream->p_sys->psz_venc ) id->p_encoder->b_force = VLC_TRUE;
/* Attach object to parent so object variables inheritance works */
vlc_object_attach( id->p_encoder, p_stream );