1 #define PERL_NO_GET_CONTEXT
8 /* op_free is both Perl_op_free and a function in opusfile */
10 #include <opus/opusfile.h>
12 #include "const-c.inc"
14 MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile PREFIX = op_
25 RETVAL = op_open_file(path, &err);
27 croak("op_open_file returned error %d\n", err);
47 MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile::Tags PREFIX = opus_tags_
50 opus_tags_query_count(tags, tag)
55 opus_tags_query(tags, tag, count = 0)
60 MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile::PictureTag PREFIX = opus_picture_tag_
63 opus_picture_tag_parse(tag)
69 Newx(pic, 1, OpusPictureTag);
70 if(err = opus_picture_tag_parse(pic, tag))
71 croak("opus_picture_tag_parse returned error %d\n", err);
78 const OpusPictureTag* pic
84 const OpusPictureTag *pic;
92 const OpusPictureTag *pic;
94 RETVAL = pic->mime_type;
100 const OpusPictureTag *pic;
102 RETVAL = pic->description;
108 const OpusPictureTag *pic;
116 const OpusPictureTag *pic;
118 RETVAL = pic->height;
124 const OpusPictureTag *pic;
132 const OpusPictureTag *pic;
134 RETVAL = pic->colors;
140 const OpusPictureTag *pic;
142 RETVAL = pic->data_length;
148 const OpusPictureTag *pic;
150 RETVAL = newSVpvn(pic->data, pic->data_length);
156 const OpusPictureTag *pic;
158 RETVAL = pic->format;
162 MODULE = Audio::Opusfile PACKAGE = Audio::Opusfile::Head
166 const OpusHead* head;
168 RETVAL = head->version;
174 const OpusHead* head;
176 RETVAL = head->channel_count;
182 const OpusHead* head;
184 RETVAL = head->pre_skip;
189 input_sample_rate(head)
190 const OpusHead* head;
192 RETVAL = head->input_sample_rate;
198 const OpusHead* head;
200 RETVAL = head->mapping_family;
206 const OpusHead* head;
208 RETVAL = head->stream_count;
214 const OpusHead* head;
216 RETVAL = head->coupled_count;
222 const OpusHead* head;
225 RETVAL = (int) head->mapping[k];