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
1dc1aa8e
Commit
1dc1aa8e
authored
Oct 21, 2001
by
Tony Castley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resizing the video out window in BeOS now retains the scaling.
parent
20fece04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
32 deletions
+41
-32
plugins/beos/VideoWindow.h
plugins/beos/VideoWindow.h
+12
-17
plugins/beos/vout_beos.cpp
plugins/beos/vout_beos.cpp
+29
-15
No files found.
plugins/beos/VideoWindow.h
View file @
1dc1aa8e
...
...
@@ -2,7 +2,7 @@
* VideoWindow.h: BeOS video window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: VideoWindow.h,v 1.
6 2001/09/12 01:30:07
tcastley Exp $
* $Id: VideoWindow.h,v 1.
7 2001/10/21 06:06:20
tcastley Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
...
...
@@ -51,30 +51,25 @@ public:
virtual
void
Zoom
(
BPoint
origin
,
float
width
,
float
height
);
// this is the hook controling direct screen connection
int32
i_bytes_per_pixel
;
int32
i_screen_depth
;
int32
i_width
;
int32
i_height
;
struct
vout_thread_s
*
p_vout
;
int32
i_bytes_per_pixel
;
int32
i_screen_depth
;
int32
i_width
;
int32
i_height
;
int32
fRowBytes
;
uint32
fNumClipRects
;
int
i_buffer_index
;
bool
fDirty
;
thread_id
fDrawThreadID
;
BBitmap
*
bitmap
[
2
];
BBitmap
*
drawthis
;
VLCView
*
view
;
thread_id
fDrawThreadID
;
bool
teardownwindow
;
bool
is_zoomed
;
bool
fUsingOverlay
;
BScreen
*
screen
;
struct
vout_thread_s
*
p_vout
;
private:
display_mode
old_mode
;
BRect
rect
;
//
display_mode old_mode;
BRect
rect
;
};
plugins/beos/vout_beos.cpp
View file @
1dc1aa8e
...
...
@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_beos.cpp,v 1.3
0 2001/09/26 12:32:25 massiot
Exp $
* $Id: vout_beos.cpp,v 1.3
1 2001/10/21 06:06:20 tcastley
Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -140,13 +140,12 @@ int32 Draw(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_TITLED_WINDOW
,
B_OUTLINE_RESIZE
)
{
/* set the VideoWindow variables */
teardownwindow
=
false
;
is_zoomed
=
false
;
fUsingOverlay
=
false
;
p_video_output
->
b_YCbr
=
false
;
/* create the view to do the display */
...
...
@@ -169,7 +168,6 @@ VideoWindow::VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_o
fRowBytes
=
bitmap
[
0
]
->
BytesPerRow
();
i_screen_depth
=
8
*
i_bytes_per_pixel
;
fDirty
=
false
;
Show
();
}
...
...
@@ -191,6 +189,27 @@ VideoWindow::~VideoWindow()
*****************************************************************************/
void
VideoWindow
::
FrameResized
(
float
width
,
float
height
)
{
if
(
is_zoomed
)
{
return
;
}
float
width_scale
;
float
height_scale
;
float
orig_width
=
bitmap
[
0
]
->
Bounds
().
Width
();
float
orig_height
=
bitmap
[
0
]
->
Bounds
().
Height
();
width_scale
=
width
/
orig_width
;
height_scale
=
height
/
orig_height
;
/* if the width is proportionally smaller */
if
(
width_scale
<=
height_scale
)
{
ResizeTo
(
width
,
orig_height
*
width_scale
);
}
else
/* if the height is proportionally smaller */
{
ResizeTo
(
orig_width
*
height_scale
,
height
);
}
}
/*****************************************************************************
...
...
@@ -349,12 +368,7 @@ int vout_Create( vout_thread_t *p_vout )
return
(
1
);
}
/* Set video window's size */
p_vout
->
b_scale
=
true
;
intf_Msg
(
"Initial Width: %d Height: %d"
,
p_vout
->
i_width
,
p_vout
->
i_height
);
p_vout
->
b_scale
=
false
;
/* Open and initialize device */
if
(
BeosOpenDisplay
(
p_vout
)
)
...
...
@@ -447,12 +461,12 @@ void vout_Display( vout_thread_t *p_vout )
p_win
->
i_buffer_index
=
p_vout
->
i_buffer_index
;
p_vout
->
i_buffer_index
=
++
p_vout
->
i_buffer_index
&
1
;
p_win
->
fDrawThreadID
=
spawn_thread
(
Draw
,
"drawing_thread"
,
if
(
!
p_win
->
teardownwindow
)
{
p_win
->
fDrawThreadID
=
spawn_thread
(
Draw
,
"drawing_thread"
,
B_DISPLAY_PRIORITY
,
(
void
*
)
p_win
);
wait_for_thread
(
p_win
->
fDrawThreadID
,
&
status
);
wait_for_thread
(
p_win
->
fDrawThreadID
,
&
status
);
}
}
/* following functions are local */
...
...
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