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
f2206d3d
Commit
f2206d3d
authored
Jun 12, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/avico: Store the sink pin inline in the AviCompressor structure.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cec43c18
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
+12
-15
avico.c
dlls/qcap/avico.c
+7
-13
pin.c
dlls/strmbase/pin.c
+2
-2
strmbase.h
include/wine/strmbase.h
+3
-0
No files found.
dlls/qcap/avico.c
View file @
f2206d3d
...
@@ -37,7 +37,7 @@ typedef struct {
...
@@ -37,7 +37,7 @@ typedef struct {
BaseFilter
filter
;
BaseFilter
filter
;
IPersistPropertyBag
IPersistPropertyBag_iface
;
IPersistPropertyBag
IPersistPropertyBag_iface
;
BaseInputPin
*
in
;
BaseInputPin
sink
;
BaseOutputPin
*
out
;
BaseOutputPin
*
out
;
DWORD
fcc_handler
;
DWORD
fcc_handler
;
...
@@ -183,7 +183,7 @@ static IPin *avi_compressor_get_pin(BaseFilter *iface, unsigned int index)
...
@@ -183,7 +183,7 @@ static IPin *avi_compressor_get_pin(BaseFilter *iface, unsigned int index)
AVICompressor
*
filter
=
impl_from_BaseFilter
(
iface
);
AVICompressor
*
filter
=
impl_from_BaseFilter
(
iface
);
if
(
index
==
0
)
if
(
index
==
0
)
return
&
filter
->
in
->
pin
.
IPin_iface
;
return
&
filter
->
sink
.
pin
.
IPin_iface
;
else
if
(
index
==
1
)
else
if
(
index
==
1
)
return
&
filter
->
out
->
pin
.
IPin_iface
;
return
&
filter
->
out
->
pin
.
IPin_iface
;
return
NULL
;
return
NULL
;
...
@@ -196,8 +196,7 @@ static void avi_compressor_destroy(BaseFilter *iface)
...
@@ -196,8 +196,7 @@ static void avi_compressor_destroy(BaseFilter *iface)
if
(
filter
->
hic
)
if
(
filter
->
hic
)
ICClose
(
filter
->
hic
);
ICClose
(
filter
->
hic
);
heap_free
(
filter
->
videoinfo
);
heap_free
(
filter
->
videoinfo
);
if
(
filter
->
in
)
strmbase_sink_cleanup
(
&
filter
->
sink
);
BaseInputPinImpl_Release
(
&
filter
->
in
->
pin
.
IPin_iface
);
if
(
filter
->
out
)
if
(
filter
->
out
)
BaseOutputPinImpl_Release
(
&
filter
->
out
->
pin
.
IPin_iface
);
BaseOutputPinImpl_Release
(
&
filter
->
out
->
pin
.
IPin_iface
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
...
@@ -484,7 +483,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *
...
@@ -484,7 +483,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *
if
((
This
->
driver_flags
&
VIDCF_TEMPORAL
)
&&
!
(
This
->
driver_flags
&
VIDCF_FASTTEMPORALC
))
if
((
This
->
driver_flags
&
VIDCF_TEMPORAL
)
&&
!
(
This
->
driver_flags
&
VIDCF_FASTTEMPORALC
))
FIXME
(
"Unsupported temporal compression
\n
"
);
FIXME
(
"Unsupported temporal compression
\n
"
);
src_videoinfo
=
(
VIDEOINFOHEADER
*
)
This
->
in
->
pin
.
mtCurrent
.
pbFormat
;
src_videoinfo
=
(
VIDEOINFOHEADER
*
)
This
->
sink
.
pin
.
mtCurrent
.
pbFormat
;
This
->
videoinfo
->
bmiHeader
.
biSizeImage
=
This
->
max_frame_size
;
This
->
videoinfo
->
bmiHeader
.
biSizeImage
=
This
->
max_frame_size
;
res
=
ICCompress
(
This
->
hic
,
sync_point
?
ICCOMPRESS_KEYFRAME
:
0
,
&
This
->
videoinfo
->
bmiHeader
,
buf
,
res
=
ICCompress
(
This
->
hic
,
sync_point
?
ICCOMPRESS_KEYFRAME
:
0
,
&
This
->
videoinfo
->
bmiHeader
,
buf
,
&
src_videoinfo
->
bmiHeader
,
ptr
,
0
,
&
comp_flags
,
This
->
frame_cnt
,
0
,
0
,
NULL
,
NULL
);
&
src_videoinfo
->
bmiHeader
,
ptr
,
0
,
&
comp_flags
,
This
->
frame_cnt
,
0
,
0
,
NULL
,
NULL
);
...
@@ -572,7 +571,7 @@ static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition
...
@@ -572,7 +571,7 @@ static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition
amt
->
subtype
=
MEDIASUBTYPE_PCM
;
amt
->
subtype
=
MEDIASUBTYPE_PCM
;
amt
->
bFixedSizeSamples
=
FALSE
;
amt
->
bFixedSizeSamples
=
FALSE
;
amt
->
bTemporalCompression
=
(
This
->
driver_flags
&
VIDCF_TEMPORAL
)
!=
0
;
amt
->
bTemporalCompression
=
(
This
->
driver_flags
&
VIDCF_TEMPORAL
)
!=
0
;
amt
->
lSampleSize
=
This
->
in
->
pin
.
mtCurrent
.
lSampleSize
;
amt
->
lSampleSize
=
This
->
sink
.
pin
.
mtCurrent
.
lSampleSize
;
amt
->
formattype
=
FORMAT_VideoInfo
;
amt
->
formattype
=
FORMAT_VideoInfo
;
amt
->
pUnk
=
NULL
;
amt
->
pUnk
=
NULL
;
amt
->
cbFormat
=
This
->
videoinfo_size
;
amt
->
cbFormat
=
This
->
videoinfo_size
;
...
@@ -633,13 +632,8 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
...
@@ -633,13 +632,8 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
compressor
->
IPersistPropertyBag_iface
.
lpVtbl
=
&
PersistPropertyBagVtbl
;
compressor
->
IPersistPropertyBag_iface
.
lpVtbl
=
&
PersistPropertyBagVtbl
;
in_pin_info
.
pFilter
=
&
compressor
->
filter
.
IBaseFilter_iface
;
in_pin_info
.
pFilter
=
&
compressor
->
filter
.
IBaseFilter_iface
;
hres
=
BaseInputPin_Construct
(
&
AVICompressorInputPinVtbl
,
sizeof
(
BaseInputPin
),
&
in_pin_info
,
strmbase_sink_init
(
&
compressor
->
sink
,
&
AVICompressorInputPinVtbl
,
&
in_pin_info
,
&
AVICompressorBaseInputPinVtbl
,
&
compressor
->
filter
.
csFilter
,
NULL
,
(
IPin
**
)
&
compressor
->
in
);
&
AVICompressorBaseInputPinVtbl
,
&
compressor
->
filter
.
csFilter
,
NULL
);
if
(
FAILED
(
hres
))
{
strmbase_filter_cleanup
(
&
compressor
->
filter
);
*
phr
=
hres
;
return
NULL
;
}
out_pin_info
.
pFilter
=
&
compressor
->
filter
.
IBaseFilter_iface
;
out_pin_info
.
pFilter
=
&
compressor
->
filter
.
IBaseFilter_iface
;
hres
=
BaseOutputPin_Construct
(
&
AVICompressorOutputPinVtbl
,
sizeof
(
BaseOutputPin
),
&
out_pin_info
,
hres
=
BaseOutputPin_Construct
(
&
AVICompressorOutputPinVtbl
,
sizeof
(
BaseOutputPin
),
&
out_pin_info
,
...
...
dlls/strmbase/pin.c
View file @
f2206d3d
...
@@ -1109,7 +1109,7 @@ static const IMemInputPinVtbl MemInputPin_Vtbl =
...
@@ -1109,7 +1109,7 @@ static const IMemInputPinVtbl MemInputPin_Vtbl =
MemInputPin_ReceiveCanBlock
MemInputPin_ReceiveCanBlock
};
};
static
void
strmbase_sink_init
(
BaseInputPin
*
pin
,
const
IPinVtbl
*
vtbl
,
void
strmbase_sink_init
(
BaseInputPin
*
pin
,
const
IPinVtbl
*
vtbl
,
const
PIN_INFO
*
info
,
const
BaseInputPinFuncTable
*
func_table
,
CRITICAL_SECTION
*
cs
,
const
PIN_INFO
*
info
,
const
BaseInputPinFuncTable
*
func_table
,
CRITICAL_SECTION
*
cs
,
IMemAllocator
*
allocator
)
IMemAllocator
*
allocator
)
{
{
...
@@ -1150,7 +1150,7 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size
...
@@ -1150,7 +1150,7 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size
return
S_OK
;
return
S_OK
;
}
}
static
void
strmbase_sink_cleanup
(
BaseInputPin
*
pin
)
void
strmbase_sink_cleanup
(
BaseInputPin
*
pin
)
{
{
FreeMediaType
(
&
pin
->
pin
.
mtCurrent
);
FreeMediaType
(
&
pin
->
pin
.
mtCurrent
);
if
(
pin
->
pAllocator
)
if
(
pin
->
pAllocator
)
...
...
include/wine/strmbase.h
View file @
f2206d3d
...
@@ -151,6 +151,9 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size
...
@@ -151,6 +151,9 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size
const
BaseInputPinFuncTable
*
pBaseInputFuncsTable
,
const
BaseInputPinFuncTable
*
pBaseInputFuncsTable
,
LPCRITICAL_SECTION
pCritSec
,
IMemAllocator
*
,
IPin
**
ppPin
);
LPCRITICAL_SECTION
pCritSec
,
IMemAllocator
*
,
IPin
**
ppPin
);
HRESULT
WINAPI
BaseInputPin_Destroy
(
BaseInputPin
*
This
);
HRESULT
WINAPI
BaseInputPin_Destroy
(
BaseInputPin
*
This
);
void
strmbase_sink_init
(
BaseInputPin
*
pin
,
const
IPinVtbl
*
vtbl
,
const
PIN_INFO
*
info
,
const
BaseInputPinFuncTable
*
func_table
,
CRITICAL_SECTION
*
cs
,
IMemAllocator
*
allocator
);
void
strmbase_sink_cleanup
(
BaseInputPin
*
pin
);
typedef
struct
BaseFilter
typedef
struct
BaseFilter
{
{
...
...
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