X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=Opusfile.xs;h=6a5f55da6f2148f3303cc97fe552abcd71cb5ecd;hb=2f4b5b1be44a659661b40871a41b9e3c40539498;hp=c1f6353e51b25437fc90033f47c3103e5f55ef0b;hpb=77f5c7e4df6e22c6ae2f23aaf6a7a4062b0e9ba6;p=audio-opusfile.git diff --git a/Opusfile.xs b/Opusfile.xs index c1f6353..6a5f55d 100644 --- a/Opusfile.xs +++ b/Opusfile.xs @@ -56,3 +56,172 @@ opus_tags_query(tags, tag, count = 0) const OpusTags* tags; const char* tag; int count; + +MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile::PictureTag PREFIX = opus_picture_tag_ + +const OpusPictureTag* +opus_picture_tag_parse(tag) + const char *tag; +PREINIT: + OpusPictureTag *pic; + int err; +CODE: + Newx(pic, 1, OpusPictureTag); + if(err = opus_picture_tag_parse(pic, tag)) + croak("opus_picture_tag_parse returned error %d\n", err); + RETVAL = pic; +OUTPUT: + RETVAL + +void +DESTROY(pic) + const OpusPictureTag* pic +CODE: + Safefree(pic); + +int +type(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->type; +OUTPUT: + RETVAL + +const char* +mime_type(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->mime_type; +OUTPUT: + RETVAL + +const char* +description(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->description; +OUTPUT: + RETVAL + +int +width(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->width; +OUTPUT: + RETVAL + +int +height(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->height; +OUTPUT: + RETVAL + +int +depth(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->depth; +OUTPUT: + RETVAL + +int +colors(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->colors; +OUTPUT: + RETVAL + +int +data_length(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->data_length; +OUTPUT: + RETVAL + +SV* +data(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = newSVpvn(pic->data, pic->data_length); +OUTPUT: + RETVAL + +int +format(pic) + const OpusPictureTag *pic; +CODE: + RETVAL = pic->format; +OUTPUT: + RETVAL + +MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile::Head + +int +version(head) + const OpusHead* head; +CODE: + RETVAL = head->version; +OUTPUT: + RETVAL + +int +channel_count(head) + const OpusHead* head; +CODE: + RETVAL = head->channel_count; +OUTPUT: + RETVAL + +unsigned +pre_skip(head) + const OpusHead* head; +CODE: + RETVAL = head->pre_skip; +OUTPUT: + RETVAL + +unsigned +input_sample_rate(head) + const OpusHead* head; +CODE: + RETVAL = head->input_sample_rate; +OUTPUT: + RETVAL + +int +mapping_family(head) + const OpusHead* head; +CODE: + RETVAL = head->mapping_family; +OUTPUT: + RETVAL + +int +stream_count(head) + const OpusHead* head; +CODE: + RETVAL = head->stream_count; +OUTPUT: + RETVAL + +int +coupled_count(head) + const OpusHead* head; +CODE: + RETVAL = head->coupled_count; +OUTPUT: + RETVAL + +int +mapping(head, k) + const OpusHead* head; + int k; +CODE: + RETVAL = (int) head->mapping[k]; +OUTPUT: + RETVAL