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
ee8c617e
Commit
ee8c617e
authored
Mar 05, 2001
by
Richard Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
f223ef75
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
147 additions
and
36 deletions
+147
-36
Makefile.in
Makefile.in
+1
-1
plugins/beos/Bitmaps.h
plugins/beos/Bitmaps.h
+14
-0
plugins/beos/InterfaceWindow.h
plugins/beos/InterfaceWindow.h
+16
-1
plugins/beos/MsgVals.h
plugins/beos/MsgVals.h
+1
-0
plugins/beos/intf_beos.cpp
plugins/beos/intf_beos.cpp
+99
-23
plugins/beos/vout_beos.cpp
plugins/beos/vout_beos.cpp
+16
-11
No files found.
Makefile.in
View file @
ee8c617e
...
...
@@ -607,7 +607,7 @@ endif
#
lib/beos.so
:
$(PLUGIN_BEOS)
$(CC)
$(PCFLAGS)
-nostart
-Xlinker
-soname
=
$@
-o
$@
$^
plugins/_APP_
-lbe
-lgame
-lroot
$(CC)
$(PCFLAGS)
-nostart
-Xlinker
-soname
=
$@
-o
$@
$^
plugins/_APP_
-lbe
-lgame
-lroot
-ltracker
lib/esd.so
:
$(PLUGIN_ESD)
ifneq
(,$(findstring bsd,$(SYS)))
...
...
plugins/beos/Bitmaps.h
View file @
ee8c617e
...
...
@@ -259,6 +259,8 @@ const unsigned char LCDsmall64x8_raw[] = {
const
int32
kSpeakerIconBitmapWidth
=
16
;
const
int32
kSpeakerIconBitmapHeight
=
9
;
const
BPoint
kSpeakerButtonSize
(
kSpeakerIconBitmapWidth
-
1
,
kSpeakerIconBitmapHeight
-
1
);
const
unsigned
char
kSpeakerIconBits
[]
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x10
,
0x10
,
0xff
,
0xff
,
0xff
,
0xff
,
0x10
,
0xff
,
0xff
,
0xff
,
0xff
,
...
...
@@ -272,6 +274,18 @@ const unsigned char kSpeakerIconBits [] = {
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x10
,
0x10
,
0xff
,
0xff
,
0xff
,
0xff
,
0x10
,
0xff
,
0xff
,
0xff
,
0xff
,
};
const
unsigned
char
kPressedSpeakerIconBits
[]
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x34
,
0x34
,
0xff
,
0xff
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0xff
,
0xff
,
0x34
,
0x34
,
0x34
,
0xff
,
0x34
,
0x1d
,
0x34
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0xff
,
0x34
,
0x1d
,
0x34
,
0x34
,
0x1d
,
0x1d
,
0x34
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0xff
,
0x34
,
0x1d
,
0x34
,
0x1d
,
0x1d
,
0x1d
,
0x34
,
0xff
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0x34
,
0x1d
,
0x34
,
0x1d
,
0x1d
,
0x1d
,
0x34
,
0xff
,
0x34
,
0xff
,
0x34
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0x34
,
0x1d
,
0x34
,
0x1d
,
0x1d
,
0x1d
,
0x34
,
0xff
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0x34
,
0x1d
,
0x34
,
0x34
,
0x1d
,
0x1d
,
0x34
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0xff
,
0x34
,
0x34
,
0x34
,
0xff
,
0x34
,
0x1d
,
0x34
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x34
,
0x34
,
0xff
,
0xff
,
0xff
,
0xff
,
0x34
,
0xff
,
0xff
,
0xff
,
0xff
,
};
// #pragma mark play
...
...
plugins/beos/InterfaceWindow.h
View file @
ee8c617e
...
...
@@ -22,6 +22,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MENU_HEIGHT 15
class
InterfaceWindow
:
public
BWindow
{
public:
...
...
@@ -38,6 +40,7 @@ public:
BCheckBox
*
p_mute
;
sem_id
fScrubSem
;
bool
fSeeking
;
BFilePanel
*
file_panel
;
};
class
InterfaceView
:
public
BView
...
...
@@ -50,7 +53,19 @@ public:
};
class
SeekSlider
:
public
BSlider
class
MediaSlider
:
public
BSlider
{
public:
MediaSlider
(
BRect
frame
,
BMessage
*
message
,
int32
minValue
,
int32
maxValue
);
~
MediaSlider
();
virtual
void
DrawThumb
(
void
);
};
class
SeekSlider
:
public
MediaSlider
{
public:
SeekSlider
(
BRect
frame
,
...
...
plugins/beos/MsgVals.h
View file @
ee8c617e
...
...
@@ -25,6 +25,7 @@
#define PLAYING 0
#define PAUSED 1
const
uint32
OPEN_FILE
=
'
OPFL
'
;
const
uint32
OPEN_DVD
=
'
OPDV
'
;
const
uint32
STOP_PLAYBACK
=
'
STPL
'
;
const
uint32
START_PLAYBACK
=
'
PLAY
'
;
...
...
plugins/beos/intf_beos.cpp
View file @
ee8c617e
...
...
@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: intf_beos.cpp,v 1.1
4 2001/03/05 13:28:47
richards Exp $
* $Id: intf_beos.cpp,v 1.1
5 2001/03/05 20:36:04
richards Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -48,7 +48,11 @@
#include <NodeInfo.h>
#include <Locker.h>
#include <DirectWindow.h>
#include <Box.h>
#include <MenuBar.h>
#include <MenuItem.h>
#include <FilePanel.h>
#include <Alert.h>
#include <malloc.h>
#include <string.h>
...
...
@@ -95,19 +99,37 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
:
BWindow
(
frame
,
name
,
B_FLOATING_WINDOW_LOOK
,
B_NORMAL_WINDOW_FEEL
,
B_NOT_RESIZABLE
|
B_NOT_ZOOMABLE
|
B_WILL_ACCEPT_FIRST_CLICK
|
B_ASYNCHRONOUS_CONTROLS
)
{
file_panel
=
NULL
;
p_intf
=
p_interface
;
BRect
ButtonRect
;
float
xStart
=
2.0
;
float
yStart
=
1
0.0
;
float
yStart
=
4
0.0
;
SetName
(
"interface"
);
SetTitle
(
VOUT_TITLE
" (BeOS interface)"
);
BRect
rect
(
0
,
0
,
0
,
MENU_HEIGHT
);
BView
*
p_view
;
BMenuBar
*
menu_bar
;
menu_bar
=
new
BMenuBar
(
rect
,
"main menu"
);
AddChild
(
menu_bar
);
BMenu
*
m
;
BMenuItem
*
i
;
menu_bar
->
AddItem
(
m
=
new
BMenu
(
"File"
)
);
menu_bar
->
ResizeToPreferred
();
m
->
AddItem
(
new
BMenuItem
(
"Open file..."
,
new
BMessage
(
OPEN_FILE
),
'O'
));
m
->
AddItem
(
new
BMenuItem
(
"Open DVD..."
,
new
BMessage
(
OPEN_DVD
),
'D'
));
m
->
AddSeparatorItem
();
m
->
AddItem
(
new
BMenuItem
(
"Quit"
,
new
BMessage
(
B_QUIT_REQUESTED
),
'Q'
));
/* Add the view */
p_view
=
new
BView
(
Bounds
(),
""
,
B_FOLLOW_ALL
,
B_WILL_DRAW
);
p_view
->
SetViewColor
(
216
,
216
,
216
);
rect
=
Bounds
();
rect
.
top
+=
menu_bar
->
Bounds
().
IntegerHeight
()
+
1
;
BBox
*
p_view
;
p_view
=
new
BBox
(
rect
,
NULL
,
B_FOLLOW_ALL
,
B_WILL_DRAW
);
p_view
->
SetViewColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
));
/* Buttons */
/* Slow play */
...
...
@@ -159,28 +181,37 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
kDisabledStopButtonBitmapBits
,
new
BMessage
(
STOP_PLAYBACK
));
p_view
->
AddChild
(
p_stop
);
ButtonRect
.
SetLeftTop
(
BPoint
(
xStart
+
5
,
yStart
+
6
));
ButtonRect
.
SetRightBottom
(
ButtonRect
.
LeftTop
()
+
kSpeakerButtonSize
);
xStart
+=
kSpeakerIconBitmapWidth
;
TransportButton
*
p_mute
=
new
TransportButton
(
ButtonRect
,
B_EMPTY_STRING
,
kSpeakerIconBits
,
kPressedSpeakerIconBits
,
kSpeakerIconBits
,
new
BMessage
(
VOLUME_MUTE
));
p_view
->
AddChild
(
p_mute
);
/* Seek Status */
p_seek
=
new
SeekSlider
(
BRect
(
5
,
35
,
355
,
65
),
this
,
0
,
100
,
rgb_color
fill_color
=
{
0
,
255
,
0
};
p_seek
=
new
SeekSlider
(
BRect
(
5
,
10
,
250
,
30
),
this
,
0
,
100
,
B_TRIANGLE_THUMB
);
p_seek
->
SetValue
(
0
);
p_seek
->
UseFillColor
(
TRUE
);
p_seek
->
UseFillColor
(
true
,
&
fill_color
);
p_view
->
AddChild
(
p_seek
);
/* Volume Slider */
p_vol
=
new
BSlider
(
BRect
(
xStart
,
2
,
300
,
20
),
"vol"
,
"Volume"
,
new
BMessage
(
VOLUME_CHG
),
0
,
VOLUME_MAX
);
p_vol
=
new
MediaSlider
(
BRect
(
xStart
,
40
,
250
,
60
),
new
BMessage
(
VOLUME_CHG
),
0
,
VOLUME_MAX
);
p_vol
->
SetValue
(
VOLUME_DEFAULT
);
p_vol
->
UseFillColor
(
true
,
&
fill_color
);
p_view
->
AddChild
(
p_vol
);
/* Volume Mute */
p_mute
=
new
BCheckBox
(
BRect
(
300
,
10
,
355
,
25
),
"mute"
,
"Mute"
,
new
BMessage
(
VOLUME_MUTE
));
p_view
->
AddChild
(
p_mute
);
/* Set size and Show */
AddChild
(
p_view
);
ResizeTo
(
360
,
70
);
ResizeTo
(
260
,
70
+
menu_bar
->
Bounds
().
IntegerHeight
()
+
1
);
Show
();
}
...
...
@@ -196,11 +227,27 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
int
vol_val
=
p_vol
->
Value
();
// remember the current volume
static
int
playback_status
;
// remember playback state
BAlert
*
alert
;
Activate
();
switch
(
p_message
->
what
)
{
case
OPEN_FILE
:
if
(
file_panel
)
{
file_panel
->
Show
();
break
;
}
file_panel
=
new
BFilePanel
();
file_panel
->
SetTarget
(
this
);
file_panel
->
Show
();
break
;
case
OPEN_DVD
:
alert
=
new
BAlert
(
VOUT_TITLE
,
"Opening DVDs not yet implemented"
,
"Bummer"
);
alert
->
Go
();
break
;
case
STOP_PLAYBACK
:
// this currently stops playback not nicely
if
(
p_intf
->
p_input
!=
NULL
)
...
...
@@ -300,7 +347,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
// mute
if
(
p_main
->
p_aout
!=
NULL
)
{
if
(
p_m
ute
->
Value
()
==
B_CONTROL_OFF
)
if
(
p_m
ain
->
p_aout
->
vol
==
0
)
{
p_main
->
p_aout
->
vol
=
vol_val
;
}
...
...
@@ -312,6 +359,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
break
;
case
SELECT_CHANNEL
:
break
;
case
B_REFS_RECEIVED
:
case
B_SIMPLE_DATA
:
{
entry_ref
ref
;
...
...
@@ -319,8 +367,6 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
BPath
path
(
&
ref
);
char
*
psz_name
=
strdup
(
path
.
Path
());
intf_WarnMsg
(
1
,
"intf: dropped text/uri-list data `%s'"
,
psz_name
);
intf_PlstAdd
(
p_main
->
p_playlist
,
PLAYLIST_END
,
psz_name
);
}
...
...
@@ -342,6 +388,37 @@ bool InterfaceWindow::QuitRequested()
return
(
false
);
}
/*****************************************************************************
* MediaSlider
*****************************************************************************/
MediaSlider
::
MediaSlider
(
BRect
frame
,
BMessage
*
message
,
int32
minValue
,
int32
maxValue
)
:
BSlider
(
frame
,
NULL
,
NULL
,
message
,
minValue
,
maxValue
)
{
}
MediaSlider
::~
MediaSlider
()
{
}
void
MediaSlider
::
DrawThumb
(
void
)
{
BRect
r
;
BView
*
v
;
r
=
ThumbFrame
();
v
=
OffscreenView
();
v
->
SetHighColor
(
0
,
0
,
0
);
r
.
InsetBy
(
r
.
IntegerWidth
()
/
4
,
r
.
IntegerHeight
()
/
6
);
v
->
StrokeEllipse
(
r
);
v
->
SetHighColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
));
r
.
InsetBy
(
1
,
1
);
v
->
FillEllipse
(
r
);
}
/*****************************************************************************
* SeekSlider
...
...
@@ -351,8 +428,7 @@ SeekSlider::SeekSlider(BRect frame,
int32
minValue
,
int32
maxValue
,
thumb_style
thumbType
=
B_TRIANGLE_THUMB
)
:
BSlider
(
frame
,
B_EMPTY_STRING
,
B_EMPTY_STRING
,
NULL
,
minValue
,
maxValue
,
thumbType
)
:
MediaSlider
(
frame
,
NULL
,
minValue
,
maxValue
)
{
fOwner
=
owner
;
fMouseDown
=
false
;
...
...
plugins/beos/vout_beos.cpp
View file @
ee8c617e
...
...
@@ -128,9 +128,8 @@ int32 DrawingThread(void *data)
w
->
Lock
();
if
(
w
->
fDirty
)
{
if
(
!
w
->
fUsingOverlay
)
w
->
view
->
DrawBitmap
(
w
->
bitmap
[
w
->
i_buffer_index
],
w
->
bitmap
[
w
->
i_buffer_index
]
->
Bounds
(),
w
->
Bounds
());
w
->
fDirty
=
false
;
w
->
view
->
DrawBitmap
(
w
->
bitmap
[
w
->
i_buffer_index
],
w
->
bitmap
[
w
->
i_buffer_index
]
->
Bounds
(),
w
->
Bounds
());
w
->
fDirty
=
false
;
}
w
->
Unlock
();
snooze
(
20000
);
...
...
@@ -143,13 +142,14 @@ int32 DrawingThread(void *data)
*****************************************************************************/
VideoWindow
::
VideoWindow
(
BRect
frame
,
const
char
*
name
,
vout_thread_t
*
p_video_output
)
:
BWindow
(
frame
,
name
,
B_
TITLED
_WINDOW
,
NULL
)
:
BWindow
(
frame
,
name
,
B_
DOCUMENT
_WINDOW
,
NULL
)
{
float
minWidth
,
minHeight
,
maxWidth
,
maxHeight
;
teardownwindow
=
false
;
is_zoomed
=
false
;
p_vout
=
p_video_output
;
fDrawThreadID
=
NULL
;
rect
=
Frame
();
view
=
new
VLCView
(
Bounds
());
...
...
@@ -192,6 +192,10 @@ VideoWindow::VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_o
SetTitle
(
VOUT_TITLE
" (BBitmap output)"
);
}
i_bytes_per_pixel
=
bitmap
[
0
]
->
BytesPerRow
()
/
bitmap
[
0
]
->
Bounds
().
IntegerWidth
();
fRowBytes
=
bitmap
[
0
]
->
BytesPerRow
();
fDirty
=
false
;
if
(
fUsingOverlay
)
{
memset
(
bitmap
[
0
]
->
Bits
(),
0
,
bitmap
[
0
]
->
BitsLength
());
...
...
@@ -203,13 +207,12 @@ VideoWindow::VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_o
GetSizeLimits
(
&
minWidth
,
&
maxWidth
,
&
minHeight
,
&
maxHeight
);
SetSizeLimits
((
float
)
Bounds
().
IntegerWidth
(),
maxWidth
,
(
float
)
Bounds
().
IntegerHeight
(),
maxHeight
);
}
i_bytes_per_pixel
=
bitmap
[
0
]
->
BytesPerRow
()
/
bitmap
[
0
]
->
Bounds
().
IntegerWidth
();
fRowBytes
=
bitmap
[
0
]
->
BytesPerRow
();
fDirty
=
false
;
fDrawThreadID
=
spawn_thread
(
DrawingThread
,
"drawing_thread"
,
else
{
fDrawThreadID
=
spawn_thread
(
DrawingThread
,
"drawing_thread"
,
B_DISPLAY_PRIORITY
,
(
void
*
)
this
);
resume_thread
(
fDrawThreadID
);
resume_thread
(
fDrawThreadID
);
}
Show
();
}
...
...
@@ -219,9 +222,9 @@ VideoWindow::~VideoWindow()
Hide
();
Sync
();
wait_for_thread
(
fDrawThreadID
,
&
result
);
if
(
!
fUsingOverlay
)
{
wait_for_thread
(
fDrawThreadID
,
&
result
);
delete
bitmap
[
0
];
delete
bitmap
[
1
];
}
...
...
@@ -245,6 +248,7 @@ if(is_zoomed)
{
MoveTo
(
rect
.
left
,
rect
.
top
);
ResizeTo
(
rect
.
IntegerWidth
(),
rect
.
IntegerHeight
());
SetLook
(
B_DOCUMENT_WINDOW_LOOK
);
be_app
->
ShowCursor
();
}
else
...
...
@@ -256,6 +260,7 @@ else
delete
screen
;
MoveTo
(
0
,
0
);
ResizeTo
(
rect
.
IntegerWidth
(),
rect
.
IntegerHeight
());
SetLook
(
B_NO_BORDER_WINDOW_LOOK
);
be_app
->
HideCursor
();
}
is_zoomed
=
!
is_zoomed
;
...
...
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