Ignore:
Timestamp:
Jan 26, 2014, 9:18:22 PM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
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
Message:

src/io/: add missing error strings prefixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    rc038740 r491e6ea  
    6868  int err;
    6969  if (path == NULL) {
    70     AUBIO_ERR("Aborted opening null path\n");
     70    AUBIO_ERR("source_avcodec: Aborted opening null path\n");
    7171    goto beach;
    7272  }
    7373  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);
    7575    goto beach;
    7676  }
    7777  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);
    7979    goto beach;
    8080  }
     
    9696    char errorstr[256];
    9797    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);
    9999    goto beach;
    100100  }
     
    107107    char errorstr[256];
    108108    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,
    110110        errorstr);
    111111    goto beach;
     
    123123        selected_stream = i;
    124124      } else {
    125         AUBIO_WRN("More than one audio stream in %s, "
     125        AUBIO_WRN("source_avcodec: More than one audio stream in %s, "
    126126            "taking the first one\n", s->path);
    127127      }
     
    129129  }
    130130  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);
    132132    goto beach;
    133133  }
     
    139139  AVCodec *codec = avcodec_find_decoder(avCodecCtx->codec_id);
    140140  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);
    142142    goto beach;
    143143  }
     
    146146    char errorstr[256];
    147147    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);
    149149    goto beach;
    150150  }
     
    163163
    164164  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,
    166166        s->input_samplerate, s->samplerate);
    167167  }
     
    170170  avFrame = avcodec_alloc_frame();
    171171  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);
    173173  }
    174174
     
    223223      char errorstr[256];
    224224      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",
    226226          s->path, errorstr);
    227227      //goto beach;
Note: See TracChangeset for help on using the changeset viewer.