Blame include/oggz/oggz_deprecated.h

Packit a38265
/*
Packit a38265
   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
Packit a38265
   Organisation (CSIRO) Australia
Packit a38265
Packit a38265
   Redistribution and use in source and binary forms, with or without
Packit a38265
   modification, are permitted provided that the following conditions
Packit a38265
   are met:
Packit a38265
Packit a38265
   - Redistributions of source code must retain the above copyright
Packit a38265
   notice, this list of conditions and the following disclaimer.
Packit a38265
Packit a38265
   - Redistributions in binary form must reproduce the above copyright
Packit a38265
   notice, this list of conditions and the following disclaimer in the
Packit a38265
   documentation and/or other materials provided with the distribution.
Packit a38265
Packit a38265
   - Neither the name of CSIRO Australia nor the names of its
Packit a38265
   contributors may be used to endorse or promote products derived from
Packit a38265
   this software without specific prior written permission.
Packit a38265
Packit a38265
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Packit a38265
   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Packit a38265
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
Packit a38265
   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
Packit a38265
   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
Packit a38265
   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
Packit a38265
   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
Packit a38265
   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
Packit a38265
   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
Packit a38265
   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
Packit a38265
   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit a38265
*/
Packit a38265
Packit a38265
#ifndef __OGGZ_DEPRECATED_H__
Packit a38265
#define __OGGZ_DEPRECATED_H__
Packit a38265
Packit a38265
/** \file
Packit a38265
 * Deprecated interfaces
Packit a38265
 */
Packit a38265
Packit a38265
/**
Packit a38265
 * DEPRECATED CONSTANT.
Packit a38265
 * OGGZ_ERR_USER_STOPPED was introduced during development (post 0.8.3),
Packit a38265
 * and is similar in functionality to and numerically equal to (ie. ABI
Packit a38265
 * compatible with) OGGZ_ERR_STOP_OK in <oggz/oggz_constants.h>.
Packit a38265
 * It was badly named, as the preferred functionality distinguishes between
Packit a38265
 * a user's OggzReadCallback returning OGGZ_STOP_OK or OGGZ_STOP_ERR; your
Packit a38265
 * code should distinguish between these two too :-) Hence, don't use this
Packit a38265
 * (unreleased) name in new code.
Packit a38265
 */
Packit a38265
#define OGGZ_ERR_USER_STOPPED OGGZ_ERR_STOP_OK
Packit a38265
Packit a38265
/**
Packit a38265
 * DEPRECATED CONSTANT.
Packit a38265
 * OGGZ_ERR_READ_STOP_OK, OGGZ_ERR_READ_STOP_ERR were introduced to allow
Packit a38265
 * the user to differentiate between a cancelled oggz_read_*() returning
Packit a38265
 * due to error or an ok condition.
Packit a38265
 * From 0.9.4 similar functionality was added for oggz_write_*(), hence this
Packit a38265
 * constant was renamed.
Packit a38265
 */
Packit a38265
#define OGGZ_ERR_READ_STOP_OK  OGGZ_ERR_STOP_OK
Packit a38265
Packit a38265
/**
Packit a38265
 * DEPRECATED CONSTANT.
Packit a38265
 * OGGZ_ERR_READ_STOP_OK, OGGZ_ERR_READ_STOP_ERR were introduced to allow
Packit a38265
 * the user to differentiate between a cancelled oggz_read_*() returning
Packit a38265
 * due to error or an ok condition.
Packit a38265
 * From 0.9.4 similar functionality was added for oggz_write_*(), hence this
Packit a38265
 * constant was renamed.
Packit a38265
 */
Packit a38265
#define OGGZ_ERR_READ_STOP_ERR OGGZ_ERR_STOP_ERR
Packit a38265
Packit a38265
/**
Packit a38265
 * DEPRECATED FUNCTION
Packit a38265
 * This function has been replaced with the more clearly named
Packit a38265
 * oggz_set_granulerate().
Packit a38265
 * Specify that a logical bitstream has a linear metric
Packit a38265
 * \param oggz An OGGZ handle
Packit a38265
 * \param serialno Identify the logical bitstream in \a oggz to attach
Packit a38265
 * this linear metric to. A value of -1 indicates that the metric should
Packit a38265
 * be attached to all unattached logical bitstreams in \a oggz.
Packit a38265
 * \param granule_rate_numerator The numerator of the granule rate
Packit a38265
 * \param granule_rate_denominator The denominator of the granule rate
Packit a38265
 * \returns 0 Success
Packit a38265
 * \retval OGGZ_ERR_BAD_SERIALNO \a serialno does not identify an existing
Packit a38265
 * logical bitstream in \a oggz.
Packit a38265
 * \retval OGGZ_ERR_BAD_OGGZ \a oggz does not refer to an existing OGGZ
Packit a38265
 */
Packit a38265
int oggz_set_metric_linear (OGGZ * oggz, long serialno,
Packit a38265
			    ogg_int64_t granule_rate_numerator,
Packit a38265
			    ogg_int64_t granule_rate_denominator);
Packit a38265
Packit a38265
/**
Packit a38265
 * DEPRECATED FUNCTION
Packit a38265
 * This function has been replaced with oggz_comments_generate(), which
Packit a38265
 * does not require the packet_type argument. Instead, the packet type is
Packit a38265
 * determined by the content type of the stream, which was discovered when
Packit a38265
 * the bos packet was passed to oggz_write_feed.
Packit a38265
 *
Packit a38265
 * Output a comment packet for the specified stream.
Packit a38265
 * \param oggz A OGGZ* handle (created with OGGZ_WRITE)
Packit a38265
 * \param serialno Identify a logical bitstream within \a oggz
Packit a38265
 * \param packet_type Type of comment packet to generate,
Packit a38265
 * FLAC, OggPCM, Speex, Theora and Vorbis are supported
Packit a38265
 * \param FLAC_final_metadata_block Set this to zero unless the packet_type is
Packit a38265
 * FLAC, and there are no further metadata blocks to follow. See note below
Packit a38265
 * for details.
Packit a38265
 * \returns A comment packet for the stream. When no longer needed it
Packit a38265
 * should be freed with oggz_packet_destroy().
Packit a38265
 * \retval NULL content type does not support comments, not enough memory
Packit a38265
 * or comment was too long for FLAC
Packit a38265
 * \note FLAC streams may contain multiple metadata blocks of different types.
Packit a38265
 * When encapsulated in Ogg the first of these must be a Vorbis comment packet
Packit a38265
 * but PADDING, APPLICATION, SEEKTABLE, CUESHEET and PICTURE may follow.
Packit a38265
 * The last metadata block must have its first bit set to 1. Since liboggz does
Packit a38265
 * not know whether you will supply more metadata blocks you must tell it if
Packit a38265
 * this is the last (or only) metadata block by setting
Packit a38265
 * FLAC_final_metadata_block to 1.
Packit a38265
 * \n As FLAC metadata blocks are limited in size to 16MB minus 1 byte, this
Packit a38265
 * function will refuse to produce longer comment packets for FLAC.
Packit a38265
 * \n See http://flac.sourceforge.net/format.html for more details.
Packit a38265
 */
Packit a38265
ogg_packet *
Packit a38265
oggz_comment_generate(OGGZ * oggz, long serialno,
Packit a38265
		      OggzStreamContent packet_type,
Packit a38265
		      int FLAC_final_metadata_block);
Packit a38265
Packit a38265
#endif /* __OGGZ_DEPRECATED_H__ */