Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
17b118a0
Commit
17b118a0
authored
Jun 13, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/avico: Store the source pin inline in the AviCompressor structure.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79ed388e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
17 deletions
+13
-17
avico.c
dlls/qcap/avico.c
+8
-15
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 @
17b118a0
...
...
@@ -38,7 +38,7 @@ typedef struct {
IPersistPropertyBag
IPersistPropertyBag_iface
;
BaseInputPin
sink
;
BaseOutputPin
*
out
;
BaseOutputPin
source
;
DWORD
fcc_handler
;
HIC
hic
;
...
...
@@ -148,7 +148,7 @@ static HRESULT WINAPI AVICompressor_Run(IBaseFilter *iface, REFERENCE_TIME tStar
if
(
This
->
filter
.
state
==
State_Running
)
return
S_OK
;
hres
=
IMemAllocator_Commit
(
This
->
out
->
pAllocator
);
hres
=
IMemAllocator_Commit
(
This
->
source
.
pAllocator
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Commit failed: %08x
\n
"
,
hres
);
return
hres
;
...
...
@@ -185,7 +185,7 @@ static IPin *avi_compressor_get_pin(BaseFilter *iface, unsigned int index)
if
(
index
==
0
)
return
&
filter
->
sink
.
pin
.
IPin_iface
;
else
if
(
index
==
1
)
return
&
filter
->
out
->
pin
.
IPin_iface
;
return
&
filter
->
source
.
pin
.
IPin_iface
;
return
NULL
;
}
...
...
@@ -197,8 +197,7 @@ static void avi_compressor_destroy(BaseFilter *iface)
ICClose
(
filter
->
hic
);
heap_free
(
filter
->
videoinfo
);
strmbase_sink_cleanup
(
&
filter
->
sink
);
if
(
filter
->
out
)
BaseOutputPinImpl_Release
(
&
filter
->
out
->
pin
.
IPin_iface
);
strmbase_source_cleanup
(
&
filter
->
source
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
heap_free
(
filter
);
}
...
...
@@ -472,7 +471,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *
return
hres
;
}
hres
=
BaseOutputPinImpl_GetDeliveryBuffer
(
This
->
out
,
&
out_sample
,
&
start
,
&
stop
,
0
);
hres
=
BaseOutputPinImpl_GetDeliveryBuffer
(
&
This
->
source
,
&
out_sample
,
&
start
,
&
stop
,
0
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -503,7 +502,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *
else
IMediaSample_SetMediaTime
(
out_sample
,
NULL
,
NULL
);
hres
=
BaseOutputPinImpl_Deliver
(
This
->
out
,
out_sample
);
hres
=
BaseOutputPinImpl_Deliver
(
&
This
->
source
,
out_sample
);
if
(
FAILED
(
hres
))
WARN
(
"Deliver failed: %08x
\n
"
,
hres
);
...
...
@@ -618,7 +617,6 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
PIN_INFO
in_pin_info
=
{
NULL
,
PINDIR_INPUT
,
{
'I'
,
'n'
,
0
}};
PIN_INFO
out_pin_info
=
{
NULL
,
PINDIR_OUTPUT
,
{
'O'
,
'u'
,
't'
,
0
}};
AVICompressor
*
compressor
;
HRESULT
hres
;
compressor
=
heap_alloc_zero
(
sizeof
(
*
compressor
));
if
(
!
compressor
)
{
...
...
@@ -636,13 +634,8 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
&
AVICompressorBaseInputPinVtbl
,
&
compressor
->
filter
.
csFilter
,
NULL
);
out_pin_info
.
pFilter
=
&
compressor
->
filter
.
IBaseFilter_iface
;
hres
=
BaseOutputPin_Construct
(
&
AVICompressorOutputPinVtbl
,
sizeof
(
BaseOutputPin
),
&
out_pin_info
,
&
AVICompressorBaseOutputPinVtbl
,
&
compressor
->
filter
.
csFilter
,
(
IPin
**
)
&
compressor
->
out
);
if
(
FAILED
(
hres
))
{
strmbase_filter_cleanup
(
&
compressor
->
filter
);
*
phr
=
hres
;
return
NULL
;
}
strmbase_source_init
(
&
compressor
->
source
,
&
AVICompressorOutputPinVtbl
,
&
out_pin_info
,
&
AVICompressorBaseOutputPinVtbl
,
&
compressor
->
filter
.
csFilter
);
*
phr
=
S_OK
;
return
&
compressor
->
filter
.
IUnknown_inner
;
...
...
dlls/strmbase/pin.c
View file @
17b118a0
...
...
@@ -740,7 +740,7 @@ static void strmbase_pin_init(BasePin *pin, const IPinVtbl *vtbl,
pin
->
pFuncsTable
=
func_table
;
}
static
void
strmbase_source_init
(
BaseOutputPin
*
pin
,
const
IPinVtbl
*
vtbl
,
void
strmbase_source_init
(
BaseOutputPin
*
pin
,
const
IPinVtbl
*
vtbl
,
const
PIN_INFO
*
info
,
const
BaseOutputPinFuncTable
*
func_table
,
CRITICAL_SECTION
*
cs
)
{
memset
(
pin
,
0
,
sizeof
(
*
pin
));
...
...
@@ -773,7 +773,7 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp
return
S_OK
;
}
static
void
strmbase_source_cleanup
(
BaseOutputPin
*
pin
)
void
strmbase_source_cleanup
(
BaseOutputPin
*
pin
)
{
FreeMediaType
(
&
pin
->
pin
.
mtCurrent
);
if
(
pin
->
pAllocator
)
...
...
include/wine/strmbase.h
View file @
17b118a0
...
...
@@ -135,6 +135,9 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *pin, IPin *pee
HRESULT
WINAPI
BaseOutputPin_Construct
(
const
IPinVtbl
*
OutputPin_Vtbl
,
LONG
outputpin_size
,
const
PIN_INFO
*
pPinInfo
,
const
BaseOutputPinFuncTable
*
pBaseOutputFuncsTable
,
LPCRITICAL_SECTION
pCritSec
,
IPin
**
ppPin
);
HRESULT
WINAPI
BaseOutputPin_Destroy
(
BaseOutputPin
*
This
);
void
strmbase_source_cleanup
(
BaseOutputPin
*
pin
);
void
strmbase_source_init
(
BaseOutputPin
*
pin
,
const
IPinVtbl
*
vtbl
,
const
PIN_INFO
*
info
,
const
BaseOutputPinFuncTable
*
func_table
,
CRITICAL_SECTION
*
cs
);
/* Base Input Pin */
HRESULT
WINAPI
BaseInputPinImpl_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
);
...
...
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