Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
d1208fa6
Commit
d1208fa6
authored
May 30, 2003
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/gui/beos/* : misc fixes & enhancements
parent
f574db49
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
193 additions
and
146 deletions
+193
-146
modules/gui/beos/Interface.cpp
modules/gui/beos/Interface.cpp
+6
-6
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/InterfaceWindow.cpp
+71
-50
modules/gui/beos/InterfaceWindow.h
modules/gui/beos/InterfaceWindow.h
+7
-4
modules/gui/beos/MediaControlView.cpp
modules/gui/beos/MediaControlView.cpp
+3
-3
modules/gui/beos/MsgVals.h
modules/gui/beos/MsgVals.h
+52
-48
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.cpp
+51
-31
modules/gui/beos/VlcWrapper.h
modules/gui/beos/VlcWrapper.h
+3
-4
No files found.
modules/gui/beos/Interface.cpp
View file @
d1208fa6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
* intf_beos.cpp: beos interface
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: Interface.cpp,v 1.1
2 2003/05/03 13:37:21
titer Exp $
* $Id: Interface.cpp,v 1.1
3 2003/05/30 17:30:54
titer Exp $
*
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
...
@@ -126,11 +126,11 @@ static void Run( intf_thread_t *p_intf )
...
@@ -126,11 +126,11 @@ static void Run( intf_thread_t *p_intf )
{
{
while
(
!
p_intf
->
b_die
)
while
(
!
p_intf
->
b_die
)
{
{
if
(
p_intf
->
p_sys
->
p_wrapper
->
UpdateInput
()
)
/* Update VlcWrapper internals (p_input, etc) */
{
p_intf
->
p_sys
->
p_wrapper
->
UpdateInput
();
/* Manage the slider */
p_intf
->
p_sys
->
p_window
->
UpdateInterface
();
/* Manage the slider */
}
p_intf
->
p_sys
->
p_window
->
UpdateInterface
();
/* Wait a bit */
/* Wait a bit */
msleep
(
INTF_IDLE_SLEEP
);
msleep
(
INTF_IDLE_SLEEP
);
...
...
modules/gui/beos/InterfaceWindow.cpp
View file @
d1208fa6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface
* InterfaceWindow.cpp: beos interface
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.cpp,v 1.
39 2003/05/27 13:22:45
titer Exp $
* $Id: InterfaceWindow.cpp,v 1.
40 2003/05/30 17:30:54
titer Exp $
*
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
...
@@ -283,12 +283,20 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char* name,
...
@@ -283,12 +283,20 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char* name,
/* Add the Speed menu */
/* Add the Speed menu */
fSpeedMenu
=
new
BMenu
(
_
(
"Speed"
)
);
fSpeedMenu
=
new
BMenu
(
_
(
"Speed"
)
);
fSpeedMenu
->
SetRadioMode
(
true
);
fSpeedMenu
->
SetRadioMode
(
true
);
fSpeedMenu
->
AddItem
(
fSlowerMI
=
new
BMenuItem
(
_
(
"Slower"
),
new
BMessage
(
SLOWER_PLAY
)
)
);
fSpeedMenu
->
AddItem
(
fNormalMI
=
new
BMenuItem
(
_
(
"Normal"
),
new
BMessage
(
NORMAL_PLAY
)
);
fHeighthMI
=
new
BMenuItem
(
"1/8x"
,
new
BMessage
(
HEIGHTH_PLAY
)
)
);
fNormalMI
->
SetMarked
(
true
);
// default to normal speed
fSpeedMenu
->
AddItem
(
fSpeedMenu
->
AddItem
(
fNormalMI
);
fQuarterMI
=
new
BMenuItem
(
"1/4x"
,
new
BMessage
(
QUARTER_PLAY
)
)
);
fSpeedMenu
->
AddItem
(
fFasterMI
=
new
BMenuItem
(
_
(
"Faster"
),
new
BMessage
(
FASTER_PLAY
)
)
);
fSpeedMenu
->
AddItem
(
fSpeedMenu
->
SetTargetForItems
(
this
);
fHalfMI
=
new
BMenuItem
(
"1/2x"
,
new
BMessage
(
HALF_PLAY
)
)
);
fSpeedMenu
->
AddItem
(
fNormalMI
=
new
BMenuItem
(
"1x"
,
new
BMessage
(
NORMAL_PLAY
)
)
);
fSpeedMenu
->
AddItem
(
fTwiceMI
=
new
BMenuItem
(
"2x"
,
new
BMessage
(
TWICE_PLAY
)
)
);
fSpeedMenu
->
AddItem
(
fFourMI
=
new
BMenuItem
(
"4x"
,
new
BMessage
(
FOUR_PLAY
)
)
);
fSpeedMenu
->
AddItem
(
fHeightMI
=
new
BMenuItem
(
"8x"
,
new
BMessage
(
HEIGHT_PLAY
)
)
);
fMenuBar
->
AddItem
(
fSpeedMenu
);
fMenuBar
->
AddItem
(
fSpeedMenu
);
/* Add the Show menu */
/* Add the Show menu */
...
@@ -436,30 +444,34 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
...
@@ -436,30 +444,34 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
}
}
break
;
break
;
case
FASTER_PLAY
:
case
HEIGHTH_PLAY
:
/* cycle the fast playback modes */
p_wrapper
->
InputSetRate
(
DEFAULT_RATE
*
8
);
if
(
playback_status
>
UNDEF_S
)
{
p_wrapper
->
InputFaster
();
}
break
;
break
;
case
SLOWER_PLAY
:
case
QUARTER_PLAY
:
/* cycle the slow playback modes */
p_wrapper
->
InputSetRate
(
DEFAULT_RATE
*
4
);
if
(
playback_status
>
UNDEF_S
)
{
p_wrapper
->
InputSlower
();
}
break
;
break
;
case
HALF_PLAY
:
p_wrapper
->
InputSetRate
(
DEFAULT_RATE
*
2
);
break
;
case
NORMAL_PLAY
:
case
NORMAL_PLAY
:
/* restore speed to normal if already playing */
p_wrapper
->
InputSetRate
(
DEFAULT_RATE
);
if
(
playback_status
>
UNDEF_S
)
{
p_wrapper
->
PlaylistPlay
();
}
break
;
break
;
case
TWICE_PLAY
:
p_wrapper
->
InputSetRate
(
DEFAULT_RATE
/
2
);
break
;
case
FOUR_PLAY
:
p_wrapper
->
InputSetRate
(
DEFAULT_RATE
/
4
);
break
;
case
HEIGHT_PLAY
:
p_wrapper
->
InputSetRate
(
DEFAULT_RATE
/
8
);
break
;
case
SEEK_PLAYBACK
:
case
SEEK_PLAYBACK
:
/* handled by semaphores */
/* handled by semaphores */
break
;
break
;
...
@@ -860,32 +872,41 @@ InterfaceWindow::_SetMenusEnabled(bool hasFile, bool hasChapters, bool hasTitles
...
@@ -860,32 +872,41 @@ InterfaceWindow::_SetMenusEnabled(bool hasFile, bool hasChapters, bool hasTitles
void
void
InterfaceWindow
::
_UpdateSpeedMenu
(
int
rate
)
InterfaceWindow
::
_UpdateSpeedMenu
(
int
rate
)
{
{
if
(
rate
==
DEFAULT_RATE
)
BMenuItem
*
toMark
=
NULL
;
{
if
(
!
fNormalMI
->
IsMarked
()
)
switch
(
rate
)
fNormalMI
->
SetMarked
(
true
);
}
else
if
(
rate
<
DEFAULT_RATE
)
{
if
(
!
fFasterMI
->
IsMarked
()
)
fFasterMI
->
SetMarked
(
true
);
}
else
{
{
if
(
!
fSlowerMI
->
IsMarked
()
)
case
(
DEFAULT_RATE
*
8
):
fSlowerMI
->
SetMarked
(
true
);
toMark
=
fHeighthMI
;
break
;
case
(
DEFAULT_RATE
*
4
):
toMark
=
fQuarterMI
;
break
;
case
(
DEFAULT_RATE
*
2
):
toMark
=
fHalfMI
;
break
;
case
(
DEFAULT_RATE
):
toMark
=
fNormalMI
;
break
;
case
(
DEFAULT_RATE
/
2
):
toMark
=
fTwiceMI
;
break
;
case
(
DEFAULT_RATE
/
4
):
toMark
=
fFourMI
;
break
;
case
(
DEFAULT_RATE
/
8
):
toMark
=
fHeightMI
;
break
;
}
}
}
/*****************************************************************************
if
(
!
toMark
->
IsMarked
()
)
* InterfaceWindow::_InputStreamChanged
toMark
->
SetMarked
(
true
);
*****************************************************************************/
void
InterfaceWindow
::
_InputStreamChanged
()
{
// TODO: move more stuff from updateInterface() here!
snooze
(
400000
);
p_wrapper
->
SetVolume
(
p_mediaControl
->
GetVolume
()
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
modules/gui/beos/InterfaceWindow.h
View file @
d1208fa6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* InterfaceWindow.h: BeOS interface window class prototype
* InterfaceWindow.h: BeOS interface window class prototype
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.h,v 1.1
3 2003/02/10 15:23:46
titer Exp $
* $Id: InterfaceWindow.h,v 1.1
4 2003/05/30 17:30:54
titer Exp $
*
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
* Tony Castley <tcastley@mail.powerup.com.au>
...
@@ -114,7 +114,6 @@ class InterfaceWindow : public BWindow
...
@@ -114,7 +114,6 @@ class InterfaceWindow : public BWindow
bool
hasChapters
=
false
,
bool
hasChapters
=
false
,
bool
hasTitles
=
false
);
bool
hasTitles
=
false
);
void
_UpdateSpeedMenu
(
int
rate
);
void
_UpdateSpeedMenu
(
int
rate
);
void
_InputStreamChanged
();
void
_ShowFilePanel
(
uint32
command
,
void
_ShowFilePanel
(
uint32
command
,
const
char
*
windowTitle
);
const
char
*
windowTitle
);
void
_RestoreSettings
();
void
_RestoreSettings
();
...
@@ -134,9 +133,13 @@ class InterfaceWindow : public BWindow
...
@@ -134,9 +133,13 @@ class InterfaceWindow : public BWindow
BMenuItem
*
fNextChapterMI
;
BMenuItem
*
fNextChapterMI
;
BMenuItem
*
fPrevChapterMI
;
BMenuItem
*
fPrevChapterMI
;
BMenuItem
*
fOnTopMI
;
BMenuItem
*
fOnTopMI
;
BMenuItem
*
fSlowerMI
;
BMenuItem
*
fHeighthMI
;
BMenuItem
*
fQuarterMI
;
BMenuItem
*
fHalfMI
;
BMenuItem
*
fNormalMI
;
BMenuItem
*
fNormalMI
;
BMenuItem
*
fFasterMI
;
BMenuItem
*
fTwiceMI
;
BMenuItem
*
fFourMI
;
BMenuItem
*
fHeightMI
;
BMenu
*
fAudioMenu
;
BMenu
*
fAudioMenu
;
BMenu
*
fNavigationMenu
;
BMenu
*
fNavigationMenu
;
BMenu
*
fTitleMenu
;
BMenu
*
fTitleMenu
;
...
...
modules/gui/beos/MediaControlView.cpp
View file @
d1208fa6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* MediaControlView.cpp: beos interface
* MediaControlView.cpp: beos interface
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MediaControlView.cpp,v 1.1
7 2003/05/25 23:08:4
4 titer Exp $
* $Id: MediaControlView.cpp,v 1.1
8 2003/05/30 17:30:5
4 titer Exp $
*
*
* Authors: Tony Castley <tony@castley.net>
* Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
* Stephan Aßmus <stippi@yellowbites.com>
...
@@ -86,8 +86,8 @@ MediaControlView::MediaControlView(BRect frame, intf_thread_t *p_interface)
...
@@ -86,8 +86,8 @@ MediaControlView::MediaControlView(BRect frame, intf_thread_t *p_interface)
BRect
frame
(
0.0
,
0.0
,
10.0
,
10.0
);
BRect
frame
(
0.0
,
0.0
,
10.0
,
10.0
);
// Seek Slider
// Seek Slider
fSeekSlider
=
new
SeekSlider
(
frame
,
"seek slider"
,
this
,
fSeekSlider
=
new
SeekSlider
(
frame
,
"seek slider"
,
this
,
0
,
SEEKSLIDER_RANGE
-
1
);
0
,
SEEKSLIDER_RANGE
);
fSeekSlider
->
SetValue
(
0
);
fSeekSlider
->
SetValue
(
0
);
fSeekSlider
->
ResizeToPreferred
();
fSeekSlider
->
ResizeToPreferred
();
AddChild
(
fSeekSlider
);
AddChild
(
fSeekSlider
);
...
...
modules/gui/beos/MsgVals.h
View file @
d1208fa6
...
@@ -2,23 +2,23 @@
...
@@ -2,23 +2,23 @@
* MsgVals.h
* MsgVals.h
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: MsgVals.h,v 1.
8 2003/05/08 10:40:31
titer Exp $
* $Id: MsgVals.h,v 1.
9 2003/05/30 17:30:54
titer Exp $
*
*
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Stephan Aßmus <stippi@yellowbites.com>
* Stephan Aßmus <stippi@yellowbites.com>
*
*
* This program is free software
;
you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation
;
either version 2 of the License, or
* the Free Software Foundation either version 2 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY
;
without even the implied warranty of
* but WITHOUT ANY WARRANTY without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License
* along with this program
;
if not, write to the Free Software
* along with this program if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
*****************************************************************************/
...
@@ -28,49 +28,53 @@
...
@@ -28,49 +28,53 @@
#define PLAYING 0
#define PLAYING 0
#define PAUSED 1
#define PAUSED 1
const
uint32
OPEN_FILE
=
'
opfl
'
;
#define OPEN_FILE 'opfl'
const
uint32
OPEN_DVD
=
'
opdv
'
;
#define OPEN_DVD 'opdv'
const
uint32
LOAD_SUBFILE
=
'
losu
'
;
#define LOAD_SUBFILE 'losu'
const
uint32
SUBFILE_RECEIVED
=
'
sure
'
;
#define SUBFILE_RECEIVED 'sure'
const
uint32
OPEN_PLAYLIST
=
'
oppl
'
;
#define OPEN_PLAYLIST 'oppl'
const
uint32
STOP_PLAYBACK
=
'
stpl
'
;
#define STOP_PLAYBACK 'stpl'
const
uint32
START_PLAYBACK
=
'
play
'
;
#define START_PLAYBACK 'play'
const
uint32
PAUSE_PLAYBACK
=
'
papl
'
;
#define PAUSE_PLAYBACK 'papl'
const
uint32
FASTER_PLAY
=
'
fapl
'
;
#define HEIGHTH_PLAY 'hhpl'
const
uint32
SLOWER_PLAY
=
'
slpl
'
;
#define QUARTER_PLAY 'qupl'
const
uint32
NORMAL_PLAY
=
'
nrpl
'
;
#define HALF_PLAY 'hapl'
const
uint32
SEEK_PLAYBACK
=
'
seek
'
;
#define NORMAL_PLAY 'nrpl'
const
uint32
VOLUME_CHG
=
'
voch
'
;
#define TWICE_PLAY 'twpl'
const
uint32
VOLUME_MUTE
=
'
mute
'
;
#define FOUR_PLAY 'fopl'
const
uint32
SELECT_CHANNEL
=
'
chan
'
;
#define HEIGHT_PLAY 'hepl'
const
uint32
SELECT_SUBTITLE
=
'
subt
'
;
#define SEEK_PLAYBACK 'seek'
const
uint32
PREV_TITLE
=
'
prti
'
;
#define VOLUME_CHG 'voch'
const
uint32
NEXT_TITLE
=
'
nxti
'
;
#define VOLUME_MUTE 'mute'
const
uint32
TOGGLE_TITLE
=
'
tgti
'
;
#define SELECT_CHANNEL 'chan'
const
uint32
NAVIGATE_MENU
=
'
navm
'
;
#define SELECT_SUBTITLE 'subt'
const
uint32
PREV_CHAPTER
=
'
prch
'
;
#define PREV_TITLE 'prti'
const
uint32
NEXT_CHAPTER
=
'
nxch
'
;
#define NEXT_TITLE 'nxti'
const
uint32
TOGGLE_CHAPTER
=
'
tgch
'
;
#define TOGGLE_TITLE 'tgti'
const
uint32
PREV_FILE
=
'
prfl
'
;
#define NAVIGATE_MENU 'navm'
const
uint32
NEXT_FILE
=
'
nxfl
'
;
#define PREV_CHAPTER 'prch'
const
uint32
NAVIGATE_PREV
=
'
navp
'
;
// could be chapter, title or file
#define NEXT_CHAPTER 'nxch'
const
uint32
NAVIGATE_NEXT
=
'
navn
'
;
// could be chapter, title or file
#define TOGGLE_CHAPTER 'tgch'
const
uint32
OPEN_PREFERENCES
=
'
pref
'
;
#define PREV_FILE 'prfl'
const
uint32
OPEN_MESSAGES
=
'
mess
'
;
#define NEXT_FILE 'nxfl'
const
uint32
TOGGLE_ON_TOP
=
'
ontp
'
;
#define NAVIGATE_PREV 'navp' // could be chapter, title or file
const
uint32
SHOW_INTERFACE
=
'
shin
'
;
#define NAVIGATE_NEXT 'navn' // could be chapter, title or file
const
uint32
TOGGLE_FULL_SCREEN
=
'
tgfs
'
;
#define OPEN_PREFERENCES 'pref'
const
uint32
RESIZE_50
=
'
rshl
'
;
#define OPEN_MESSAGES 'mess'
const
uint32
RESIZE_100
=
'
rsor
'
;
#define TOGGLE_ON_TOP 'ontp'
const
uint32
RESIZE_200
=
'
rsdb
'
;
#define SHOW_INTERFACE 'shin'
const
uint32
RESIZE_TRUE
=
'
rstr
'
;
#define TOGGLE_FULL_SCREEN 'tgfs'
const
uint32
ASPECT_CORRECT
=
'
asco
'
;
#define RESIZE_50 'rshl'
const
uint32
VERT_SYNC
=
'
vsyn
'
;
#define RESIZE_100 'rsor'
const
uint32
WINDOW_FEEL
=
'
wfel
'
;
#define RESIZE_200 'rsdb'
const
uint32
SCREEN_SHOT
=
'
scrn
'
;
#define RESIZE_TRUE 'rstr'
const
uint32
MSG_UPDATE
=
'
updt
'
;
#define ASPECT_CORRECT 'asco'
const
uint32
MSG_SOUNDPLAY
=
'
move
'
;
// drag'n'drop from soundplay playlist
#define VERT_SYNC 'vsyn'
const
uint32
INTERFACE_CREATED
=
'
ifcr
'
;
/* see VlcApplication::MessageReceived()
#define WINDOW_FEEL 'wfel'
#define SCREEN_SHOT 'scrn'
#define MSG_UPDATE 'updt'
#define MSG_SOUNDPLAY 'move' // drag'n'drop from soundplay playlist
#define INTERFACE_CREATED 'ifcr'
/* see VlcApplication::MessageReceived()
* in src/misc/beos_specific.cpp */
* in src/misc/beos_specific.cpp */
#endif // BEOS_MESSAGE_VALUES_H
#endif // BEOS_MESSAGE_VALUES_H
modules/gui/beos/VlcWrapper.cpp
View file @
d1208fa6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.cpp,v 1.3
0 2003/05/07 14:49:19
titer Exp $
* $Id: VlcWrapper.cpp,v 1.3
1 2003/05/30 17:30:54
titer Exp $
*
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#include <vlc/vout.h>
#include <vlc/vout.h>
extern
"C"
extern
"C"
{
{
#include <input_ext-plugins.h>
// needed here when compiling without plugins
#include <input_ext-plugins.h>
// needed here when compiling without plugins
#include <audio_output.h>
#include <audio_output.h>
#include <aout_internal.h>
#include <aout_internal.h>
}
}
...
@@ -62,35 +62,25 @@ VlcWrapper::VlcWrapper( intf_thread_t *p_interface )
...
@@ -62,35 +62,25 @@ VlcWrapper::VlcWrapper( intf_thread_t *p_interface )
VlcWrapper
::~
VlcWrapper
()
VlcWrapper
::~
VlcWrapper
()
{
{
if
(
p_input
)
if
(
p_input
)
{
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
}
if
(
p_playlist
)
if
(
p_playlist
)
{
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
}
}
/* UpdateInput: updates p_input, returns true if the interface needs to
/* UpdateInput: updates p_input */
be updated */
void
VlcWrapper
::
UpdateInput
()
bool
VlcWrapper
::
UpdateInput
()
{
{
if
(
p_input
==
NULL
)
if
(
!
p_input
)
{
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_INPUT
,
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
FIND_ANYWHERE
);
}
if
(
p_input
!=
NULL
)
if
(
p_input
)
{
if
(
p_input
->
b_dead
)
if
(
p_input
->
b_dead
)
{
{
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
p_input
=
NULL
;
p_input
=
NULL
;
}
}
return
true
;
}
return
false
;
}
}
...
@@ -106,34 +96,64 @@ bool VlcWrapper::HasInput()
...
@@ -106,34 +96,64 @@ bool VlcWrapper::HasInput()
int
VlcWrapper
::
InputStatus
()
int
VlcWrapper
::
InputStatus
()
{
{
if
(
!
p_input
)
if
(
!
p_input
)
{
return
UNDEF_S
;
return
UNDEF_S
;
}
return
p_input
->
stream
.
control
.
i_status
;
return
p_input
->
stream
.
control
.
i_status
;
}
}
int
VlcWrapper
::
InputRate
()
int
VlcWrapper
::
InputRate
()
{
{
if
(
!
p_input
)
if
(
!
p_input
)
{
return
DEFAULT_RATE
;
return
DEFAULT_RATE
;
}
return
p_input
->
stream
.
control
.
i_rate
;
return
p_input
->
stream
.
control
.
i_rate
;
}
}
void
VlcWrapper
::
InputS
lower
(
)
void
VlcWrapper
::
InputS
etRate
(
int
rate
)
{
{
if
(
p_input
!=
NULL
)
if
(
!
p_input
)
return
;
int
times
=
0
;
int
oldrate
=
InputRate
();
switch
(
(
rate
>
oldrate
)
?
(
rate
/
oldrate
)
:
(
oldrate
/
rate
)
)
{
{
input_SetStatus
(
p_input
,
INPUT_STATUS_SLOWER
);
case
64
:
times
=
6
;
break
;
case
32
:
times
=
5
;
break
;
case
16
:
times
=
4
;
break
;
case
8
:
times
=
3
;
break
;
case
4
:
times
=
2
;
break
;
case
2
:
times
=
1
;
break
;
}
}
}
void
VlcWrapper
::
InputFaster
()
int
newrate
=
oldrate
;
{
for
(
int
i
=
0
;
i
<
times
;
i
++
)
if
(
p_input
!=
NULL
)
{
{
input_SetStatus
(
p_input
,
INPUT_STATUS_FASTER
);
if
(
rate
>
oldrate
)
{
input_SetStatus
(
p_input
,
INPUT_STATUS_SLOWER
);
newrate
*=
2
;
}
else
{
input_SetStatus
(
p_input
,
INPUT_STATUS_FASTER
);
newrate
/=
2
;
}
/* Wait it's actually done */
while
(
InputRate
()
!=
newrate
)
msleep
(
10000
);
}
}
}
}
...
@@ -317,9 +337,9 @@ void VlcWrapper::SetTimeAsFloat( float f_position )
...
@@ -317,9 +337,9 @@ void VlcWrapper::SetTimeAsFloat( float f_position )
if
(
p_input
!=
NULL
)
if
(
p_input
!=
NULL
)
{
{
input_Seek
(
p_input
,
input_Seek
(
p_input
,
(
long
long
int
)(
p_input
->
stream
.
p_selected_area
->
i_size
(
long
long
)(
p_input
->
stream
.
p_selected_area
->
i_size
*
f_position
/
SEEKSLIDER_RANGE
),
*
f_position
/
SEEKSLIDER_RANGE
),
INPUT_SEEK_SET
);
INPUT_SEEK_SET
);
}
}
}
}
...
...
modules/gui/beos/VlcWrapper.h
View file @
d1208fa6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
* VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.h,v 1.2
3 2003/05/12 19:59:48
titer Exp $
* $Id: VlcWrapper.h,v 1.2
4 2003/05/30 17:30:54
titer Exp $
*
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
@@ -66,14 +66,13 @@ public:
...
@@ -66,14 +66,13 @@ public:
VlcWrapper
(
intf_thread_t
*
p_intf
);
VlcWrapper
(
intf_thread_t
*
p_intf
);
~
VlcWrapper
();
~
VlcWrapper
();
bool
UpdateInput
();
void
UpdateInput
();
/* Input */
/* Input */
bool
HasInput
();
bool
HasInput
();
int
InputStatus
();
int
InputStatus
();
int
InputRate
();
int
InputRate
();
void
InputSlower
();
void
InputSetRate
(
int
rate
);
void
InputFaster
();
BList
*
GetChannels
(
int
i_cat
);
BList
*
GetChannels
(
int
i_cat
);
void
ToggleLanguage
(
int
i_language
);
void
ToggleLanguage
(
int
i_language
);
void
ToggleSubtitle
(
int
i_subtitle
);
void
ToggleSubtitle
(
int
i_subtitle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment