Mercurial > libavcodec.hg
annotate oggvorbis.c @ 685:44a1dab0205c libavcodec
fixing apiexample
author | michaelni |
---|---|
date | Thu, 19 Sep 2002 18:24:52 +0000 |
parents | 57b9a37546a0 |
children | b0d29bf1cecd |
rev | line source |
---|---|
636
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
1 /* |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
2 * Ogg Vorbis codec support via libvorbisenc |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
3 * Mark Hills <mark@pogo.org.uk> |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
4 */ |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
5 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
6 #include <time.h> |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
7 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
8 #include <vorbis/vorbisenc.h> |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
9 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
10 #include "avcodec.h" |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
11 #include "oggvorbis.h" |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
12 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
13 #define OGGVORBIS_FRAME_SIZE 1024 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
14 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
15 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
16 typedef struct OggVorbisContext { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
17 vorbis_info vi ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
18 vorbis_dsp_state vd ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
19 vorbis_block vb ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
20 } OggVorbisContext ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
21 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
22 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
23 int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
24 if(avccontext->quality) { /* VBR requested */ |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
25 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
26 fprintf(stderr, "init_encode: channels=%d quality=%d\n", |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
27 avccontext->channels, avccontext->quality) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
28 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
29 return vorbis_encode_init_vbr(vi, avccontext->channels, |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
30 avccontext->sample_rate, (float)avccontext->quality / 1000) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
31 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
32 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
33 fprintf(stderr, "init_encoder: channels=%d bitrate=%d tolerance=%d\n", |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
34 avccontext->channels, avccontext->bit_rate, |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
35 avccontext->bit_rate_tolerance) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
36 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
37 return vorbis_encode_init(vi, avccontext->channels, |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
38 avccontext->sample_rate, -1, avccontext->bit_rate, -1) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
39 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
40 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
41 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
42 static int oggvorbis_encode_init(AVCodecContext *avccontext) { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
43 OggVorbisContext *context = avccontext->priv_data ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
44 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
45 fprintf(stderr, "oggvorbis_encode_init\n") ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
46 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
47 vorbis_info_init(&context->vi) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
48 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
49 if(oggvorbis_init_encoder(&context->vi, avccontext) < 0) { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
50 fprintf(stderr, "oggvorbis_encode_init: init_encoder failed") ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
51 return -1 ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
52 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
53 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
54 vorbis_analysis_init(&context->vd, &context->vi) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
55 vorbis_block_init(&context->vd, &context->vb) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
56 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
57 avccontext->frame_size = OGGVORBIS_FRAME_SIZE ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
58 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
59 return 0 ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
60 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
61 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
62 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
63 int oggvorbis_encode_frame(AVCodecContext *avccontext, unsigned char *packets, |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
64 int buf_size, void *data) |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
65 { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
66 OggVorbisContext *context = avccontext->priv_data ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
67 float **buffer ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
68 ogg_packet op ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
69 signed char *audio = data ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
70 int l, samples = buf_size / 16 ; /* samples = OGGVORBIS_FRAME_SIZE */ ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
71 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
72 buffer = vorbis_analysis_buffer(&context->vd, samples) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
73 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
74 if(context->vi.channels == 1) { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
75 for(l = 0 ; l < samples ; l++) |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
76 buffer[0][l]=((audio[l*2+1]<<8)|(0x00ff&(int)audio[l*2]))/32768.f; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
77 } else { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
78 for(l = 0 ; l < samples ; l++){ |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
79 buffer[0][l]=((audio[l*4+1]<<8)|(0x00ff&(int)audio[l*4]))/32768.f; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
80 buffer[1][l]=((audio[l*4+3]<<8)|(0x00ff&(int)audio[l*4+2]))/32768.f; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
81 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
82 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
83 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
84 vorbis_analysis_wrote(&context->vd, samples) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
85 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
86 l = 0 ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
87 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
88 while(vorbis_analysis_blockout(&context->vd, &context->vb) == 1) { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
89 vorbis_analysis(&context->vb, NULL); |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
90 vorbis_bitrate_addblock(&context->vb) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
91 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
92 while(vorbis_bitrate_flushpacket(&context->vd, &op)) { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
93 memcpy(packets + l, &op, sizeof(ogg_packet)) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
94 memcpy(packets + l + sizeof(ogg_packet), op.packet, op.bytes) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
95 l += sizeof(ogg_packet) + op.bytes ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
96 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
97 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
98 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
99 return l ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
100 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
101 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
102 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
103 int oggvorbis_encode_close(AVCodecContext *avccontext) { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
104 OggVorbisContext *context = avccontext->priv_data ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
105 /* ogg_packet op ; */ |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
106 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
107 fprintf(stderr, "oggvorbis_encode_close\n") ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
108 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
109 vorbis_analysis_wrote(&context->vd, 0) ; /* notify vorbisenc this is EOF */ |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
110 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
111 /* We need to write all the remaining packets into the stream |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
112 * on closing */ |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
113 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
114 /* |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
115 while(vorbis_bitrate_flushpacket(&context->vd, &op)) { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
116 memcpy(packets + l, &op, sizeof(ogg_packet)) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
117 memcpy(packets + l + sizeof(ogg_packet), op.packet, op.bytes) ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
118 l += sizeof(ogg_packet) + op.bytes ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
119 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
120 */ |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
121 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
122 vorbis_block_clear(&context->vb); |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
123 vorbis_dsp_clear(&context->vd); |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
124 vorbis_info_clear(&context->vi); |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
125 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
126 return 0 ; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
127 } |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
128 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
129 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
130 AVCodec oggvorbis_encoder = { |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
131 "vorbis", |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
132 CODEC_TYPE_AUDIO, |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
133 CODEC_ID_VORBIS, |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
134 sizeof(OggVorbisContext), |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
135 oggvorbis_encode_init, |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
136 oggvorbis_encode_frame, |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
137 oggvorbis_encode_close |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
138 }; |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
139 |
57b9a37546a0
oggvorbis support patch by (Mark Hills <mark at pogo dot org dot uk>)
michaelni
parents:
diff
changeset
|
140 |