summaryrefslogtreecommitdiff
path: root/examples/chaining_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/chaining_example.c')
-rw-r--r--examples/chaining_example.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/examples/chaining_example.c b/examples/chaining_example.c
deleted file mode 100644
index 874f363e..00000000
--- a/examples/chaining_example.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************
- * *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
- * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
- * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
- * *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
- * by the XIPHOPHORUS Company http://www.xiph.org/ *
-
- ********************************************************************
-
- function: illustrate simple use of chained bitstream and vorbisfile.a
- last mod: $Id: chaining_example.c,v 1.10 2001/08/13 01:36:55 xiphmont Exp $
-
- ********************************************************************/
-
-#include <vorbis/codec.h>
-#include <vorbis/vorbisfile.h>
-
-int main(){
- OggVorbis_File ov;
- int i;
-
- /* open the file/pipe on stdin */
- if(ov_open(stdin,&ov,NULL,-1)<0){
- printf("Could not open input as an OggVorbis file.\n\n");
- exit(1);
- }
-
- /* print details about each logical bitstream in the input */
- if(ov_seekable(&ov)){
- printf("Input bitstream contained %ld logical bitstream section(s).\n",
- ov_streams(&ov));
- printf("Total bitstream playing time: %ld seconds\n\n",
- (long)ov_time_total(&ov,-1));
-
- }else{
- printf("Standard input was not seekable.\n"
- "First logical bitstream information:\n\n");
- }
-
- for(i=0;i<ov_streams(&ov);i++){
- vorbis_info *vi=ov_info(&ov,i);
- printf("\tlogical bitstream section %d information:\n",i+1);
- printf("\t\t%ldHz %d channels bitrate %ldkbps serial number=%ld\n",
- vi->rate,vi->channels,ov_bitrate(&ov,i)/1000,
- ov_serialnumber(&ov,i));
- printf("\t\theader length: %ld bytes\n",(long)
- (ov.dataoffsets[i]-ov.offsets[i]));
- printf("\t\tcompressed length: %ld bytes ",(long)(ov_raw_total(&ov,i)));
- printf(" play time: %lds\n",(long)ov_time_total(&ov,i));
- }
-
- ov_clear(&ov);
- return 0;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-