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
56fa8f1c
Commit
56fa8f1c
authored
Dec 30, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap: Added AVICompressorIn_ReceiveConnection implementation.
parent
1a2c6b95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
2 deletions
+52
-2
avico.c
dlls/qcap/avico.c
+52
-2
No files found.
dlls/qcap/avico.c
View file @
56fa8f1c
...
...
@@ -41,6 +41,10 @@ typedef struct {
DWORD
fcc_handler
;
HIC
hic
;
VIDEOINFOHEADER
*
videoinfo
;
size_t
videoinfo_size
;
DWORD
driver_flags
;
}
AVICompressor
;
static
inline
AVICompressor
*
impl_from_BaseFilter
(
BaseFilter
*
filter
)
...
...
@@ -73,6 +77,41 @@ static HRESULT ensure_driver(AVICompressor *This)
return
S_OK
;
}
static
HRESULT
fill_format_info
(
AVICompressor
*
This
,
VIDEOINFOHEADER
*
src_videoinfo
)
{
DWORD
size
;
ICINFO
icinfo
;
HRESULT
hres
;
hres
=
ensure_driver
(
This
);
if
(
hres
!=
S_OK
)
return
hres
;
size
=
ICGetInfo
(
This
->
hic
,
&
icinfo
,
sizeof
(
icinfo
));
if
(
size
!=
sizeof
(
icinfo
))
return
E_FAIL
;
size
=
ICCompressGetFormatSize
(
This
->
hic
,
&
src_videoinfo
->
bmiHeader
);
if
(
!
size
)
{
FIXME
(
"ICCompressGetFormatSize failed
\n
"
);
return
E_FAIL
;
}
size
+=
FIELD_OFFSET
(
VIDEOINFOHEADER
,
bmiHeader
);
This
->
videoinfo
=
heap_alloc
(
size
);
if
(
!
This
->
videoinfo
)
return
E_OUTOFMEMORY
;
This
->
videoinfo_size
=
size
;
This
->
driver_flags
=
icinfo
.
dwFlags
;
memset
(
This
->
videoinfo
,
0
,
sizeof
(
*
This
->
videoinfo
));
ICCompressGetFormat
(
This
->
hic
,
&
src_videoinfo
->
bmiHeader
,
&
This
->
videoinfo
->
bmiHeader
);
This
->
videoinfo
->
dwBitRate
=
10000000
/
src_videoinfo
->
AvgTimePerFrame
*
This
->
videoinfo
->
bmiHeader
.
biSizeImage
*
8
;
This
->
videoinfo
->
AvgTimePerFrame
=
src_videoinfo
->
AvgTimePerFrame
;
return
S_OK
;
}
static
HRESULT
WINAPI
AVICompressor_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
AVICompressor
*
This
=
impl_from_IBaseFilter
(
iface
);
...
...
@@ -113,6 +152,7 @@ static ULONG WINAPI AVICompressor_Release(IBaseFilter *iface)
if
(
!
ref
)
{
if
(
This
->
hic
)
ICClose
(
This
->
hic
);
heap_free
(
This
->
videoinfo
);
if
(
This
->
in
)
BaseInputPinImpl_Release
(
&
This
->
in
->
pin
.
IPin_iface
);
if
(
This
->
out
)
...
...
@@ -334,9 +374,19 @@ static HRESULT WINAPI AVICompressorIn_ReceiveConnection(IPin *iface,
IPin
*
pConnector
,
const
AM_MEDIA_TYPE
*
pmt
)
{
AVICompressor
*
This
=
impl_from_IPin
(
iface
);
FIXME
(
"(%p)->(%p AM_MEDIA_TYPE(%p))
\n
"
,
This
,
pConnector
,
pmt
);
HRESULT
hres
;
TRACE
(
"(%p)->(%p AM_MEDIA_TYPE(%p))
\n
"
,
This
,
pConnector
,
pmt
);
dump_AM_MEDIA_TYPE
(
pmt
);
return
E_NOTIMPL
;
hres
=
BaseInputPinImpl_ReceiveConnection
(
iface
,
pConnector
,
pmt
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
fill_format_info
(
This
,
(
VIDEOINFOHEADER
*
)
pmt
->
pbFormat
);
if
(
FAILED
(
hres
))
BasePinImpl_Disconnect
(
iface
);
return
hres
;
}
static
HRESULT
WINAPI
AVICompressorIn_Disconnect
(
IPin
*
iface
)
...
...
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