/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <vlc/vlc.h>
-#include <vlc/decoder.h>
-#include <vlc/input.h>
-#include <vlc/sout.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <vlc/vlc.h>
+#include <vlc_codec.h>
+#include <vlc_vout.h>
+#include <vlc_sout.h>
+#include <vlc_input.h>
#include <ogg/ogg.h>
#include <theora/theora.h>
*****************************************************************************/
#define ENC_QUALITY_TEXT N_("Encoding quality")
#define ENC_QUALITY_LONGTEXT N_( \
- "Enfore a quality between 1 (low) and 10 (high), instead " \
+ "Enforce a quality between 1 (low) and 10 (high), instead " \
"of specifying a particular bitrate. This will produce a VBR stream." )
vlc_module_begin();
set_description( _("Theora video packetizer") );
set_capability( "packetizer", 100 );
set_callbacks( OpenPacketizer, CloseDecoder );
- add_shortcut( "theora" );
add_submodule();
set_description( _("Theora video encoder") );
set_capability( "encoder", 150 );
set_callbacks( OpenEncoder, CloseEncoder );
- add_shortcut( "theora" );
# define ENC_CFG_PREFIX "sout-theora-"
add_integer( ENC_CFG_PREFIX "quality", 2, NULL, ENC_QUALITY_TEXT,
p_dec->fmt_in.p_extra =
realloc( p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra +
oggpacket.bytes + 2 );
- p_extra = p_dec->fmt_in.p_extra + p_dec->fmt_in.i_extra;
+ p_extra = ((uint8_t *)p_dec->fmt_in.p_extra) + p_dec->fmt_in.i_extra;
*(p_extra++) = oggpacket.bytes >> 8;
*(p_extra++) = oggpacket.bytes & 0xFF;
if( theora_decode_header( &p_sys->ti, &p_sys->tc, &oggpacket ) < 0 )
{
- msg_Err( p_dec, "This bitstream does not contain Theora video data" );
+ msg_Err( p_dec, "this bitstream does not contain Theora video data" );
return VLC_EGENERIC;
}
if( p_sys->ti.aspect_denominator && p_sys->ti.aspect_numerator )
{
p_dec->fmt_out.video.i_aspect = ((int64_t)VOUT_ASPECT_FACTOR) *
- ( p_sys->ti.aspect_numerator * p_sys->ti.width ) /
- ( p_sys->ti.aspect_denominator * p_sys->ti.height );
+ ( p_sys->ti.aspect_numerator * p_dec->fmt_out.video.i_width ) /
+ ( p_sys->ti.aspect_denominator * p_dec->fmt_out.video.i_height );
}
else
{
*psz_value = '\0';
psz_value++;
input_Control( p_input, INPUT_ADD_INFO, _("Theora comment"),
- psz_name, psz_value );
+ psz_name, "%s", psz_value );
}
free( psz_comment );
i++;
i_src_yoffset /= 2;
}
- p_src += (i_src_yoffset * i_src_stride + i_src_yoffset);
+ p_src += (i_src_yoffset * i_src_stride + i_src_xoffset);
for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
{
- p_dec->p_vlc->pf_memcpy( p_dst, p_src + i_src_xoffset,
+ p_dec->p_libvlc->pf_memcpy( p_dst, p_src + i_src_xoffset,
i_plane ? yuv->uv_width : yuv->y_width );
p_src += i_src_stride;
p_dst += i_dst_stride;
p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
p_enc->fmt_out.i_codec = VLC_FOURCC('t','h','e','o');
- sout_CfgParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
+ config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
var_Get( p_enc, ENC_CFG_PREFIX "quality", &val );
i_quality = val.i_int;