1 /* 2 ** Copyright (C) 2008-2018 Erik de Castro Lopo <erikd@mega-nerd.com> 3 ** Copyright (C) 2018 Arthur Taylor <art@ified.ca> 4 ** 5 ** This program is free software ; you can redistribute it and/or modify 6 ** it under the terms of the GNU Lesser General Public License as published by 7 ** the Free Software Foundation ; either version 2.1 of the License, or 8 ** (at your option) any later version. 9 ** 10 ** This program is distributed in the hope that it will be useful, 11 ** but WITHOUT ANY WARRANTY ; without even the implied warranty of 12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 ** GNU Lesser General Public License for more details. 14 ** 15 ** You should have received a copy of the GNU Lesser General Public License 16 ** along with this program ; if not, write to the Free Software 17 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20 #ifndef SF_SRC_OGG_VCOMMENT_H 21 #define SF_SRC_OGG_VCOMMENT_H 22 23 /* 24 ** Voriscomment identifier. Some Ogg stream embedding schemes require it. 25 */ 26 typedef struct 27 { const char *ident ; 28 int length ; 29 } vorbiscomment_ident ; 30 31 /* 32 ** Read all vorbiscomment tags from *packet. Tags which match ones used 33 ** by libsndfile strings are loaded into *psf. Ogg streams which require an 34 ** identifier for the tags packet should pass it in *ident. 35 */ 36 int vorbiscomment_read_tags (SF_PRIVATE *psf, ogg_packet *packet, vorbiscomment_ident *ident) ; 37 38 /* 39 ** Write metadata strings stored in *psf to *packet. The packet is optionally 40 ** prefixed with *ident. The always-present vendor field should be the library 41 ** used for encoding the audio data. 42 */ 43 int vorbiscomment_write_tags (SF_PRIVATE *psf, ogg_packet *packet, vorbiscomment_ident *ident, const char *vendor, int targetsize) ; 44 45 #endif /* SF_SRC_OGG_VCOMMENT_H */ 46