Blame src/tools/oggz_tools.h

Packit a38265
/*
Packit a38265
  Copyright (C) 2005 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_TOOLS_H__
Packit a38265
#define __OGGZ_TOOLS_H__
Packit a38265
Packit a38265
#include "config.h"
Packit a38265
#include <getopt.h>
Packit a38265
Packit a38265
const char *
Packit a38265
ot_page_identify (OGGZ *oggz, const ogg_page * og, char ** info);
Packit a38265
Packit a38265
/*
Packit a38265
 * Print a number of bytes to 3 significant figures
Packit a38265
 * using standard abbreviations (GB, MB, kB, byte[s])
Packit a38265
 */
Packit a38265
int ot_fprint_bytes (FILE * stream, long nr_bytes);
Packit a38265
Packit a38265
/*
Packit a38265
 * Print a bitrate to 3 significant figures
Packit a38265
 * using quasi-standard abbreviations (Gbps, Mbps, kbps, bps)
Packit a38265
 */
Packit a38265
int ot_print_bitrate (long bps);
Packit a38265
Packit a38265
int ot_fprint_time (FILE * stream, double seconds);
Packit a38265
Packit a38265
int ot_fprint_granulepos (FILE * stream, OGGZ * oggz, long serialno,
Packit a38265
                          ogg_int64_t granulepos);
Packit a38265
Packit a38265
/*
Packit a38265
 * Tool initialization function. Sets stdin, stdio to binary on windows etc.
Packit a38265
 * Call this at the beginning of main().
Packit a38265
 */
Packit a38265
void ot_init (void);
Packit a38265
Packit a38265
/*
Packit a38265
 * Print options. Must use these in response to -? for each command,
Packit a38265
 * for bash completion.
Packit a38265
 */
Packit a38265
void ot_print_short_options (char * optstring);
Packit a38265
Packit a38265
void ot_print_options (struct option long_options[], char * optstring);
Packit a38265
Packit a38265
#endif /* __OGGZ_TOOLS_H__ */