1 /*****************************************************************************
2 * intf.c: interface for CMML annotations/hyperlinks
3 *****************************************************************************
4 * Copyright (C) 2003-2004 Commonwealth Scientific and Industrial Research
5 * Organisation (CSIRO) Australia
6 * Copyright (C) 2004 the VideoLAN team
10 * Authors: Andre Pang <Andre.Pang@csiro.au>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
27 /*****************************************************************************
29 *****************************************************************************/
33 #include <stdlib.h> /* malloc(), free() */
40 #include <vlc/decoder.h>
41 #include <vlc/input.h>
49 #include "browser_open.h"
54 #undef CMML_INTF_USE_TIMED_URIS
56 #undef CMML_INTF_DEBUG
57 #undef CMML_INTF_HISTORY_DEBUG
59 /*****************************************************************************
60 * intf_sys_t: description and status of interface
61 *****************************************************************************/
64 decoder_t * p_cmml_decoder;
65 input_thread_t * p_input;
67 vlc_bool_t b_key_pressed;
70 struct navigation_history_t
76 /*****************************************************************************
78 *****************************************************************************/
79 static int InitThread ( intf_thread_t * );
80 static int MouseEvent ( vlc_object_t *, char const *,
81 vlc_value_t, vlc_value_t, void * );
82 static int KeyEvent ( vlc_object_t *, char const *,
83 vlc_value_t, vlc_value_t, void * );
85 static void FollowAnchor ( intf_thread_t * );
86 static void GoBack ( intf_thread_t * );
87 static void GoForward ( intf_thread_t * );
89 static int FollowAnchorCallback ( vlc_object_t *, char const *,
90 vlc_value_t, vlc_value_t, void * );
91 static int GoBackCallback ( vlc_object_t *, char const *,
92 vlc_value_t, vlc_value_t, void * );
93 static int GoForwardCallback ( vlc_object_t *, char const *,
94 vlc_value_t, vlc_value_t, void * );
96 static char *GetTimedURLFromPlaylistItem( intf_thread_t *, playlist_item_t * );
97 static char *GetTimedURIFragmentForTime ( int );
98 static int GetCurrentTimeInSeconds ( input_thread_t * );
99 static int DisplayAnchor ( intf_thread_t *, vout_thread_t *,
101 static int DisplayPendingAnchor ( intf_thread_t *, vout_thread_t * );
102 static history_t * GetHistory ( playlist_t * );
103 static void ReplacePlaylistItem ( playlist_t *, char * );
105 /* Exported functions */
106 static void RunIntf ( intf_thread_t *p_intf );
108 /*****************************************************************************
109 * OpenIntf: initialize CMML interface
110 *****************************************************************************/
111 int E_(OpenIntf) ( vlc_object_t *p_this )
113 intf_thread_t *p_intf = (intf_thread_t *)p_this;
115 p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
116 if( p_intf->p_sys == NULL )
121 p_intf->pf_run = RunIntf;
123 var_AddCallback( p_intf->p_libvlc, "key-pressed", KeyEvent, p_intf );
124 /* we also need to add the callback for "mouse-clicked", but do that later
125 * when we've found a p_vout */
127 var_Create( p_intf->p_libvlc, "browse-go-back", VLC_VAR_VOID );
128 var_AddCallback( p_intf->p_libvlc, "browse-go-back",
129 GoBackCallback, p_intf );
130 var_Create( p_intf->p_libvlc, "browse-go-forward", VLC_VAR_VOID );
131 var_AddCallback( p_intf->p_libvlc, "browse-go-forward",
132 GoForwardCallback, p_intf );
133 var_Create( p_intf->p_libvlc, "browse-follow-anchor", VLC_VAR_VOID );
134 var_AddCallback( p_intf->p_libvlc, "browse-follow-anchor",
135 FollowAnchorCallback, p_intf );
140 /*****************************************************************************
141 * CloseIntf: destroy dummy interface
142 *****************************************************************************/
143 void E_(CloseIntf) ( vlc_object_t *p_this )
145 intf_thread_t * p_intf = (intf_thread_t *)p_this;
146 vout_thread_t * p_vout;
148 #ifdef CMML_INTF_DEBUG
149 msg_Dbg( p_intf, "freeing CMML interface" );
152 /* erase the anchor text description from the video output if it exists */
153 p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
156 /* enable CMML as a subtitle track */
157 spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR, DEFAULT_CHAN );
158 vlc_object_release( p_vout );
161 var_DelCallback( p_intf->p_libvlc, "key-pressed", KeyEvent, p_intf );
163 vlc_object_release( p_intf->p_sys->p_cmml_decoder );
165 free( p_intf->p_sys );
169 /*****************************************************************************
171 *****************************************************************************/
172 static void RunIntf( intf_thread_t *p_intf )
174 vout_thread_t * p_vout = NULL;
176 if( InitThread( p_intf ) < 0 )
178 msg_Err( p_intf, "can't initialize CMML interface" );
181 #ifdef CMML_INTF_DEBUG
182 msg_Dbg( p_intf, "CMML intf initialized" );
185 /* if video output is dying, disassociate ourselves from it */
186 if( p_vout && p_vout->b_die )
188 var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf );
189 vlc_object_release( p_vout );
194 while( !p_intf->b_die )
197 /* find a video output if we currently don't have one */
200 p_vout = vlc_object_find( p_intf->p_sys->p_input,
201 VLC_OBJECT_VOUT, FIND_CHILD );
204 #ifdef CMML_INTF_DEBUG
205 msg_Dbg( p_intf, "found vout thread" );
207 var_AddCallback( p_vout, "mouse-clicked", MouseEvent, p_intf );
211 vlc_mutex_lock( &p_intf->change_lock );
216 if( p_intf->p_sys->b_key_pressed )
219 int i, i_action = -1;
220 struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys;
222 /* Find action triggered by hotkey (if any) */
223 var_Get( p_intf->p_libvlc, "key-pressed", &val );
225 /* Acknowledge that we've handled the b_key_pressed event */
226 p_intf->p_sys->b_key_pressed = VLC_FALSE;
228 #ifdef CMML_INTF_DEBUG
229 msg_Dbg( p_intf, "Got a keypress: %d", val.i_int );
232 for( i = 0; p_hotkeys[i].psz_action != NULL; i++ )
234 if( p_hotkeys[i].i_key == val.i_int )
235 i_action = p_hotkeys[i].i_action;
238 /* What did the user do? */
243 case ACTIONID_NAV_ACTIVATE:
244 FollowAnchor( p_intf );
246 case ACTIONID_HISTORY_BACK:
249 case ACTIONID_HISTORY_FORWARD:
258 vlc_mutex_unlock( &p_intf->change_lock );
260 (void) DisplayPendingAnchor( p_intf, p_vout );
263 msleep( INTF_IDLE_SLEEP );
266 /* if we're here, the video output is dying: release the vout object */
270 var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf );
271 vlc_object_release( p_vout );
274 vlc_object_release( p_intf->p_sys->p_input );
277 /*****************************************************************************
278 * DisplayPendingAnchor: get a pending anchor description/URL from the CMML
279 * decoder and display it on screen
280 *****************************************************************************/
281 static int DisplayPendingAnchor( intf_thread_t *p_intf, vout_thread_t *p_vout )
283 decoder_t *p_cmml_decoder;
284 char *psz_description = NULL;
285 char *psz_url = NULL;
287 intf_thread_t *p_primary_intf;
290 p_cmml_decoder = p_intf->p_sys->p_cmml_decoder;
291 if( var_Get( p_cmml_decoder, "psz-current-anchor-description", &val )
300 psz_description = val.p_address;
302 if( var_Get( p_cmml_decoder, "psz-current-anchor-url", &val )
305 psz_url = val.p_address;
310 /* don't display anchor if main interface can display it */
311 p_primary_intf = vlc_object_find( p_intf->p_libvlc, VLC_OBJECT_INTF,
316 if( var_Get( p_primary_intf, "intf-displays-cmml-description", &val )
319 if( val.b_bool == VLC_TRUE )
321 vlc_object_release( p_primary_intf );
326 vlc_object_release( p_primary_intf );
329 /* display anchor as subtitle on-screen */
330 if( DisplayAnchor( p_intf, p_vout, psz_description, psz_url )
333 /* text render unsuccessful: do nothing */
337 /* text render successful: clear description */
338 val.p_address = NULL;
339 if( var_Set( p_cmml_decoder, "psz-current-anchor-description", val )
343 "reset of psz-current-anchor-description failed" );
345 free( psz_description );
353 /*****************************************************************************
355 *****************************************************************************/
356 static int InitThread( intf_thread_t * p_intf )
358 /* We might need some locking here */
361 input_thread_t * p_input;
362 decoder_t *p_cmml_decoder;
364 p_cmml_decoder = vlc_object_find( p_intf, VLC_OBJECT_DECODER, FIND_PARENT );
365 p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_PARENT );
367 #ifdef CMML_INTF_DEBUG
368 msg_Dbg( p_intf, "cmml decoder at %p, input thread at %p",
369 p_cmml_decoder, p_input );
372 /* Maybe the input just died */
373 if( p_input == NULL )
378 vlc_mutex_lock( &p_intf->change_lock );
380 p_intf->p_sys->p_input = p_input;
381 p_intf->p_sys->p_cmml_decoder = p_cmml_decoder;
383 p_intf->p_sys->b_key_pressed = VLC_FALSE;
385 vlc_mutex_unlock( &p_intf->change_lock );
395 /*****************************************************************************
396 * MouseEvent: callback for mouse events
397 *****************************************************************************/
398 static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
399 vlc_value_t oldval, vlc_value_t newval, void *p_data )
401 /* TODO: handle mouse clicks on the anchor text */
406 /*****************************************************************************
407 * KeyEvent: callback for keyboard events
408 *****************************************************************************/
409 static int KeyEvent( vlc_object_t *p_this, char const *psz_var,
410 vlc_value_t oldval, vlc_value_t newval, void *p_data )
412 intf_thread_t *p_intf = (intf_thread_t *)p_data;
413 vlc_mutex_lock( &p_intf->change_lock );
415 p_intf->p_sys->b_key_pressed = VLC_TRUE;
417 vlc_mutex_unlock( &p_intf->change_lock );
422 /*****************************************************************************
423 * FollowAnchor: follow the current anchor being displayed to the user
424 *****************************************************************************/
425 static void FollowAnchor ( intf_thread_t *p_intf )
428 decoder_t *p_cmml_decoder;
429 char *psz_url = NULL;
432 msg_Dbg( p_intf, "User followed anchor" );
434 p_sys = p_intf->p_sys;
435 p_cmml_decoder = p_sys->p_cmml_decoder;
437 if( var_Get( p_cmml_decoder, "psz-current-anchor-url", &val ) ==
440 if( val.p_address ) psz_url = val.p_address;
443 #ifdef CMML_INTF_DEBUG
444 msg_Dbg( p_intf, "Current URL is \"%s\"", psz_url );
449 playlist_t *p_playlist;
450 playlist_item_t *p_current_item;
451 char *psz_uri_to_load;
455 p_playlist = (playlist_t *) vlc_object_find( p_intf,
456 VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
459 msg_Warn( p_intf, "can't find playlist" );
464 p_current_item = p_playlist->status.p_item;
465 #ifdef CMML_INTF_DEBUG
466 msg_Dbg( p_intf, "Current playlist item URL is \"%s\"",
467 p_current_item->input.psz_uri );
470 psz_uri_to_load = XURL_Concat( p_current_item->p_input->psz_uri,
473 #ifdef CMML_INTF_DEBUG
474 msg_Dbg( p_intf, "URL to load is \"%s\"", psz_uri_to_load );
477 if( var_Get( p_intf->p_sys->p_input, "time", &time ) )
479 msg_Dbg( p_intf, "couldn't get time from current clip" );
482 i_seconds = time.i_time / 1000000;
483 #ifdef CMML_INTF_DEBUG
484 msg_Dbg( p_intf, "Current time is \"%lld\"", i_seconds );
487 /* TODO: we need a (much) more robust way of detecting whether
488 * the file's a media file ... */
489 if( strstr( psz_uri_to_load, ".anx" ) != NULL )
491 history_t *p_history = NULL;
492 history_item_t *p_history_item = NULL;
495 p_history = GetHistory( p_playlist );
497 /* create history item */
498 psz_timed_url = GetTimedURLFromPlaylistItem( p_intf, p_current_item );
499 p_history_item = historyItem_New( psz_timed_url, psz_timed_url );
500 free( psz_timed_url );
502 if( !p_history_item )
504 msg_Warn( p_intf, "could not initialise history item" );
508 #ifdef CMML_INTF_DEBUG
509 msg_Dbg( p_intf, "history pre-index %d", p_history->i_index );
511 history_PruneAndInsert( p_history, p_history_item );
512 #ifdef CMML_INTF_DEBUG
513 msg_Dbg( p_intf, "new history item at %p, uri is \"%s\"",
514 p_history_item, p_history_item->psz_uri );
515 msg_Dbg( p_intf, "history index now %d", p_history->i_index );
519 /* free current-anchor-url */
521 val.p_address = NULL;
522 if( var_Set( p_cmml_decoder, "psz-current-anchor-url", val ) !=
525 msg_Dbg( p_intf, "couldn't reset psz-current-anchor-url" );
528 ReplacePlaylistItem( p_playlist, psz_uri_to_load );
532 #ifdef CMML_INTF_DEBUG
533 msg_Dbg( p_intf, "calling browser_Open with \"%s\"", psz_url );
535 (void) browser_Open( psz_url );
536 playlist_Control( p_playlist, PLAYLIST_PAUSE, VLC_TRUE, 0 );
539 free( psz_uri_to_load );
541 vlc_object_release( p_playlist );
546 char *GetTimedURLFromPlaylistItem( intf_thread_t *p_intf,
547 playlist_item_t *p_current_item )
549 #ifdef CMML_INTF_USE_TIMED_URIS
550 char *psz_url = NULL;
551 char *psz_return_value = NULL;
552 char *psz_seconds = NULL;
555 psz_url = XURL_GetWithoutFragment( p_current_item->input->psz_uri );
557 /* Get current time as a string */
558 if( XURL_IsFileURL( psz_url ) == VLC_TRUE )
559 psz_url = xstrcat( psz_url, "#" );
561 psz_url = xstrcat( psz_url, "?" );
563 /* jump back to 2 seconds before where we are now */
564 i_seconds = GetCurrentTimeInSeconds( p_intf->p_sys->p_input ) - 2;
565 psz_seconds = GetTimedURIFragmentForTime( i_seconds < 0 ? 0 : i_seconds );
568 psz_url = xstrcat( psz_url, psz_seconds );
570 psz_return_value = psz_url;
573 return psz_return_value;
577 /* Suppress warning messages about unused functions */
578 p = GetTimedURIFragmentForTime; /* unused */
579 p = GetCurrentTimeInSeconds; /* unused */
581 return strdup( p_current_item->p_input->psz_uri );
587 * Get the current time, rounded down to the nearest second
589 * http://www.ietf.org/internet-drafts/draft-pfeiffer-temporal-fragments-02.txt
592 int GetCurrentTimeInSeconds( input_thread_t *p_input )
597 var_Get( p_input, "time", &time );
598 i_seconds = time.i_time / 1000000;
603 char *GetTimedURIFragmentForTime( int seconds )
607 asprintf( &psz_time, "%d", seconds );
612 int GoBackCallback( vlc_object_t *p_this, char const *psz_var,
613 vlc_value_t oldval, vlc_value_t newval, void *p_data )
615 intf_thread_t *p_intf = (intf_thread_t *) p_data;
621 int GoForwardCallback( vlc_object_t *p_this, char const *psz_var,
622 vlc_value_t oldval, vlc_value_t newval, void *p_data )
624 intf_thread_t *p_intf = (intf_thread_t *) p_data;
630 int FollowAnchorCallback( vlc_object_t *p_this, char const *psz_var,
631 vlc_value_t oldval, vlc_value_t newval,
634 intf_thread_t *p_intf = (intf_thread_t *) p_data;
635 FollowAnchor( p_intf );
640 void GoBack( intf_thread_t *p_intf )
643 history_t *p_history = NULL;
644 history_item_t *p_history_item = NULL;
645 history_item_t *p_new_history_item = NULL;
646 playlist_t *p_playlist = NULL;
647 char *psz_timed_url = NULL;
648 playlist_item_t *p_current_item;
650 #ifdef CMML_INTF_DEBUG
651 msg_Dbg( p_intf, "Going back in navigation history" );
654 /* Find the playlist */
655 p_playlist = (playlist_t *) vlc_object_find( p_intf,
656 VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
659 msg_Warn( p_intf, "can't find playlist" );
663 /* Retrieve navigation history from playlist */
664 if( var_Get( p_playlist, "navigation-history", &history ) != VLC_SUCCESS ||
667 /* History doesn't exist yet: ignore user's request */
668 msg_Warn( p_intf, "can't go back: no history exists yet" );
669 vlc_object_release( p_playlist );
673 p_history = history.p_address;
674 #ifdef CMML_INTF_DEBUG
675 msg_Dbg( p_intf, "back: nav history retrieved from %p", p_history );
676 msg_Dbg( p_intf, "nav history index:%d, p_xarray:%p", p_history->i_index,
677 p_history->p_xarray );
680 /* Check whether we can go back in the history */
681 if( history_CanGoBack( p_history ) == VLC_FALSE )
683 msg_Warn( p_intf, "can't go back: already at beginning of history" );
684 vlc_object_release( p_playlist );
688 p_current_item = p_playlist->status.p_item;
690 /* Save the currently-playing media in a new history item */
691 psz_timed_url = GetTimedURLFromPlaylistItem( p_intf, p_current_item );
692 p_new_history_item = historyItem_New( psz_timed_url, psz_timed_url );
693 free( psz_timed_url );
695 if( !p_new_history_item )
697 #ifdef CMML_INTF_DEBUG
698 msg_Dbg( p_intf, "back: could not initialise new history item" );
700 vlc_object_release( p_playlist );
704 /* Go back in the history, saving the currently-playing item */
705 (void) history_GoBackSavingCurrentItem( p_history, p_new_history_item );
706 p_history_item = history_Item( p_history );
708 #ifdef CMML_INTF_DEBUG
709 msg_Dbg( p_intf, "retrieving item from h index %d", p_history->i_index );
710 msg_Dbg( p_intf, "got previous history item: %p", p_history_item );
711 msg_Dbg( p_intf, "prev history item URL: \"%s\"", p_history_item->psz_uri );
714 ReplacePlaylistItem( p_playlist, p_history_item->psz_uri );
715 vlc_object_release( p_playlist );
719 void GoForward( intf_thread_t *p_intf )
722 history_t *p_history = NULL;
723 history_item_t *p_history_item = NULL;
724 history_item_t *p_new_history_item = NULL;
725 playlist_t *p_playlist = NULL;
726 playlist_item_t *p_current_item;
728 #ifdef CMML_INTF_DEBUG
729 msg_Dbg( p_intf, "Going forward in navigation history" );
732 /* Find the playlist */
733 p_playlist = (playlist_t *) vlc_object_find( p_intf,
734 VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
737 msg_Warn( p_intf, "can't find playlist" );
741 /* Retrieve navigation history from playlist */
742 if( var_Get( p_playlist, "navigation-history", &history ) != VLC_SUCCESS ||
745 /* History doesn't exist yet: ignore user's request */
746 msg_Warn( p_intf, "can't go back: no history exists yet" );
747 vlc_object_release( p_playlist );
751 p_history = history.p_address;
752 #ifdef CMML_INTF_DEBUG
753 msg_Dbg( p_intf, "forward: nav history retrieved from %p", p_history );
754 msg_Dbg( p_intf, "nav history index:%d, p_xarray:%p", p_history->i_index,
755 p_history->p_xarray );
758 /* Check whether we can go forward in the history */
759 if( history_CanGoForward( p_history ) == VLC_FALSE )
761 msg_Warn( p_intf, "can't go forward: already at end of history" );
762 vlc_object_release( p_playlist );
766 /* Save the currently-playing media in a new history item */
767 p_new_history_item = malloc( sizeof(history_item_t) );
768 if( !p_new_history_item )
770 #ifdef CMML_INTF_DEBUG
771 msg_Dbg( p_intf, "forward: could not initialise new history item" );
773 vlc_object_release( p_playlist );
776 p_current_item = p_playlist->status.p_item;
777 p_new_history_item->psz_uri = GetTimedURLFromPlaylistItem( p_intf,
779 p_new_history_item->psz_name = p_new_history_item->psz_uri;
781 /* Go forward in the history, saving the currently-playing item */
782 (void) history_GoForwardSavingCurrentItem( p_history, p_new_history_item );
783 p_history_item = history_Item( p_history );
785 #ifdef CMML_INTF_DEBUG
786 msg_Dbg( p_intf, "retrieving item from h index %d", p_history->i_index );
787 msg_Dbg( p_intf, "got next history item: %p", p_history_item );
788 msg_Dbg( p_intf, "next history item URL: \"%s\"", p_history_item->psz_uri );
791 ReplacePlaylistItem( p_playlist, p_history_item->psz_uri );
792 vlc_object_release( p_playlist );
795 static void ReplacePlaylistItem( playlist_t *p_playlist, char *psz_uri )
797 playlist_Stop( p_playlist );
798 (void) playlist_Add( p_playlist, psz_uri, psz_uri,
799 PLAYLIST_INSERT /* FIXME: used to be PLAYLIST_REPLACE */, PLAYLIST_END|PLAYLIST_GO, VLC_TRUE /* FIXME: p_playlist->status.i_index */ );
802 /****************************************************************************
803 * DisplayAnchor: displays an anchor on the given video output
804 ****************************************************************************/
805 static int DisplayAnchor( intf_thread_t *p_intf,
806 vout_thread_t *p_vout,
807 char *psz_anchor_description,
808 char *psz_anchor_url )
810 int i_margin_h, i_margin_v;
822 /* Should display subtitle underlined and in blue, but it looks
823 * like VLC doesn't implement any text styles yet. D'oh! */
824 // p_style = &blue_with_underline;
828 /* TODO: p_subpicture doesn't have the proper i_x and i_y
829 * coordinates. Need to look at the subpicture display system to
831 if ( vout_ShowTextAbsolute( p_vout, DEFAULT_CHAN,
832 psz_anchor_description, NULL, OSD_ALIGN_BOTTOM,
833 i_margin_h, i_margin_v, i_now, 0 ) == VLC_SUCCESS )
835 /* Displayed successfully */
844 msg_Dbg( p_intf, "DisplayAnchor couldn't find a video output" );
851 static history_t * GetHistory( playlist_t *p_playlist )
854 history_t *p_history = NULL;
856 if( var_Get( p_playlist, "navigation-history", &val ) != VLC_SUCCESS )
858 /* history doesn't exist yet: need to create it */
859 history_t *new_history = history_New();
860 val.p_address = new_history;
861 var_Create( p_playlist, "navigation-history",
862 VLC_VAR_ADDRESS|VLC_VAR_DOINHERIT );
863 if( var_Set( p_playlist, "navigation-history", val ) != VLC_SUCCESS )
865 msg_Warn( p_playlist, "could not initialise history" );
869 p_history = new_history;
870 #ifdef CMML_INTF_HISTORY_DEBUG
871 msg_Dbg( p_playlist, "nav history created at %p", new_history );
872 msg_Dbg( p_playlist, "nav history index:%d, p_xarray:%p",
873 p_history->i_index, p_history->p_xarray );
879 p_history = val.p_address;
880 #ifdef CMML_INTF_HISTORY_DEBUG
881 msg_Dbg( p_playlist, "nav history retrieved from %p", p_history );