1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2003 the VideoLAN team
7 * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #include "cmd_dvd.hpp"
25 #include <vlc_input.h>
26 #include <vlc_playlist.h>
28 void CmdDvdNextTitle::execute()
30 playlist_t
*pPlaylist
= getIntf()->p_sys
->p_playlist
;
31 input_thread_t
*p_input
= playlist_CurrentInput( pPlaylist
);
35 var_TriggerCallback( p_input
, "next-title" );
36 vlc_object_release( p_input
);
41 void CmdDvdPreviousTitle::execute()
43 playlist_t
*pPlaylist
= getIntf()->p_sys
->p_playlist
;
44 input_thread_t
*p_input
= playlist_CurrentInput( pPlaylist
);
48 var_TriggerCallback( p_input
, "prev-title" );
49 vlc_object_release( p_input
);
54 void CmdDvdNextChapter::execute()
56 playlist_t
*pPlaylist
= getIntf()->p_sys
->p_playlist
;
57 input_thread_t
*p_input
= playlist_CurrentInput( pPlaylist
);
61 var_TriggerCallback( p_input
, "next-chapter" );
62 vlc_object_release( p_input
);
67 void CmdDvdPreviousChapter::execute()
69 playlist_t
*pPlaylist
= getIntf()->p_sys
->p_playlist
;
70 input_thread_t
*p_input
= playlist_CurrentInput( pPlaylist
);
74 var_TriggerCallback( p_input
, "prev-chapter" );
75 vlc_object_release( p_input
);
80 void CmdDvdRootMenu::execute()
82 playlist_t
*pPlaylist
= getIntf()->p_sys
->p_playlist
;
83 input_thread_t
*p_input
= playlist_CurrentInput( pPlaylist
);
87 var_SetInteger( p_input
, "title 0", 2);
88 vlc_object_release( p_input
);