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
3b078b7b
Commit
3b078b7b
authored
Nov 27, 2002
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* AudioOutput.cpp: fixed a segfault
* ALL: cleaned the VlcWrapper class, removed unused code
parent
c19c673b
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
404 additions
and
483 deletions
+404
-483
modules/gui/beos/AudioOutput.cpp
modules/gui/beos/AudioOutput.cpp
+17
-13
modules/gui/beos/Interface.cpp
modules/gui/beos/Interface.cpp
+2
-2
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/InterfaceWindow.cpp
+12
-12
modules/gui/beos/InterfaceWindow.h
modules/gui/beos/InterfaceWindow.h
+2
-2
modules/gui/beos/MediaControlView.cpp
modules/gui/beos/MediaControlView.cpp
+3
-3
modules/gui/beos/PlayListWindow.h
modules/gui/beos/PlayListWindow.h
+2
-2
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.cpp
+319
-380
modules/gui/beos/VlcWrapper.h
modules/gui/beos/VlcWrapper.h
+47
-69
No files found.
modules/gui/beos/AudioOutput.cpp
View file @
3b078b7b
/*****************************************************************************
*
ao
ut.cpp: BeOS audio output
*
AudioOutp
ut.cpp: BeOS audio output
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: AudioOutput.cpp,v 1.1
6 2002/11/22 19:37:25
titer Exp $
* $Id: AudioOutput.cpp,v 1.1
7 2002/11/27 05:36:41
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -38,7 +38,8 @@
#include <vlc/aout.h>
#include <aout_internal.h>
#define FRAME_SIZE 2048
#define FRAME_SIZE 2048
#define BUFFER_SIZE 16384
/*****************************************************************************
* aout_sys_t: BeOS audio output method descriptor
...
...
@@ -94,12 +95,12 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
#endif
p_aout
->
output
.
output
.
i_format
=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
);
p_format
->
buffer_size
=
16384
;
p_format
->
buffer_size
=
BUFFER_SIZE
;
p_aout
->
output
.
i_nb_samples
=
FRAME_SIZE
;
p_aout
->
output
.
pf_play
=
DoNothing
;
p_sys
->
p_player
=
new
BSoundPlayer
(
p_format
,
"player"
,
Play
,
NULL
,
p_
this
);
Play
,
NULL
,
p_
aout
);
p_sys
->
p_player
->
Start
();
p_sys
->
p_player
->
SetHasData
(
true
);
...
...
@@ -122,22 +123,25 @@ void E_(CloseAudio) ( vlc_object_t *p_this )
/*****************************************************************************
* Play
*****************************************************************************/
static
void
Play
(
void
*
aout
,
void
*
buffer
,
size_t
size
,
static
void
Play
(
void
*
aout
,
void
*
p_buffer
,
size_t
i_
size
,
const
media_raw_audio_format
&
format
)
{
aout_buffer_t
*
p_aout_buffer
;
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
aout
;
float
*
p_buffer
=
(
float
*
)
buffer
;
p_aout_buffer
=
aout_FifoPop
(
p_aout
,
&
p_aout
->
output
.
fifo
);
if
(
p_aout_buffer
!=
NULL
)
{
memcpy
(
p_buffer
,
p_aout_buffer
->
p_buffer
,
MIN
(
size
,
p_aout_buffer
->
i_nb_bytes
)
);
aout_BufferFree
(
p_aout_buffer
);
/* sometimes p_aout_buffer is not NULL but still isn't valid.
we check i_nb_bytes so we are sure it is */
if
(
p_aout_buffer
->
i_nb_bytes
==
BUFFER_SIZE
)
{
memcpy
(
(
float
*
)
p_buffer
,
p_aout_buffer
->
p_buffer
,
BUFFER_SIZE
);
aout_BufferFree
(
p_aout_buffer
);
}
}
}
...
...
modules/gui/beos/Interface.cpp
View file @
3b078b7b
...
...
@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: Interface.cpp,v 1.
5 2002/11/26 01:06:08
titer Exp $
* $Id: Interface.cpp,v 1.
6 2002/11/27 05:36:41
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -72,7 +72,7 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
return
(
1
);
}
p_intf
->
p_sys
->
p_wrapper
=
new
Intf_VLC
Wrapper
(
p_intf
);
p_intf
->
p_sys
->
p_wrapper
=
new
Vlc
Wrapper
(
p_intf
);
p_intf
->
pf_run
=
Run
;
...
...
modules/gui/beos/InterfaceWindow.cpp
View file @
3b078b7b
...
...
@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.cpp,v 1.
9 2002/11/26 01:06:08
titer Exp $
* $Id: InterfaceWindow.cpp,v 1.
10 2002/11/27 05:36:41
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -212,7 +212,7 @@ InterfaceWindow::FrameResized(float width, float height)
void
InterfaceWindow
::
MessageReceived
(
BMessage
*
p_message
)
{
int
playback_status
;
// remember playback state
playback_status
=
p_wrapper
->
inputGe
tStatus
();
playback_status
=
p_wrapper
->
Inpu
tStatus
();
switch
(
p_message
->
what
)
{
...
...
@@ -266,7 +266,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
p_wrapper
->
volume_mute
();
snooze
(
400000
);
p_wrapper
->
p
laylistStop
();
p_wrapper
->
P
laylistStop
();
p_mediaControl
->
SetStatus
(
NOT_STARTED_S
,
DEFAULT_RATE
);
}
break
;
...
...
@@ -283,18 +283,18 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
p_wrapper
->
volume_mute
();
snooze
(
400000
);
p_wrapper
->
p
laylistPause
();
p_wrapper
->
P
laylistPause
();
}
else
{
p_wrapper
->
volume_restore
();
p_wrapper
->
p
laylistPlay
();
p_wrapper
->
P
laylistPlay
();
}
}
else
{
/* Play a new file */
p_wrapper
->
p
laylistPlay
();
p_wrapper
->
P
laylistPlay
();
}
break
;
...
...
@@ -304,7 +304,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
p_wrapper
->
volume_mute
();
snooze
(
400000
);
p_wrapper
->
play
Faster
();
p_wrapper
->
Input
Faster
();
}
break
;
...
...
@@ -314,7 +314,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
p_wrapper
->
volume_mute
();
snooze
(
400000
);
p_wrapper
->
play
Slower
();
p_wrapper
->
Input
Slower
();
}
break
;
...
...
@@ -323,7 +323,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
if
(
playback_status
>
UNDEF_S
)
{
p_wrapper
->
volume_restore
();
p_wrapper
->
p
laylistPlay
();
p_wrapper
->
P
laylistPlay
();
}
break
;
...
...
@@ -411,10 +411,10 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
}
break
;
case
PREV_FILE
:
p_wrapper
->
p
laylistPrev
();
p_wrapper
->
P
laylistPrev
();
break
;
case
NEXT_FILE
:
p_wrapper
->
p
laylistNext
();
p_wrapper
->
P
laylistNext
();
break
;
// general next/prev functionality (skips to whatever makes most sense)
case
NAVIGATE_PREV
:
...
...
@@ -471,7 +471,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
*****************************************************************************/
bool
InterfaceWindow
::
QuitRequested
()
{
p_wrapper
->
p
laylistStop
();
p_wrapper
->
P
laylistStop
();
p_mediaControl
->
SetStatus
(
NOT_STARTED_S
,
DEFAULT_RATE
);
p_intf
->
b_die
=
1
;
...
...
modules/gui/beos/InterfaceWindow.h
View file @
3b078b7b
...
...
@@ -2,7 +2,7 @@
* InterfaceWindow.h: BeOS interface window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.h,v 1.
5 2002/11/26 01:06:08
titer Exp $
* $Id: InterfaceWindow.h,v 1.
6 2002/11/27 05:36:41
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
...
...
@@ -152,7 +152,7 @@ class InterfaceWindow : public BWindow
BMessage
*
fSettings
;
// we keep the message arround
// for forward compatibility
Intf_VLCWrapper
*
p_wrapper
;
VlcWrapper
*
p_wrapper
;
};
#endif // BEOS_INTERFACE_WINDOW_H
modules/gui/beos/MediaControlView.cpp
View file @
3b078b7b
...
...
@@ -2,7 +2,7 @@
* MediaControlView.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MediaControlView.cpp,v 1.
7 2002/11/26 01:06:08
titer Exp $
* $Id: MediaControlView.cpp,v 1.
8 2002/11/27 05:36:41
titer Exp $
*
* Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
...
...
@@ -1309,9 +1309,9 @@ PositionInfoView::Pulse()
int32
index
,
size
;
p_intf
->
p_sys
->
p_wrapper
->
getPlaylistInfo
(
index
,
size
);
SetFile
(
index
,
size
);
p_intf
->
p_sys
->
p_wrapper
->
get
TitleInfo
(
index
,
size
);
p_intf
->
p_sys
->
p_wrapper
->
TitleInfo
(
index
,
size
);
SetTitle
(
index
,
size
);
p_intf
->
p_sys
->
p_wrapper
->
get
ChapterInfo
(
index
,
size
);
p_intf
->
p_sys
->
p_wrapper
->
ChapterInfo
(
index
,
size
);
SetChapter
(
index
,
size
);
SetTime
(
p_intf
->
p_sys
->
p_wrapper
->
getTimeAsString
()
);
fLastPulseUpdate
=
now
;
...
...
modules/gui/beos/PlayListWindow.h
View file @
3b078b7b
...
...
@@ -2,7 +2,7 @@
* PlayListWindow.h: BeOS interface window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PlayListWindow.h,v 1.
4 2002/11/26 01:06:08
titer Exp $
* $Id: PlayListWindow.h,v 1.
5 2002/11/27 05:36:41
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
...
...
@@ -59,7 +59,7 @@ class PlayListWindow : public BWindow
InterfaceWindow
*
fMainWindow
;
intf_thread_t
*
p_intf
;
Intf_VLC
Wrapper
*
p_wrapper
;
Vlc
Wrapper
*
p_wrapper
;
};
#endif // BEOS_PLAY_LIST_WINDOW_H
...
...
modules/gui/beos/VlcWrapper.cpp
View file @
3b078b7b
This diff is collapsed.
Click to expand it.
modules/gui/beos/VlcWrapper.h
View file @
3b078b7b
/*****************************************************************************
*
intf_vlc_wrapper.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
* $Id: VlcWrapper.h,v 1.
7 2002/11/26 01:06:08
titer Exp $
* $Id: VlcWrapper.h,v 1.
8 2002/11/27 05:36:41
titer Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
...
@@ -28,7 +28,7 @@
#define SEEKSLIDER_RANGE 2048
class
InterfaceWindow
;
class
Intf_VLC
Wrapper
;
class
Vlc
Wrapper
;
/*****************************************************************************
* intf_sys_t: internal variables of the BeOS interface
...
...
@@ -37,7 +37,6 @@ struct intf_sys_t
{
InterfaceWindow
*
p_window
;
/* DVD mode */
vlc_bool_t
b_disabled_menus
;
vlc_bool_t
b_loop
;
vlc_bool_t
b_mute
;
...
...
@@ -45,76 +44,65 @@ struct intf_sys_t
int
i_saved_volume
;
int
i_channel
;
Intf_VLC
Wrapper
*
p_wrapper
;
Vlc
Wrapper
*
p_wrapper
;
};
/*****************************************************************************
*
Intf_VLC
Wrapper
*
Vlc
Wrapper
*****************************************************************************
* This class makes the link between the BeOS interface and the vlc core.
* There is only one
Intf_VLC
Wrapper instance at any time, which is stored
* There is only one
Vlc
Wrapper instance at any time, which is stored
* in p_intf->p_sys->p_wrapper
*****************************************************************************/
class
Intf_VLC
Wrapper
class
Vlc
Wrapper
{
public:
Intf_VLC
Wrapper
(
intf_thread_t
*
p_intf
);
~
Intf_VLC
Wrapper
();
Vlc
Wrapper
(
intf_thread_t
*
p_intf
);
~
Vlc
Wrapper
();
bool
UpdateInputAndAOut
();
int
inputGetStatus
();
/* input */
int
InputStatus
();
int
InputRate
();
int
InputTell
();
int
InputSize
();
void
inputSeek
();
/* playlist control */
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
);
/* Playlist */
int
PlaylistSize
();
char
*
PlaylistItemName
(
int
);
int
PlaylistCurrent
();
bool
playlistPlay
();
void
playlistPause
();
void
playlistStop
();
void
playlistNext
();
void
playlistPrev
();
void
playlistJumpTo
(
int
);
int
playlistSize
();
int
playlistCurrentPos
();
void
playlistLock
();
void
playlistUnlock
();
void
playlistSkip
(
int
i
);
void
playlistGoto
(
int
i
);
void
loop
();
bool
playlistPlaying
();
BList
*
playlistAsArray
();
void
getPlaylistInfo
(
int32
&
currentIndex
,
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
,
int32
&
maxIndex
);
void
getTitleInfo
(
int32
&
currentIndex
,
int32
&
maxIndex
);
void
getChapterInfo
(
int32
&
currentIndex
,
int32
&
maxIndex
);
void
PlaylistJumpTo
(
int
);
void
getNavCapabilities
(
bool
*
canSkipPrev
,
bool
*
canSkipNext
);
void
navigatePrev
();
void
navigateNext
();
/* DVD */
bool
HasTitles
();
void
PrevTitle
();
void
NextTitle
();
bool
HasChapters
();
void
PrevChapter
();
void
NextChapter
();
/* Stream Control */
void
playSlower
();
void
playFaster
();
/* playback control */
/* audio */
void
volume_mute
();
void
volume_restore
();
void
set_volume
(
int
value
);
...
...
@@ -123,29 +111,19 @@ public:
bool
is_playing
();
void
maxvolume
();
bool
has_audio
();
/* playback info */
const
char
*
getTimeAsString
();
float
getTimeAsFloat
();
void
setTimeAsFloat
(
float
i_offset
);
/* open file/disc/network */
void
openFiles
(
BList
*
o_files
,
bool
replace
=
true
);
void
openDisc
(
BString
o_type
,
BString
o_device
,
int
i_title
,
int
i_chapter
);
void
openNet
(
BString
o_addr
,
int
i_port
);
void
openNetChannel
(
BString
o_addr
,
int
i_port
);
void
openNetHTTP
(
BString
o_addr
);
/* menus management */
void
toggleProgram
(
int
i_program
);
/* 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
);
void
toggleTitle
(
int
i_title
);
void
toggleChapter
(
int
i_chapter
);
void
toggleLanguage
(
int
i_language
);
void
toggleSubtitle
(
int
i_subtitle
);
void
channelNext
();
void
channelPrev
();
private:
intf_thread_t
*
p_intf
;
input_thread_t
*
p_input
;
...
...
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