4 <title>vorbisfile - chaining_example.c</title>
5 <link rel=stylesheet href="style.css" type="text/css">
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
11 <td><p class=tiny>vorbisfile documentation</p></td>
12 <td align=right><p class=tiny>vorbisfile version 1.25 - 20000615</p></td>
16 <h1>chaining_example.c</h1>
19 The example program source:
22 <table border=0 width=100% color=black cellspacing=0 cellpadding=7>
27 #include <vorbis/codec.h>
\r
28 #include <vorbis/vorbisfile.h>
\r
34 /* open the file/pipe on stdin */
\r
35 if(ov_open(stdin,&ov,NULL,-1)<0){
\r
36 printf("Could not open input as an OggVorbis file.\n\n");
\r
40 /* print details about each logical bitstream in the input */
\r
41 if(ov_seekable(&ov)){
\r
42 printf("Input bitstream contained %ld logical bitstream section(s).\n",
\r
44 printf("Total bitstream playing time: %ld seconds\n\n",
\r
45 (long)ov_time_total(&ov,-1));
\r
48 printf("Standard input was not seekable.\n"
\r
49 "First logical bitstream information:\n\n");
\r
52 for(i=0;i<ov_streams(&ov);i++){
\r
53 vorbis_info *vi=ov_info(&ov,i);
\r
54 printf("\tlogical bitstream section %d information:\n",i+1);
\r
55 printf("\t\t%ldHz %d channels bitrate %ldkbps serial number=%ld\n",
\r
56 vi->rate,vi->channels,ov_bitrate(&ov,i)/1000,
\r
57 ov_serialnumber(&ov,i));
\r
58 printf("\t\tcompressed length: %ld bytes ",(long)(ov_raw_total(&ov,i)));
\r
59 printf(" play time: %lds\n",(long)ov_time_total(&ov,i));
\r
74 <table border=0 width=100%>
76 <td><p class=tiny>copyright © 2000 vorbis team</p></td>
77 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team@vorbis.org">team@vorbis.org</a></p></td>
79 <td><p class=tiny>vorbisfile documentation</p></td>
80 <td align=right><p class=tiny>vorbisfile version 1.25 - 20000615</p></td>