Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
3632d39c
Commit
3632d39c
authored
Apr 11, 2002
by
Tony Castley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented a fix for nVidia overlays thanks to Bertil.
parent
5a55a34a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
12 deletions
+31
-12
plugins/beos/vout_beos.cpp
plugins/beos/vout_beos.cpp
+31
-12
No files found.
plugins/beos/vout_beos.cpp
View file @
3632d39c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method
* vout_beos.cpp: beos video output display method
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_beos.cpp,v 1.5
2 2002/04/10 10:08:06
tcastley Exp $
* $Id: vout_beos.cpp,v 1.5
3 2002/04/11 09:25:45
tcastley 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>
...
@@ -100,6 +100,8 @@ int32 Draw(void *data)
...
@@ -100,6 +100,8 @@ int32 Draw(void *data)
{
{
VideoWindow
*
p_win
;
VideoWindow
*
p_win
;
p_win
=
(
VideoWindow
*
)
data
;
p_win
=
(
VideoWindow
*
)
data
;
int
source_l
;
int
dest_l
;
if
(
p_win
->
LockWithTimeout
(
50000
)
==
B_OK
)
if
(
p_win
->
LockWithTimeout
(
50000
)
==
B_OK
)
{
{
...
@@ -112,10 +114,34 @@ int32 Draw(void *data)
...
@@ -112,10 +114,34 @@ int32 Draw(void *data)
}
}
if
(
p_win
->
mode
==
OVERLAY
)
if
(
p_win
->
mode
==
OVERLAY
)
{
{
p_win
->
overlaybitmap
->
LockBits
();
p_win
->
overlaybitmap
->
LockBits
();
/* Do the check twist */
source_l
=
p_win
->
bitmap
[
p_win
->
i_buffer
]
->
BitsLength
();
dest_l
=
p_win
->
overlaybitmap
->
BitsLength
();
BRect
bounds
=
p_win
->
bitmap
[
p_win
->
i_buffer
]
->
Bounds
();
if
(
dest_l
==
source_l
)
{
/* Not used w/ NVIDIA overlay */
memcpy
(
p_win
->
overlaybitmap
->
Bits
(),
memcpy
(
p_win
->
overlaybitmap
->
Bits
(),
p_win
->
bitmap
[
p_win
->
i_buffer
]
->
Bits
(),
p_win
->
bitmap
[
p_win
->
i_buffer
]
->
Bits
(),
p_win
->
bitmap
[
p_win
->
i_buffer
]
->
BitsLength
()
);
p_win
->
bitmap
[
p_win
->
i_buffer
]
->
BitsLength
()
);
}
else
{
int
b_bpr
=
p_win
->
bitmap
[
p_win
->
i_buffer
]
->
BytesPerRow
();
int
bm_bpr
=
p_win
->
overlaybitmap
->
BytesPerRow
();
int
bpr
=
b_bpr
<
bm_bpr
?
b_bpr
:
bm_bpr
;
char
*
bp
=
(
char
*
)
p_win
->
bitmap
[
p_win
->
i_buffer
]
->
Bits
();
char
*
bmp
=
(
char
*
)
p_win
->
overlaybitmap
->
Bits
();
int
count
=
int
(
bounds
.
bottom
-
bounds
.
top
)
+
1
;
while
(
count
--
>
0
)
{
memcpy
(
bmp
,
bp
,
bpr
);
bmp
+=
bm_bpr
;
bp
+=
b_bpr
;
}
}
p_win
->
overlaybitmap
->
UnlockBits
();
p_win
->
overlaybitmap
->
UnlockBits
();
p_win
->
view
->
Invalidate
();
p_win
->
view
->
Invalidate
();
}
}
...
@@ -126,10 +152,6 @@ int32 Draw(void *data)
...
@@ -126,10 +152,6 @@ int32 Draw(void *data)
}
}
p_win
->
Unlock
();
p_win
->
Unlock
();
}
}
else
{
intf_Msg
(
"Dropped Frame"
);
}
return
B_OK
;
return
B_OK
;
}
}
...
@@ -300,13 +322,11 @@ int VideoWindow::SelectDrawingMode(int width, int height)
...
@@ -300,13 +322,11 @@ int VideoWindow::SelectDrawingMode(int width, int height)
B_OVERLAY_FILTER_HORIZONTAL
|
B_OVERLAY_FILTER_VERTICAL
);
B_OVERLAY_FILTER_HORIZONTAL
|
B_OVERLAY_FILTER_VERTICAL
);
view
->
SetViewColor
(
key
);
view
->
SetViewColor
(
key
);
SetTitle
(
VOUT_TITLE
" (Overlay)"
);
SetTitle
(
VOUT_TITLE
" (Overlay)"
);
intf_Msg
(
"Color index good: %i"
,
colspace_index
);
break
;
break
;
}
}
else
else
{
{
delete
overlaybitmap
;
delete
overlaybitmap
;
intf_Msg
(
"Color index bad: %i"
,
colspace_index
);
}
}
}
}
...
@@ -321,7 +341,6 @@ int VideoWindow::SelectDrawingMode(int width, int height)
...
@@ -321,7 +341,6 @@ int VideoWindow::SelectDrawingMode(int width, int height)
bitmap
[
1
]
=
new
BBitmap
(
BRect
(
0
,
0
,
width
,
height
),
colspace
[
colspace_index
].
colspace
);
bitmap
[
1
]
=
new
BBitmap
(
BRect
(
0
,
0
,
width
,
height
),
colspace
[
colspace_index
].
colspace
);
memset
(
bitmap
[
0
]
->
Bits
(),
0
,
bitmap
[
0
]
->
BitsLength
());
memset
(
bitmap
[
0
]
->
Bits
(),
0
,
bitmap
[
0
]
->
BitsLength
());
memset
(
bitmap
[
1
]
->
Bits
(),
0
,
bitmap
[
1
]
->
BitsLength
());
memset
(
bitmap
[
1
]
->
Bits
(),
0
,
bitmap
[
1
]
->
BitsLength
());
intf_Msg
(
"Color space: %s"
,
colspace
[
colspace_index
].
name
);
return
drawingMode
;
return
drawingMode
;
}
}
...
...
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