static av_cold int read_close(AVFormatContext *ctx) { CDIOContext *s = ctx->priv_data; cdio_paranoia_free(s->paranoia); cdio_cddap_close(s->drive); return 0; }
static void cued_rip_epilogue(rip_context_t *rip) { free(rip->mmcBuf); #ifdef CUED_HAVE_PARANOIA if (ripUseParanoia) { rip->paranoiaCtlObj->read_audio = rip->save_read_paranoid; cdio_paranoia_free(rip->paranoiaRipObj); cdio_cddap_close_no_free_cdio(rip->paranoiaCtlObj); } #endif // CUED_HAVE_PARANOIA if (rip->qSubChannelFileName && rip->qSubChannelFile != stdout) { fclose(rip->qSubChannelFile); } if (rip->crcFailure || rip->crcSuccess) { int totalCrcs = rip->crcSuccess + rip->crcFailure; if (rip->crcFailure * 100 / totalCrcs > 5) { cdio_warn("greater than 5 percent of Q sub-channel records failed CRC check (try --qsc-fq?)"); } if (ripVerbose) { printf("progress: correctly read %d of %d Q sub-channel records\n", rip->crcSuccess, totalCrcs); } } }
bool RipTrack(track_t i_track, std::string filename) { InitWavWriter(filename); p = cdio_paranoia_init(d); if (!p) return false; /* Restrict speed */ if (cdda_speed_set(d, MAX_SPEED) != DRIVER_OP_SUCCESS) { printf("Unable to set speed\n"); } i_first_lsn = cdio_cddap_track_firstsector(d, i_track); if ( -1 == i_first_lsn ) { printf("Trouble getting starting LSN\n"); } else { i_last_lsn = cdio_cddap_track_lastsector(d, i_track); printf("Reading track %d from LSN %ld to LSN %ld\n", i_track, (long int) i_first_lsn, (long int) i_last_lsn); /* Set reading mode for full paranoia, but allow skipping sectors. */ paranoia_modeset(p, PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP); if (RipAttempt() == 1) { printf("Ripping failed\n"); return false; } } CloseWavWriter(); cdio_paranoia_free(p); return true; }
static void CDDAReader_dealloc_device(cdio_CDDAReader *self) { if (self->_.drive.paranoia) { cdio_paranoia_free(self->_.drive.paranoia); } if (self->_.drive.drive) { cdio_cddap_close(self->_.drive.drive); } }
static void CDDA_dealloc(cdio_CDDAObject* self) { if (self->paranoia != NULL) cdio_paranoia_free(self->paranoia); if (self->cdrom_drive != NULL) cdio_cddap_close(self->cdrom_drive); Py_XDECREF(self->pcm_module); if (self != NULL) self->ob_type->tp_free((PyObject*)self); }
static void input_cdio_close(struct input_stream *is) { struct input_cdio_paranoia *i = (struct input_cdio_paranoia *)is; pcm_buffer_deinit(&i->conv_buffer); if (i->para) cdio_paranoia_free(i->para); if (i->drv) cdio_cddap_close_no_free_cdio( i->drv); if (i->cdio) cdio_destroy( i->cdio ); input_stream_deinit(&i->base); g_free(i); }
void CdParanoia::free() { if (paranoia) { #ifdef CDIOPARANOIA_FOUND cdio_paranoia_free(paranoia); #else paranoia_free(paranoia); #endif paranoia = 0; } if (drive) { #ifdef CDIOPARANOIA_FOUND cdio_cddap_close(drive); #else cdda_close(drive); #endif drive = 0; } }
static void cdpa_close(rnc_dev_t *dev) { cdpa_t *cdpa = dev->data; mrp_debug("closing device"); if (cdpa == NULL) return; /* Hmm... what is the opposite of cdio_open ? */ if (cdpa->cdpa) cdio_paranoia_free(cdpa->cdpa); if (cdpa->cdio) cdio_cddap_close(cdpa->cdda); mrp_free(cdpa->errmsg); mrp_free(cdpa); }
// private void CdDecoder::deinit() { setCDSpeed(-1); QMutexLocker lock(&getCdioMutex()); if (m_paranoia) cdio_paranoia_free(m_paranoia), m_paranoia = 0; if (m_device) cdio_cddap_close(m_device), m_device = 0, m_cdio = 0; if (m_cdio) cdio_destroy(m_cdio), m_cdio = 0; if (m_output_buf) ::av_free(m_output_buf), m_output_buf = NULL; m_inited = m_user_stop = m_finish = false; m_freq = m_bitrate = 0L; m_stat = DecoderEvent::Finished; m_chan = 0; setOutput(0); }
ParanoiaReaderImpl::~ParanoiaReaderImpl() { cdio_paranoia_free(_cdrom_paranoia); }