Commit 3876aaa7 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* This makes the cddax and vcdx modules compile again. meta is disabled. functionality is untested.

refs #649
parent f0a91924
...@@ -884,13 +884,16 @@ static int CDDAControl( access_t *p_access, int i_query, va_list args ) ...@@ -884,13 +884,16 @@ static int CDDAControl( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_META: case ACCESS_GET_META:
{ {
vlc_meta_t **pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** ); vlc_meta_t **pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** );
if ( p_cdda->p_meta ) #if 0
if( p_cdda->p_meta )
{ {
*pp_meta = vlc_meta_Duplicate( p_cdda->p_meta ); *pp_meta = vlc_meta_Duplicate( p_cdda->p_meta );
dbg_print( INPUT_DBG_META, "%s", "Meta copied" ); dbg_print( INPUT_DBG_META, "%s", "Meta copied" );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
else { else
#endif
{
msg_Warn( p_access, "tried to copy NULL meta info" ); msg_Warn( p_access, "tried to copy NULL meta info" );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -158,7 +158,7 @@ cddb_end: ; ...@@ -158,7 +158,7 @@ cddb_end: ;
#define add_meta_val(VLC_META, VAL) \ #define add_meta_val(VLC_META, VAL) \
if ( p_cdda->p_meta && VAL) { \ if ( p_cdda->p_meta && VAL) { \
vlc_meta_Add( p_cdda->p_meta, VLC_META, VAL ); \ /*vlc_meta_Add( p_cdda->p_meta, VLC_META, VAL );*/ \
dbg_print( INPUT_DBG_META, "field %s: %s\n", VLC_META, VAL ); \ dbg_print( INPUT_DBG_META, "field %s: %s\n", VLC_META, VAL ); \
} \ } \
...@@ -235,7 +235,9 @@ CDDAMetaInfoInit( access_t *p_access ) ...@@ -235,7 +235,9 @@ CDDAMetaInfoInit( access_t *p_access )
p_cdda->i_tracks ); p_cdda->i_tracks );
p_cdda->psz_mcn = cdio_get_mcn(p_cdda->p_cdio); p_cdda->psz_mcn = cdio_get_mcn(p_cdda->p_cdio);
#if 0
p_cdda->p_meta = vlc_meta_New(); p_cdda->p_meta = vlc_meta_New();
#endif
#ifdef HAVE_LIBCDDB #ifdef HAVE_LIBCDDB
if ( p_cdda->b_cddb_enabled ) if ( p_cdda->b_cddb_enabled )
...@@ -819,11 +821,10 @@ CDDACreatePlaylistItem( const access_t *p_access, cdda_data_t *p_cdda, ...@@ -819,11 +821,10 @@ CDDACreatePlaylistItem( const access_t *p_access, cdda_data_t *p_cdda,
playlist_t *p_playlist, playlist_item_t *p_item, playlist_t *p_playlist, playlist_item_t *p_item,
track_t i_track ) track_t i_track )
{ {
unsigned int i_track_frames = unsigned int i_track_frames =
cdio_get_track_lsn(p_cdda->p_cdio, i_track+1) - cdio_get_track_lsn(p_cdda->p_cdio, i_track+1) -
cdio_get_track_lsn(p_cdda->p_cdio, i_track); cdio_get_track_lsn(p_cdda->p_cdio, i_track);
mtime_t i_mduration = mtime_t i_mduration = i_track_frames * (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC) ;
i_track_frames * (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC) ;
char *psz_title = NULL; char *psz_title = NULL;
char *psz_mrl = NULL; char *psz_mrl = NULL;
...@@ -838,17 +839,17 @@ CDDACreatePlaylistItem( const access_t *p_access, cdda_data_t *p_cdda, ...@@ -838,17 +839,17 @@ CDDACreatePlaylistItem( const access_t *p_access, cdda_data_t *p_cdda,
psz_mrl, psz_title, (long int) i_mduration / 1000000 ); psz_mrl, psz_title, (long int) i_mduration / 1000000 );
p_child = playlist_ItemNew( p_playlist, psz_mrl, psz_title ); p_child = playlist_ItemNew( p_playlist, psz_mrl, psz_title );
p_child->input.i_duration = i_mduration; p_child->p_input->i_duration = (mtime_t) i_mduration;
free(psz_mrl); free(psz_mrl);
free(psz_title); free(psz_title);
if( !p_child ) return NULL; if( !p_child ) return NULL;
#if 0
playlist_NodeAddItem( p_playlist, p_child, playlist_NodeAddItem( p_playlist, p_child,
p_item->pp_parents[0]->i_view, p_item->p_parent->i_view,
p_item, PLAYLIST_APPEND, PLAYLIST_END ); p_item, PLAYLIST_APPEND, PLAYLIST_END );
playlist_CopyParents( p_item, p_child ); playlist_CopyParents( p_item, p_child );
#endif
return p_child; return p_child;
} }
...@@ -856,6 +857,7 @@ int CDDAAddMetaToItem( access_t *p_access, cdda_data_t *p_cdda, ...@@ -856,6 +857,7 @@ int CDDAAddMetaToItem( access_t *p_access, cdda_data_t *p_cdda,
playlist_item_t *p_item, int i_track, playlist_item_t *p_item, int i_track,
vlc_bool_t b_single ) vlc_bool_t b_single )
{ {
#if 0
add_playlist_track_info_str("Source", p_cdda->psz_source); add_playlist_track_info_str("Source", p_cdda->psz_source);
vlc_input_item_AddInfo( &p_item->input, _("Track"), _("Track Number"), vlc_input_item_AddInfo( &p_item->input, _("Track"), _("Track Number"),
"%d", i_track ); "%d", i_track );
...@@ -899,7 +901,7 @@ int CDDAAddMetaToItem( access_t *p_access, cdda_data_t *p_cdda, ...@@ -899,7 +901,7 @@ int CDDAAddMetaToItem( access_t *p_access, cdda_data_t *p_cdda,
} }
} }
#endif /*HAVE_LIBCDDB*/ #endif /*HAVE_LIBCDDB*/
#endif
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -980,13 +982,12 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda, ...@@ -980,13 +982,12 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
t->i_length = I64C(1000000) * t->i_size / CDDA_FREQUENCY_SAMPLE / 4; t->i_length = I64C(1000000) * t->i_size / CDDA_FREQUENCY_SAMPLE / 4;
if( p_item )
if (p_item)
{ {
CDDAAddMetaToItem( p_access, p_cdda, p_item, i_track, VLC_FALSE ); CDDAAddMetaToItem( p_access, p_cdda, p_item, i_track, VLC_FALSE );
p_item->input.i_duration = i_track_frames p_item->p_input->i_duration = (mtime_t) i_track_frames
* (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC); * (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC);
p_item->input.psz_uri = CDDAFormatMRL(p_access, i_track); p_item->p_input->psz_uri = CDDAFormatMRL( p_access, i_track );
} }
p_cdda->i_titles = 1; p_cdda->i_titles = 1;
...@@ -1025,19 +1026,18 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda, ...@@ -1025,19 +1026,18 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
p_cdda->i_titles = p_cdda->i_tracks; p_cdda->i_titles = p_cdda->i_tracks;
p_access->info.i_update |= INPUT_UPDATE_TITLE|INPUT_UPDATE_SIZE; p_access->info.i_update |= INPUT_UPDATE_TITLE|INPUT_UPDATE_SIZE;
if (p_item) { if( p_item )
p_item->input.i_duration = {
p_item->p_input->i_duration = (mtime_t)
p_access->info.i_size * (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC) ; p_access->info.i_size * (CLOCK_FREQ / CDIO_CD_FRAMES_PER_SEC) ;
p_item->input.psz_uri = CDDAFormatMRL(p_access, p_item->p_input->psz_uri = CDDAFormatMRL( p_access, p_cdda->i_track );
p_cdda->i_track);
} }
} }
if( b_play ) if( b_play )
{ {
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, 0,
p_playlist->status.i_view,
p_playlist->status.p_item, NULL ); p_playlist->status.p_item, NULL );
} }
......
...@@ -902,7 +902,7 @@ VCDOpen ( vlc_object_t *p_this ) ...@@ -902,7 +902,7 @@ VCDOpen ( vlc_object_t *p_this )
p_vcdplayer->p_input = vlc_object_find( p_access, p_vcdplayer->p_input = vlc_object_find( p_access,
VLC_OBJECT_INPUT, VLC_OBJECT_INPUT,
FIND_PARENT ); FIND_PARENT );
p_vcdplayer->p_meta = vlc_meta_New(); // p_vcdplayer->p_meta = vlc_meta_New();
p_vcdplayer->p_segments = NULL; p_vcdplayer->p_segments = NULL;
p_vcdplayer->p_entries = NULL; p_vcdplayer->p_entries = NULL;
...@@ -1037,11 +1037,14 @@ static int VCDControl( access_t *p_access, int i_query, va_list args ) ...@@ -1037,11 +1037,14 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
vlc_meta_t **pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** ); vlc_meta_t **pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** );
dbg_print( INPUT_DBG_EVENT, "get meta info" ); dbg_print( INPUT_DBG_EVENT, "get meta info" );
#if 0
if ( p_vcdplayer->p_meta ) { if( p_vcdplayer->p_meta )
*pp_meta = vlc_meta_Duplicate( p_vcdplayer->p_meta ); {
dbg_print( INPUT_DBG_META, "%s", "Meta copied" ); *pp_meta = vlc_meta_Duplicate( p_vcdplayer->p_meta );
} else dbg_print( INPUT_DBG_META, "%s", "Meta copied" );
}
else
#endif
msg_Warn( p_access, "tried to copy NULL meta info" ); msg_Warn( p_access, "tried to copy NULL meta info" );
return VLC_SUCCESS; return VLC_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment