Ogg-Theora-LibTheora

 view release on metacpan or  search on metacpan

LibTheora.xs  view on Meta::CPAN

=cut
void
LibTheora_th_decode_headerin(_info, _tc, _setup_addr, _op)
    th_info *		_info
    th_comment *	_tc
    int      		_setup_addr
    ogg_packet *  	_op
  PREINIT:
    int status;
    th_setup_info *_setup;
  PPCODE:
    _setup = (th_setup_info *) _setup_addr;
    status = th_decode_headerin(_info, _tc, &_setup, _op);
    XPUSHs(sv_2mortal(newSViv(status)));
    XPUSHs(sv_2mortal(newSViv((unsigned int) _setup)));


=head2 th_decode_alloc

Allocates a decoder instance. 

LibTheora.xs  view on Meta::CPAN

  TH_EIMPL video data uses bitstream features which this library does not support.

=cut
void
LibTheora_th_decode_packetin(_dec, _op, _granpos)
    th_dec_ctx *	_dec
    ogg_packet *	_op
    unsigned int	_granpos
  PREINIT:
    int status;
  PPCODE:
    status = th_decode_packetin(_dec, _op, (ogg_int64_t *) &_granpos);
    XPUSHs(sv_2mortal(newSViv(status)));
    XPUSHs(sv_2mortal(newSViv((unsigned int) _granpos)));
 

=head2 th_decode_ycbcr_out

Outputs the next available frame of decoded Y'CbCr data. 

-Input:

LibTheora.xs  view on Meta::CPAN


-Output:
  array of comments

=cut
void
LibTheora_get_th_comment(_tc)
    th_comment *	_tc
  PREINIT:
    int i = 0;
  PPCODE:
    EXTEND(SP, _tc->comments);
    for(i=0; i < _tc->comments; i++) {
      PUSHs((SV *)sv_2mortal(newSVpv(_tc->user_comments[i], strlen(_tc->user_comments[i]))));
    }


=head2 set_th_info

sets the th_info structure to default values unless specified in hash. frame_width and frame_height
is mandatory.



( run in 0.707 second using v1.01-cache-2.11-cpan-5511b514fd6 )