- if (config_GetInt( p_input, MODULE_STRING "-cddb-enabled" )) {
- int i, i_matches;
- cddb_conn_t *conn = cddb_new();
- const CdIo *cdio = p_cdda->p_cddev->cdio;
-
-
- cddb_log_set_handler (uninit_log_handler);
-
- if (!conn) {
- msg_Warn( p_input, "unable to initialize libcddb" );
- goto cddb_destroy;
- }
-
- cddb_set_email_address( conn,
- config_GetPsz( p_input,
- MODULE_STRING "-cddb-email") );
-
- cddb_set_server_name( conn,
- config_GetPsz( p_input,
- MODULE_STRING "-cddb-server") );
-
- cddb_set_server_port(conn,
- config_GetInt( p_input,
- MODULE_STRING "-cddb-port") );
-
- /* Set the location of the local CDDB cache directory.
- The default location of this directory is */
-
- if (!config_GetInt( p_input, MODULE_STRING "-cddb-enable-cache" ))
- cddb_cache_disable(conn);
-
- cddb_cache_set_dir(conn,
- config_GetPsz( p_input,
- MODULE_STRING "-cddb-cachedir") );
-
- cddb_set_timeout(conn,
- config_GetInt( p_input, MODULE_STRING "-cddb-timeout") );
-
-
- if (config_GetInt( p_input, MODULE_STRING "-cddb-httpd" )) {
- cddb_http_enable(conn);
- } else
- cddb_http_disable(conn);
-
- p_cdda->cddb.disc = cddb_disc_new();
- if (!p_cdda->cddb.disc) {
- msg_Err( p_input, "Unable to create CDDB disc structure." );
- goto cddb_end;
- }
-
- for(i = 1; i <= p_cdda->i_nb_tracks; i++) {
- cddb_track_t *t = cddb_track_new();
- t->frame_offset = cdio_get_track_lba(cdio, i);
- cddb_disc_add_track(p_cdda->cddb.disc, t);
- }
-
- p_cdda->cddb.disc->length =
- cdio_get_track_lba(cdio, CDIO_CDROM_LEADOUT_TRACK)
- / CDIO_CD_FRAMES_PER_SEC;
+ switch( i_query )
+ {
+ /* Pass back a copy of meta information that was gathered when we
+ during the Open/Initialize call.
+ */
+ case ACCESS_GET_META:
+ {
+#if 0
+ vlc_meta_t **pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** );
+ if( p_cdda->p_meta )
+ {
+ *pp_meta = vlc_meta_Duplicate( p_cdda->p_meta );
+ dbg_print( INPUT_DBG_META, "%s", "Meta copied" );
+ return VLC_SUCCESS;
+ }
+ else
+#endif
+ {
+ msg_Warn( p_access, "tried to copy NULL meta info" );
+ return VLC_EGENERIC;
+ }
+ }