VlcWrapper.h 4.18 KB
Newer Older
1
/*****************************************************************************
2
 * VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
3
4
 *****************************************************************************
 * Copyright (C) 2001 VideoLAN
5
 * $Id: VlcWrapper.h,v 1.10 2002/12/09 13:37:38 titer Exp $
6
7
8
 *
 * Authors: Florian G. Pflug <fgp@phlo.org>
 *          Jon Lech Johansen <jon-vl@nanocrew.net>
9
 *          Tony Castley <tony@castley.net>
10
 *          Stephan Aßmus <stippi@yellowbites.com>
11
 *          Eric Petit <titer@videolan.org>
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 *****************************************************************************/
Eric Petit's avatar
Eric Petit committed
27
28
29

#define SEEKSLIDER_RANGE 2048

30
class InterfaceWindow;
31
class VlcWrapper;
32
33

/*****************************************************************************
34
 * intf_sys_t: internal variables of the BeOS interface
35
36
37
 *****************************************************************************/
struct intf_sys_t
{
38
    InterfaceWindow * p_window;
39
40
41
42
    
    vlc_bool_t        b_loop;
    vlc_bool_t        b_mute;
    int	              i_part;
43
    audio_volume_t    i_saved_volume;
44
    int               i_channel;
45
    
46
    VlcWrapper * p_wrapper;
47
48
};

49
/*****************************************************************************
50
 * VlcWrapper
51
52
 *****************************************************************************
 * This class makes the link between the BeOS interface and the vlc core.
53
 * There is only one VlcWrapper instance at any time, which is stored
54
 * in p_intf->p_sys->p_wrapper
55
 *****************************************************************************/
56
class VlcWrapper
57
58
{
public:
59
60
    VlcWrapper( intf_thread_t *p_intf );
    ~VlcWrapper();
61
    
62
63
    bool UpdateInputAndAOut();
    
64
    /* input */
65
66
67
68
    int InputStatus();
    int InputRate();
    int InputTell();
    int InputSize();
69
70
71
72
73
74
75
76
77
78
    void InputSlower();
    void InputFaster();
    void openFiles( BList *o_files, bool replace = true );
    void openDisc( BString o_type, BString o_device,
                   int i_title, int i_chapter );
    void toggleLanguage( int i_language );
    void toggleSubtitle( int i_subtitle );
    const char* getTimeAsString();
    float getTimeAsFloat();
    void setTimeAsFloat( float i_offset );
79
    bool IsPlaying();
80
81
        
    /* Playlist */
82
83
84
    int PlaylistSize();
    char *PlaylistItemName( int );
    int PlaylistCurrent();
85
86
87
88
89
90
91
92
93
94
95
96
    int PlaylistStatus();
    bool PlaylistPlay();
    void PlaylistPause();
    void PlaylistStop();
    void PlaylistNext();
    void PlaylistPrev();
    void PlaylistSkip(int i);
    void PlaylistGoto(int i);
    void PlaylistLoop(); 
    BList* PlaylistAsArray();
    bool PlaylistPlaying();
    void getPlaylistInfo( int32& currentIndex,
97
                            int32& maxIndex );
98
    void PlaylistJumpTo( int );
99
    void getNavCapabilities( bool* canSkipPrev,
100
101
102
                             bool* canSkipNext );
	void navigatePrev();
	void navigateNext();
103

104
    /* audio */
105
106
107
108
109
    void SetVolume( int value );
    void VolumeMute();
    void VolumeRestore();
    bool IsMuted();
    bool HasAudio();
110

111
112
113
114
115
116
117
118
119
    /* DVD */
    bool HasTitles();
    void PrevTitle();
    void NextTitle();
    bool HasChapters();
    void PrevChapter();
    void NextChapter();
    void TitleInfo( int32& currentIndex, int32& maxIndex );
    void ChapterInfo( int32& currentIndex, int32& maxIndex );
120
121
    void toggleTitle( int i_title );
    void toggleChapter( int i_chapter );
122
    
123
private:
124
125
126
127
    intf_thread_t * p_intf;
    input_thread_t * p_input;
    playlist_t * p_playlist;
    aout_instance_t * p_aout;
128
129
};