*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <vlc/vlc.h>
-#include <vlc/decoder.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_codec.h>
#include <ogg/ogg.h>
/* FIXME */
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-vlc_module_begin();
- set_description( _("Tarkin decoder module") );
- set_capability( "decoder", 100 );
- set_category( CAT_INPUT );
- set_subcategory( SUBCAT_INPUT_VCODEC );
- set_callbacks( OpenDecoder, CloseDecoder );
- add_shortcut( "tarkin" );
-vlc_module_end();
+vlc_module_begin ()
+ set_description( N_("Tarkin decoder") )
+ set_capability( "decoder", 100 )
+ set_category( CAT_INPUT )
+ set_subcategory( SUBCAT_INPUT_VCODEC )
+ set_callbacks( OpenDecoder, CloseDecoder )
+ add_shortcut( "tarkin" )
+vlc_module_end ()
/*****************************************************************************
* OpenDecoder: probe the decoder and return score
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
- if( p_dec->fmt_in.i_codec != VLC_FOURCC('t','a','r','k') )
+ if( p_dec->fmt_in.i_codec != VLC_CODEC_TARKIN )
{
return VLC_EGENERIC;
}
/* Allocate the memory needed to store the decoder's structure */
if( ( p_dec->p_sys = p_sys =
(decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
- {
- msg_Err( p_dec, "out of memory" );
- return VLC_EGENERIC;
- }
+ return VLC_ENOMEM;
/* Set output properties */
p_dec->fmt_out.i_cat = VIDEO_ES;
if( tarkin_synthesis_headerin( &p_sys->ti, &p_sys->tc, &oggpacket )
< 0 )
{
- msg_Err( p_dec, "This bitstream does not contain Tarkin "
+ msg_Err( p_dec, "this bitstream does not contain Tarkin "
"video data.");
block_Release( p_block );
return NULL;
switch( p_sys->tarkin_stream->layer->desc.format )
{
case TARKIN_RGB24:
- i_chroma = VLC_FOURCC('R','V','2','4');
+ i_chroma = VLC_CODEC_RGB24;
i_stride = i_width * 3;
break;
case TARKIN_RGB32:
- i_chroma = VLC_FOURCC('R','V','3','2');
+ i_chroma = VLC_CODEC_RGB32;
i_stride = i_width * 4;
break;
case TARKIN_RGBA:
- i_chroma = VLC_FOURCC('R','G','B','A');
+ i_chroma = VLC_CODEC_RGBA;
i_stride = i_width * 4;
break;
default:
- i_chroma = VLC_FOURCC('I','4','2','0');
+ i_chroma = VLC_CODEC_I420;
i_stride = i_width;
break;
}
p_dec->fmt_out.i_codec = i_chroma;
/* Get a new picture */
- if( (p_pic = p_dec->pf_vout_buffer_new( p_dec )) )
+ if( (p_pic = decoder_NewPicture( p_dec )) )
{
tarkin_CopyPicture( p_dec, p_pic, rgb, i_stride );
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_stride );
+ vlc_memcpy( p_dst, p_src, i_src_stride );
p_src += i_src_stride;
p_dst += i_dst_stride;