Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3e9cee05
Commit
3e9cee05
authored
Apr 11, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Add VIDEOINFOHEADER2 support to VideoRenderer.
parent
62010249
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
20 deletions
+50
-20
videorenderer.c
dlls/quartz/videorenderer.c
+50
-20
No files found.
dlls/quartz/videorenderer.c
View file @
3e9cee05
...
...
@@ -35,7 +35,9 @@
#include "evcode.h"
#include "strmif.h"
#include "ddraw.h"
#include "dvdmedia.h"
#include "assert.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -263,7 +265,6 @@ static const IMemInputPinVtbl MemInputPin_Vtbl =
static
DWORD
VideoRenderer_SendSampleData
(
VideoRendererImpl
*
This
,
LPBYTE
data
,
DWORD
size
)
{
VIDEOINFOHEADER
*
format
;
AM_MEDIA_TYPE
amt
;
HRESULT
hr
=
S_OK
;
DDSURFACEDESC
sdesc
;
...
...
@@ -271,6 +272,7 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
int
height
;
LPBYTE
palette
=
NULL
;
HDC
hDC
;
BITMAPINFOHEADER
*
bmiHeader
;
TRACE
(
"%p %p %d
\n
"
,
This
,
data
,
size
);
...
...
@@ -280,23 +282,39 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
ERR
(
"Unable to retrieve media type
\n
"
);
return
hr
;
}
format
=
(
VIDEOINFOHEADER
*
)
amt
.
pbFormat
;
TRACE
(
"biSize = %d
\n
"
,
format
->
bmiHeader
.
biSize
);
TRACE
(
"biWidth = %d
\n
"
,
format
->
bmiHeader
.
biWidth
);
TRACE
(
"biHeight = %d
\n
"
,
format
->
bmiHeader
.
biHeight
);
TRACE
(
"biPlanes = %d
\n
"
,
format
->
bmiHeader
.
biPlanes
);
TRACE
(
"biBitCount = %d
\n
"
,
format
->
bmiHeader
.
biBitCount
);
TRACE
(
"biCompression = %s
\n
"
,
debugstr_an
((
LPSTR
)
&
(
format
->
bmiHeader
.
biCompression
),
4
));
TRACE
(
"biSizeImage = %d
\n
"
,
format
->
bmiHeader
.
biSizeImage
);
if
(
IsEqualIID
(
&
amt
.
formattype
,
&
FORMAT_VideoInfo
))
{
bmiHeader
=
&
((
VIDEOINFOHEADER
*
)
amt
.
pbFormat
)
->
bmiHeader
;
}
else
if
(
IsEqualIID
(
&
amt
.
formattype
,
&
FORMAT_VideoInfo2
))
{
bmiHeader
=
&
((
VIDEOINFOHEADER2
*
)
amt
.
pbFormat
)
->
bmiHeader
;
}
else
{
FIXME
(
"Unknown type %s
\n
"
,
debugstr_guid
(
&
amt
.
subtype
));
return
VFW_E_RUNTIME_ERROR
;
}
width
=
format
->
bmiHeader
.
biWidth
;
height
=
format
->
bmiHeader
.
biHeight
;
palette
=
((
LPBYTE
)
&
format
->
bmiHeader
)
+
format
->
bmiHeader
.
biSize
;
TRACE
(
"biSize = %d
\n
"
,
bmiHeader
->
biSize
);
TRACE
(
"biWidth = %d
\n
"
,
bmiHeader
->
biWidth
);
TRACE
(
"biHeight = %d
\n
"
,
bmiHeader
->
biHeight
);
TRACE
(
"biPlanes = %d
\n
"
,
bmiHeader
->
biPlanes
);
TRACE
(
"biBitCount = %d
\n
"
,
bmiHeader
->
biBitCount
);
TRACE
(
"biCompression = %s
\n
"
,
debugstr_an
((
LPSTR
)
&
(
bmiHeader
->
biCompression
),
4
));
TRACE
(
"biSizeImage = %d
\n
"
,
bmiHeader
->
biSizeImage
);
width
=
bmiHeader
->
biWidth
;
height
=
bmiHeader
->
biHeight
;
palette
=
((
LPBYTE
)
bmiHeader
)
+
bmiHeader
->
biSize
;
if
(
!
This
->
init
)
{
/* Honor previously set WindowPos */
if
(
!
This
->
WindowPos
.
right
||
!
This
->
WindowPos
.
bottom
)
This
->
WindowPos
=
This
->
SourceRect
;
TRACE
(
"WindowPos: %d %d %d %d
\n
"
,
This
->
WindowPos
.
left
,
This
->
WindowPos
.
top
,
This
->
WindowPos
.
right
,
This
->
WindowPos
.
bottom
);
SetWindowPos
(
This
->
hWnd
,
NULL
,
This
->
WindowPos
.
left
,
...
...
@@ -304,6 +322,7 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
This
->
WindowPos
.
right
-
This
->
WindowPos
.
left
,
This
->
WindowPos
.
bottom
-
This
->
WindowPos
.
top
,
SWP_NOZORDER
|
SWP_NOMOVE
);
GetClientRect
(
This
->
hWnd
,
&
This
->
DestRect
);
This
->
init
=
TRUE
;
}
...
...
@@ -321,10 +340,9 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data,
StretchDIBits
(
hDC
,
This
->
DestRect
.
left
,
This
->
DestRect
.
top
,
This
->
DestRect
.
right
-
This
->
DestRect
.
left
,
This
->
DestRect
.
bottom
-
This
->
DestRect
.
top
,
This
->
SourceRect
.
left
,
This
->
SourceRect
.
top
,
This
->
SourceRect
.
right
-
This
->
SourceRect
.
left
,
This
->
SourceRect
.
bottom
-
This
->
SourceRect
.
top
,
data
,
(
BITMAPINFO
*
)
&
format
->
bmiHeader
,
DIB_RGB_COLORS
,
SRCCOPY
);
data
,
(
BITMAPINFO
*
)
bmiHeader
,
DIB_RGB_COLORS
,
SRCCOPY
);
ReleaseDC
(
This
->
hWnd
,
hDC
);
if
(
This
->
AutoShow
)
ShowWindow
(
This
->
hWnd
,
SW_SHOW
);
...
...
@@ -385,17 +403,29 @@ static HRESULT VideoRenderer_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt
IsEqualIID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_RGB8
))
{
VideoRendererImpl
*
This
=
(
VideoRendererImpl
*
)
iface
;
VIDEOINFOHEADER
*
format
=
(
VIDEOINFOHEADER
*
)
pmt
->
pbFormat
;
if
(
!
IsEqualIID
(
&
pmt
->
formattype
,
&
FORMAT_VideoInfo
))
if
(
IsEqualIID
(
&
pmt
->
formattype
,
&
FORMAT_VideoInfo
))
{
WARN
(
"Format type %s not supported
\n
"
,
debugstr_guid
(
&
pmt
->
formattype
));
return
S_FALSE
;
}
VIDEOINFOHEADER
*
format
=
(
VIDEOINFOHEADER
*
)
pmt
->
pbFormat
;
This
->
SourceRect
.
left
=
0
;
This
->
SourceRect
.
top
=
0
;
This
->
SourceRect
.
right
=
This
->
VideoWidth
=
format
->
bmiHeader
.
biWidth
;
This
->
SourceRect
.
bottom
=
This
->
VideoHeight
=
format
->
bmiHeader
.
biHeight
;
}
else
if
(
IsEqualIID
(
&
pmt
->
formattype
,
&
FORMAT_VideoInfo2
))
{
VIDEOINFOHEADER2
*
format2
=
(
VIDEOINFOHEADER2
*
)
pmt
->
pbFormat
;
This
->
SourceRect
.
left
=
0
;
This
->
SourceRect
.
top
=
0
;
This
->
SourceRect
.
right
=
This
->
VideoWidth
=
format2
->
bmiHeader
.
biWidth
;
This
->
SourceRect
.
bottom
=
This
->
VideoHeight
=
format2
->
bmiHeader
.
biHeight
;
}
else
{
WARN
(
"Format type %s not supported
\n
"
,
debugstr_guid
(
&
pmt
->
formattype
));
return
S_FALSE
;
}
return
S_OK
;
}
return
S_FALSE
;
...
...
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