Changeset 491e6ea for src/io/source_avcodec.c
- Timestamp:
- Jan 26, 2014, 9:18:22 PM (10 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 2e17371
- Parents:
- c038740
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_avcodec.c
rc038740 r491e6ea 68 68 int err; 69 69 if (path == NULL) { 70 AUBIO_ERR(" Aborted opening null path\n");70 AUBIO_ERR("source_avcodec: Aborted opening null path\n"); 71 71 goto beach; 72 72 } 73 73 if ((sint_t)samplerate < 0) { 74 AUBIO_ERR(" Can not open %s with samplerate %d\n", path, samplerate);74 AUBIO_ERR("source_avcodec: Can not open %s with samplerate %d\n", path, samplerate); 75 75 goto beach; 76 76 } 77 77 if ((sint_t)hop_size <= 0) { 78 AUBIO_ERR(" Can not open %s with hop_size %d\n", path, hop_size);78 AUBIO_ERR("source_avcodec: Can not open %s with hop_size %d\n", path, hop_size); 79 79 goto beach; 80 80 } … … 96 96 char errorstr[256]; 97 97 av_strerror (err, errorstr, sizeof(errorstr)); 98 AUBIO_ERR(" Failed opening %s (%s)\n", s->path, errorstr);98 AUBIO_ERR("source_avcodec: Failed opening %s (%s)\n", s->path, errorstr); 99 99 goto beach; 100 100 } … … 107 107 char errorstr[256]; 108 108 av_strerror (err, errorstr, sizeof(errorstr)); 109 AUBIO_ERR(" Could not find stream information " "for %s (%s)\n", s->path,109 AUBIO_ERR("source_avcodec: Could not find stream information " "for %s (%s)\n", s->path, 110 110 errorstr); 111 111 goto beach; … … 123 123 selected_stream = i; 124 124 } else { 125 AUBIO_WRN(" More than one audio stream in %s, "125 AUBIO_WRN("source_avcodec: More than one audio stream in %s, " 126 126 "taking the first one\n", s->path); 127 127 } … … 129 129 } 130 130 if (selected_stream == -1) { 131 AUBIO_ERR(" No audio stream in %s\n", s->path);131 AUBIO_ERR("source_avcodec: No audio stream in %s\n", s->path); 132 132 goto beach; 133 133 } … … 139 139 AVCodec *codec = avcodec_find_decoder(avCodecCtx->codec_id); 140 140 if (codec == NULL) { 141 AUBIO_ERR(" Could not find decoder for %s", s->path);141 AUBIO_ERR("source_avcodec: Could not find decoder for %s", s->path); 142 142 goto beach; 143 143 } … … 146 146 char errorstr[256]; 147 147 av_strerror (err, errorstr, sizeof(errorstr)); 148 AUBIO_ERR(" Could not load codec for %s (%s)\n", s->path, errorstr);148 AUBIO_ERR("source_avcodec: Could not load codec for %s (%s)\n", s->path, errorstr); 149 149 goto beach; 150 150 } … … 163 163 164 164 if (s->samplerate > s->input_samplerate) { 165 AUBIO_WRN(" upsampling %s from %d to %d\n", s->path,165 AUBIO_WRN("source_avcodec: upsampling %s from %d to %d\n", s->path, 166 166 s->input_samplerate, s->samplerate); 167 167 } … … 170 170 avFrame = avcodec_alloc_frame(); 171 171 if (!avFrame) { 172 AUBIO_ERR(" Could not allocate frame for (%s)\n", s->path);172 AUBIO_ERR("source_avcodec: Could not allocate frame for (%s)\n", s->path); 173 173 } 174 174 … … 223 223 char errorstr[256]; 224 224 av_strerror (err, errorstr, sizeof(errorstr)); 225 AUBIO_ERR(" Could not open AVAudioResampleContext for %s (%s)\n",225 AUBIO_ERR("source_avcodec: Could not open AVAudioResampleContext for %s (%s)\n", 226 226 s->path, errorstr); 227 227 //goto beach;
Note: See TracChangeset
for help on using the changeset viewer.