Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d35a29fa
Commit
d35a29fa
authored
Feb 19, 2001
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Drag and drop support under BeOS.
parent
05010656
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
22 deletions
+67
-22
include/beos_window.h
include/beos_window.h
+5
-1
plugins/beos/intf_beos.cpp
plugins/beos/intf_beos.cpp
+27
-6
plugins/beos/vout_beos.cpp
plugins/beos/vout_beos.cpp
+35
-15
No files found.
include/beos_window.h
View file @
d35a29fa
...
...
@@ -31,6 +31,7 @@ public:
// standard window member
virtual
bool
QuitRequested
();
virtual
void
FrameResized
(
float
width
,
float
height
);
virtual
void
MessageReceived
(
BMessage
*
message
);
// this is the hook controling direct screen connection
...
...
@@ -54,6 +55,9 @@ public:
bool
fConnectionDisabled
;
BLocker
*
locker
;
thread_id
fDrawThreadID
;
// additional events
bool
b_resized
;
};
class
InterfaceWindow
:
public
BWindow
...
...
@@ -66,7 +70,7 @@ public:
virtual
bool
QuitRequested
();
virtual
void
MessageReceived
(
BMessage
*
message
);
intf_thread_t
*
p_int
erface
;
intf_thread_t
*
p_int
f
;
};
class
InterfaceView
:
public
BView
...
...
plugins/beos/intf_beos.cpp
View file @
d35a29fa
...
...
@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: intf_beos.cpp,v 1.
8 2001/02/18 03:32:02 polux
Exp $
* $Id: intf_beos.cpp,v 1.
9 2001/02/19 03:46:27 sam
Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -29,12 +29,16 @@
#include <stdio.h>
#include <stdlib.h>
/* malloc(), free() */
#include <kernel/OS.h>
#include <storage/Path.h>
#include <View.h>
#include <Application.h>
#include <Message.h>
#include <NodeInfo.h>
#include <Locker.h>
#include <DirectWindow.h>
#include <malloc.h>
#include <string.h>
...
...
@@ -48,6 +52,7 @@ extern "C"
#include "modules.h"
#include "intf_msg.h"
#include "intf_plst.h"
#include "interface.h"
#include "main.h"
...
...
@@ -68,10 +73,10 @@ typedef struct intf_sys_s
* InterfaceWindow
*****************************************************************************/
InterfaceWindow
::
InterfaceWindow
(
BRect
frame
,
const
char
*
name
,
intf_thread_t
*
p_int
f
)
:
BWindow
(
frame
,
name
,
B_TITLED_WINDOW
,
B_NOT_
RESIZABLE
|
B_NOT_
ZOOMABLE
)
InterfaceWindow
::
InterfaceWindow
(
BRect
frame
,
const
char
*
name
,
intf_thread_t
*
p_int
erface
)
:
BWindow
(
frame
,
name
,
B_TITLED_WINDOW
,
B_NOT_ZOOMABLE
)
{
p_int
erface
=
p_intf
;
p_int
f
=
p_interface
;
SetName
(
"interface"
);
BView
*
p_view
;
...
...
@@ -98,9 +103,24 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
case
B_KEY_DOWN
:
p_message
->
FindString
(
"bytes"
,
(
const
char
**
)
&
psz_key
);
p_int
erface
->
p_sys
->
i_key
=
psz_key
[
0
];
p_int
f
->
p_sys
->
i_key
=
psz_key
[
0
];
break
;
case
B_SIMPLE_DATA
:
{
entry_ref
ref
;
if
(
p_message
->
FindRef
(
"refs"
,
&
ref
)
==
B_OK
)
{
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
);
}
}
break
;
default:
BWindow
::
MessageReceived
(
p_message
);
break
;
...
...
@@ -113,10 +133,11 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
bool
InterfaceWindow
::
QuitRequested
()
{
p_intf
->
b_die
=
1
;
return
(
false
);
}
extern
"C"
{
...
...
plugins/beos/vout_beos.cpp
View file @
d35a29fa
...
...
@@ -64,16 +64,16 @@ extern "C"
#define BYTES_PER_PIXEL 2
/*****************************************************************************
* vout_sys_t:
dummy
video output method descriptor
* vout_sys_t:
BeOS
video output method descriptor
*****************************************************************************
* This structure is part of the video output thread descriptor.
* It describes the
dummy
specific properties of an output thread.
* It describes the
BeOS
specific properties of an output thread.
*****************************************************************************/
typedef
struct
vout_sys_s
{
VideoWindow
*
p_window
;
byte_t
*
pp_buffer
[
2
];
s32
i_width
;
s32
i_height
;
...
...
@@ -297,6 +297,15 @@ void VideoWindow::DirectConnected(direct_buffer_info *info)
locker
->
Unlock
();
}
/*****************************************************************************
* VideoWindow::FrameResized
*****************************************************************************/
void
VideoWindow
::
FrameResized
(
float
width
,
float
height
)
{
b_resized
=
1
;
}
/*****************************************************************************
* VideoWindow::MessageReceived
*****************************************************************************/
...
...
@@ -308,6 +317,7 @@ void VideoWindow::MessageReceived( BMessage * p_message )
switch
(
p_message
->
what
)
{
case
B_KEY_DOWN
:
case
B_SIMPLE_DATA
:
// post the message to the interface window which will handle it
p_win
=
beos_GetAppWindow
(
"interface"
);
if
(
p_win
!=
NULL
)
...
...
@@ -328,7 +338,10 @@ void VideoWindow::MessageReceived( BMessage * p_message )
bool
VideoWindow
::
QuitRequested
()
{
return
(
true
);
/* FIXME: send a message ! */
p_main
->
p_intf
->
b_die
=
1
;
return
(
false
);
}
extern
"C"
...
...
@@ -381,9 +394,9 @@ static int vout_Probe( probedata_t *p_data )
}
/*****************************************************************************
* vout_Create: allocates
dummy
video thread output method
* vout_Create: allocates
BeOS
video thread output method
*****************************************************************************
* This function allocates and initializes a
dummy
vout method.
* This function allocates and initializes a
BeOS
vout method.
*****************************************************************************/
int
vout_Create
(
vout_thread_t
*
p_vout
)
{
...
...
@@ -413,7 +426,7 @@ int vout_Create( vout_thread_t *p_vout )
}
/*****************************************************************************
* vout_Init: initialize
dummy
video thread output method
* vout_Init: initialize
BeOS
video thread output method
*****************************************************************************/
int
vout_Init
(
vout_thread_t
*
p_vout
)
{
...
...
@@ -448,7 +461,7 @@ int vout_Init( vout_thread_t *p_vout )
}
/*****************************************************************************
* vout_End: terminate
dummy
video thread output method
* vout_End: terminate
BeOS
video thread output method
*****************************************************************************/
void
vout_End
(
vout_thread_t
*
p_vout
)
{
...
...
@@ -464,7 +477,7 @@ void vout_End( vout_thread_t *p_vout )
}
/*****************************************************************************
* vout_Destroy: destroy
dummy
video thread output method
* vout_Destroy: destroy
BeOS
video thread output method
*****************************************************************************
* Terminate an output method created by DummyCreateOutputMethod
*****************************************************************************/
...
...
@@ -476,16 +489,22 @@ void vout_Destroy( vout_thread_t *p_vout )
}
/*****************************************************************************
* vout_Manage: handle
dummy
events
* vout_Manage: handle
BeOS
events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error.
*****************************************************************************/
int
vout_Manage
(
vout_thread_t
*
p_vout
)
{
if
(
p_vout
->
p_sys
->
p_window
->
b_resized
)
{
p_vout
->
p_sys
->
p_window
->
b_resized
=
0
;
p_vout
->
i_changes
|=
VOUT_SIZE_CHANGE
;
}
if
(
p_vout
->
i_changes
&
VOUT_SIZE_CHANGE
)
{
intf_
DbgMsg
(
"resizing window"
);
intf_
WarnMsg
(
1
,
"resizing window"
);
p_vout
->
i_changes
&=
~
VOUT_SIZE_CHANGE
;
/* Resize window */
...
...
@@ -508,13 +527,14 @@ int vout_Manage( vout_thread_t *p_vout )
intf_Msg
(
"vout: video display resized (%dx%d)"
,
p_vout
->
i_width
,
p_vout
->
i_height
);
}
return
(
0
);
}
/*****************************************************************************
* vout_Display: displays previously rendered output
*****************************************************************************
* This function send the currently rendered image to
dummy
image, waits until
* This function send the currently rendered image to
BeOS
image, waits until
* it is displayed and switch the two rendering buffers, preparing next frame.
*****************************************************************************/
void
vout_Display
(
vout_thread_t
*
p_vout
)
...
...
@@ -531,7 +551,7 @@ void vout_Display( vout_thread_t *p_vout )
/* following functions are local */
/*****************************************************************************
* BeosOpenDisplay: open and initialize
dummy
device
* BeosOpenDisplay: open and initialize
BeOS
device
*****************************************************************************
* XXX?? The framebuffer mode is only provided as a fast and efficient way to
* display video, providing the card is configured and the mode ok. It is
...
...
@@ -543,7 +563,7 @@ static int BeosOpenDisplay( vout_thread_t *p_vout )
{
/* Create the DirectDraw video window */
p_vout
->
p_sys
->
p_window
=
new
VideoWindow
(
BRect
(
50
,
150
,
50
+
p_vout
->
i_width
-
1
,
150
+
p_vout
->
i_height
-
1
),
VOUT_TITLE
" (BeOS output)"
,
p_vout
);
new
VideoWindow
(
BRect
(
50
,
150
,
50
+
p_vout
->
i_width
-
1
,
150
+
p_vout
->
i_height
-
1
),
VOUT_TITLE
" (BeOS output)
- drop a file here to play it !
"
,
p_vout
);
if
(
p_vout
->
p_sys
->
p_window
==
0
)
{
free
(
p_vout
->
p_sys
);
...
...
@@ -588,7 +608,7 @@ static int BeosOpenDisplay( vout_thread_t *p_vout )
}
/*****************************************************************************
* BeosDisplay: close and reset
dummy
device
* BeosDisplay: close and reset
BeOS
device
*****************************************************************************
* Returns all resources allocated by BeosOpenDisplay and restore the original
* state of the device.
...
...
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