1 /* -*- c-basic-offset: 8; -*- */ 2 /* format_ogg.h: Internal shout interface to Ogg codec handlers 3 * $Id$ 4 * 5 * Copyright (C) 2004 the Icecast team <team@icecast.org> 6 * Copyright (C) 2015-2019 Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org> 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Library General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Library General Public License for more details. 17 * 18 * You should have received a copy of the GNU Library General Public 19 * License along with this library; if not, write to the Free 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 */ 22 23 #ifndef __LIBSHOUT_FORMAT_OGG_H__ 24 #define __LIBSHOUT_FORMAT_OGG_H__ 25 26 #ifdef HAVE_CONFIG_H 27 # include <config.h> 28 #endif 29 30 #include <stdlib.h> 31 32 #include <ogg/ogg.h> 33 34 typedef struct _ogg_codec_tag { 35 ogg_stream_state os; 36 37 unsigned int headers; 38 uint64_t senttime; 39 40 void *codec_data; 41 int (*read_page)(struct _ogg_codec_tag *codec, ogg_page *page); 42 void (*free_data)(void *codec_data); 43 44 struct _ogg_codec_tag *next; 45 } ogg_codec_t; 46 47 /* codec hooks */ 48 int _shout_open_vorbis(ogg_codec_t *codec, ogg_page *page); 49 50 #ifdef HAVE_THEORA 51 int _shout_open_theora(ogg_codec_t *codec, ogg_page *page); 52 #endif 53 54 #ifdef HAVE_SPEEX 55 int _shout_open_speex(ogg_codec_t *codec, ogg_page *page); 56 #endif 57 58 int _shout_open_opus(ogg_codec_t *codec, ogg_page *page); 59 60 #endif 61