Mercurial > hg > forks > bilotrip-mj12
comparison liboggplayer-src/src/open_close.cpp @ 8:3b6cea0d1980
Disable audio support from liboggplayer, as it fails due to the video not
having audio track.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 05 Aug 2013 14:33:53 +0300 |
parents | 26ee741f8c08 |
children | 083c73ceb716 |
comparison
equal
deleted
inserted
replaced
7:26ee741f8c08 | 8:3b6cea0d1980 |
---|---|
125 pp_inc = 0; | 125 pp_inc = 0; |
126 } else { | 126 } else { |
127 fprintf(stderr, "DDD: 0\n"); | 127 fprintf(stderr, "DDD: 0\n"); |
128 return false; | 128 return false; |
129 } | 129 } |
130 #if 0 | |
130 if (vorbis_p) { | 131 if (vorbis_p) { |
131 vorbis_synthesis_init(&v_state, &v_info); | 132 vorbis_synthesis_init(&v_state, &v_info); |
132 vorbis_block_init(&v_state, &v_block); | 133 vorbis_block_init(&v_state, &v_block); |
133 } else { | 134 } else { |
134 fprintf(stderr, "DDD: 1\n"); | 135 fprintf(stderr, "DDD: 1\n"); |
135 return false; | 136 return false; |
136 } | 137 } |
138 #endif | |
137 return true; | 139 return true; |
138 } | 140 } |
139 | 141 |
140 void OggPlayer::Imp::open(std::string path, AudioFormat audio_format, int channels, | 142 void OggPlayer::Imp::open(std::string path, AudioFormat audio_format, int channels, |
141 int rate, VideoFormat video_format) { | 143 int rate, VideoFormat video_format) { |
183 file_in.close(); | 185 file_in.close(); |
184 fprintf(stderr, "XXX: done\n"); | 186 fprintf(stderr, "XXX: done\n"); |
185 return; | 187 return; |
186 } | 188 } |
187 | 189 |
190 #if 0 | |
188 // 5) init audio conversion | 191 // 5) init audio conversion |
189 int ret = SDL_BuildAudioCVT(&cvt, AUDIO_S16, v_info.channels, | 192 int ret = SDL_BuildAudioCVT(&cvt, AUDIO_S16, v_info.channels, |
190 v_info.rate, audio_format, channels, rate); | 193 v_info.rate, audio_format, channels, rate); |
191 if (-1 == ret) { | 194 if (-1 == ret) { |
192 failbit = true; | 195 failbit = true; |
193 return; | 196 return; |
194 } | 197 } |
198 #endif | |
199 | |
195 // play() will allocate memory when needed | 200 // play() will allocate memory when needed |
196 audio_buffer_size = 0; | 201 audio_buffer_size = 0; |
197 audio_buffer = NULL; | 202 audio_buffer = NULL; |
198 | 203 |
199 switch(video_format){ | 204 switch(video_format){ |