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
82abcec5
Commit
82abcec5
authored
Nov 25, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap: Directly pass a VIDEOINFOHEADER pointer to the get_format() operation.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d00c6af2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
qcap_private.h
dlls/qcap/qcap_private.h
+1
-1
v4l.c
dlls/qcap/v4l.c
+3
-2
vfwcapture.c
dlls/qcap/vfwcapture.c
+22
-2
No files found.
dlls/qcap/qcap_private.h
View file @
82abcec5
...
...
@@ -46,7 +46,7 @@ struct video_capture_funcs
void
(
*
destroy
)(
struct
video_capture_device
*
device
);
HRESULT
(
*
check_format
)(
struct
video_capture_device
*
device
,
const
AM_MEDIA_TYPE
*
mt
);
HRESULT
(
*
set_format
)(
struct
video_capture_device
*
device
,
const
AM_MEDIA_TYPE
*
mt
);
HRESULT
(
*
get_format
)(
struct
video_capture_device
*
device
,
AM_MEDIA_TYPE
*
m
t
);
void
(
*
get_format
)(
struct
video_capture_device
*
device
,
AM_MEDIA_TYPE
*
mt
,
VIDEOINFOHEADER
*
forma
t
);
HRESULT
(
*
get_media_type
)(
struct
video_capture_device
*
device
,
unsigned
int
index
,
AM_MEDIA_TYPE
*
mt
);
void
(
*
get_caps
)(
struct
video_capture_device
*
device
,
LONG
index
,
AM_MEDIA_TYPE
*
mt
,
VIDEOINFOHEADER
*
format
,
VIDEO_STREAM_CONFIG_CAPS
*
caps
);
...
...
dlls/qcap/v4l.c
View file @
82abcec5
...
...
@@ -209,9 +209,10 @@ static HRESULT v4l_device_set_format(struct video_capture_device *device, const
return
set_caps
(
device
,
caps
);
}
static
HRESULT
v4l_device_get_format
(
struct
video_capture_device
*
device
,
AM_MEDIA_TYPE
*
m
t
)
static
void
v4l_device_get_format
(
struct
video_capture_device
*
device
,
AM_MEDIA_TYPE
*
mt
,
VIDEOINFOHEADER
*
forma
t
)
{
return
CopyMediaType
(
mt
,
&
device
->
current_caps
->
media_type
);
*
mt
=
device
->
current_caps
->
media_type
;
*
format
=
device
->
current_caps
->
video_info
;
}
static
HRESULT
v4l_device_get_media_type
(
struct
video_capture_device
*
device
,
...
...
dlls/qcap/vfwcapture.c
View file @
82abcec5
...
...
@@ -337,6 +337,7 @@ AMStreamConfig_SetFormat(IAMStreamConfig *iface, AM_MEDIA_TYPE *pmt)
static
HRESULT
WINAPI
AMStreamConfig_GetFormat
(
IAMStreamConfig
*
iface
,
AM_MEDIA_TYPE
**
mt
)
{
struct
vfw_capture
*
filter
=
impl_from_IAMStreamConfig
(
iface
);
VIDEOINFOHEADER
*
format
;
HRESULT
hr
;
TRACE
(
"filter %p, mt %p.
\n
"
,
filter
,
mt
);
...
...
@@ -347,11 +348,30 @@ static HRESULT WINAPI AMStreamConfig_GetFormat(IAMStreamConfig *iface, AM_MEDIA_
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
if
(
filter
->
source
.
pin
.
peer
)
{
hr
=
CopyMediaType
(
*
mt
,
&
filter
->
source
.
pin
.
mt
);
else
if
(
SUCCEEDED
(
hr
=
capture_funcs
->
get_format
(
filter
->
device
,
*
mt
)))
strmbase_dump_media_type
(
*
mt
);
}
else
{
if
((
format
=
CoTaskMemAlloc
(
sizeof
(
VIDEOINFOHEADER
))))
{
capture_funcs
->
get_format
(
filter
->
device
,
*
mt
,
format
);
(
*
mt
)
->
cbFormat
=
sizeof
(
VIDEOINFOHEADER
);
(
*
mt
)
->
pbFormat
=
(
BYTE
*
)
format
;
hr
=
S_OK
;
}
else
{
hr
=
E_OUTOFMEMORY
;
}
}
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
if
(
SUCCEEDED
(
hr
))
strmbase_dump_media_type
(
*
mt
);
else
CoTaskMemFree
(
*
mt
);
return
hr
;
}
...
...
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