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
7fab2428
Commit
7fab2428
authored
May 21, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
May 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: COM cleanup for Parser_OutputPin.
parent
8560f36c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
15 deletions
+21
-15
avisplit.c
dlls/quartz/avisplit.c
+4
-4
mpegsplit.c
dlls/quartz/mpegsplit.c
+3
-3
parser.c
dlls/quartz/parser.c
+5
-5
parser.h
dlls/quartz/parser.h
+6
-0
waveparser.c
dlls/quartz/waveparser.c
+3
-3
No files found.
dlls/quartz/avisplit.c
View file @
7fab2428
...
...
@@ -288,7 +288,7 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe
static
HRESULT
AVISplitter_Receive
(
AVISplitterImpl
*
This
,
IMediaSample
*
sample
,
DWORD
streamnumber
)
{
Parser_OutputPin
*
pin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
+
streamnumber
]
;
Parser_OutputPin
*
pin
=
unsafe_impl_Parser_OutputPin_from_IPin
(
This
->
Parser
.
ppPins
[
1
+
streamnumber
])
;
HRESULT
hr
;
LONGLONG
start
,
stop
,
rtstart
,
rtstop
;
StreamData
*
stream
=
&
This
->
streams
[
streamnumber
];
...
...
@@ -318,7 +318,7 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample,
EnterCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
pin
->
pin
.
pin
.
tStart
=
start
;
pin
->
pin
.
pin
.
dRate
=
This
->
Parser
.
sourceSeeking
.
dRate
;
hr
=
IPin_ConnectedTo
(
(
IPin
*
)
pin
,
&
victim
);
hr
=
IPin_ConnectedTo
(
&
pin
->
pin
.
pin
.
IPin_iface
,
&
victim
);
if
(
hr
==
S_OK
)
{
hr
=
IPin_NewSegment
(
victim
,
start
,
This
->
Parser
.
sourceSeeking
.
llStop
,
...
...
@@ -337,7 +337,7 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample,
IMediaSample_SetTime
(
sample
,
&
rtstart
,
&
rtstop
);
IMediaSample_SetMediaTime
(
sample
,
&
start
,
&
stop
);
hr
=
BaseOutputPinImpl_Deliver
(
(
BaseOutputPin
*
)
&
pin
->
pin
,
sample
);
hr
=
BaseOutputPinImpl_Deliver
(
&
pin
->
pin
,
sample
);
/* Uncomment this if you want to debug the time differences between the
* different streams, it is useful for that
...
...
@@ -1307,7 +1307,7 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface)
EnterCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
for
(
x
=
0
;
x
<
This
->
Parser
.
cStreams
;
++
x
)
{
Parser_OutputPin
*
pin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
+
x
]
;
Parser_OutputPin
*
pin
=
unsafe_impl_Parser_OutputPin_from_IPin
(
This
->
Parser
.
ppPins
[
1
+
x
])
;
StreamData
*
stream
=
This
->
streams
+
x
;
LONGLONG
wanted_frames
;
DWORD
last_keyframe
=
0
,
last_keyframeidx
=
0
,
preroll
=
0
;
...
...
dlls/quartz/mpegsplit.c
View file @
7fab2428
...
...
@@ -169,7 +169,7 @@ static HRESULT parse_header(BYTE *header, LONGLONG *plen, LONGLONG *pduration)
static
HRESULT
FillBuffer
(
MPEGSplitterImpl
*
This
,
IMediaSample
*
pCurrentSample
)
{
Parser_OutputPin
*
pOutputPin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
]
;
Parser_OutputPin
*
pOutputPin
=
unsafe_impl_Parser_OutputPin_from_IPin
(
This
->
Parser
.
ppPins
[
1
])
;
LONGLONG
length
=
0
;
LONGLONG
pos
=
BYTES_FROM_MEDIATIME
(
This
->
Parser
.
pInputPin
->
rtNext
);
LONGLONG
time
=
This
->
position
,
rtstop
,
rtstart
;
...
...
@@ -241,7 +241,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample)
EnterCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
pOutputPin
->
pin
.
pin
.
tStart
=
time
;
pOutputPin
->
pin
.
pin
.
dRate
=
This
->
Parser
.
sourceSeeking
.
dRate
;
hr
=
IPin_ConnectedTo
(
(
IPin
*
)
pOutputPin
,
&
victim
);
hr
=
IPin_ConnectedTo
(
&
pOutputPin
->
pin
.
pin
.
IPin_iface
,
&
victim
);
if
(
hr
==
S_OK
)
{
hr
=
IPin_NewSegment
(
victim
,
time
,
This
->
Parser
.
sourceSeeking
.
llStop
,
...
...
@@ -259,7 +259,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample)
IMediaSample_SetTime
(
pCurrentSample
,
&
rtstart
,
&
rtstop
);
IMediaSample_SetMediaTime
(
pCurrentSample
,
&
time
,
&
This
->
position
);
hr
=
BaseOutputPinImpl_Deliver
(
(
BaseOutputPin
*
)
&
pOutputPin
->
pin
,
pCurrentSample
);
hr
=
BaseOutputPinImpl_Deliver
(
&
pOutputPin
->
pin
,
pCurrentSample
);
if
(
hr
!=
S_OK
)
{
...
...
dlls/quartz/parser.c
View file @
7fab2428
...
...
@@ -437,7 +437,7 @@ HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PR
if
(
SUCCEEDED
(
hr
))
{
IPin
*
pPin
=
This
->
ppPins
[
This
->
cStreams
+
1
];
Parser_OutputPin
*
pin
=
(
Parser_OutputPin
*
)
pPin
;
Parser_OutputPin
*
pin
=
unsafe_impl_Parser_OutputPin_from_IPin
(
pPin
)
;
pin
->
pmt
=
CoTaskMemAlloc
(
sizeof
(
AM_MEDIA_TYPE
));
CopyMediaType
(
pin
->
pmt
,
amt
);
pin
->
dwSamplesProcessed
=
0
;
...
...
@@ -614,7 +614,7 @@ static HRESULT WINAPI Parser_OutputPin_BreakConnect(BaseOutputPin *This)
static
HRESULT
WINAPI
Parser_OutputPin_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
Parser_OutputPin
*
This
=
(
Parser_OutputPin
*
)
iface
;
Parser_OutputPin
*
This
=
unsafe_impl_Parser_OutputPin_from_IPin
(
iface
)
;
TRACE
(
"(%s, %p)
\n
"
,
qzdebugstr_guid
(
riid
),
ppv
);
...
...
@@ -641,7 +641,7 @@ static HRESULT WINAPI Parser_OutputPin_QueryInterface(IPin * iface, REFIID riid,
static
ULONG
WINAPI
Parser_OutputPin_Release
(
IPin
*
iface
)
{
Parser_OutputPin
*
This
=
(
Parser_OutputPin
*
)
iface
;
Parser_OutputPin
*
This
=
unsafe_impl_Parser_OutputPin_from_IPin
(
iface
)
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
pin
.
pin
.
refCount
);
TRACE
(
"(%p)->() Release from %d
\n
"
,
iface
,
refCount
+
1
);
...
...
@@ -659,7 +659,7 @@ static ULONG WINAPI Parser_OutputPin_Release(IPin * iface)
static
HRESULT
WINAPI
Parser_OutputPin_Connect
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
Parser_OutputPin
*
This
=
(
Parser_OutputPin
*
)
iface
;
Parser_OutputPin
*
This
=
unsafe_impl_Parser_OutputPin_from_IPin
(
iface
)
;
ParserImpl
*
parser
=
(
ParserImpl
*
)
This
->
pin
.
pin
.
pinInfo
.
pFilter
;
/* Set the allocator to our input pin's */
...
...
@@ -672,7 +672,7 @@ static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin * pReceivePin,
static
HRESULT
WINAPI
Parser_OutputPin_QueryAccept
(
IPin
*
iface
,
const
AM_MEDIA_TYPE
*
pmt
)
{
Parser_OutputPin
*
This
=
(
Parser_OutputPin
*
)
iface
;
Parser_OutputPin
*
This
=
unsafe_impl_Parser_OutputPin_from_IPin
(
iface
)
;
TRACE
(
"()
\n
"
);
dump_AM_MEDIA_TYPE
(
pmt
);
...
...
dlls/quartz/parser.h
View file @
7fab2428
...
...
@@ -74,3 +74,9 @@ extern HRESULT WINAPI Parser_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppP
extern
HRESULT
WINAPI
Parser_QueryFilterInfo
(
IBaseFilter
*
iface
,
FILTER_INFO
*
pInfo
);
extern
HRESULT
WINAPI
Parser_JoinFilterGraph
(
IBaseFilter
*
iface
,
IFilterGraph
*
pGraph
,
LPCWSTR
pName
);
extern
HRESULT
WINAPI
Parser_QueryVendorInfo
(
IBaseFilter
*
iface
,
LPWSTR
*
pVendorInfo
);
/* COM helpers */
static
inline
Parser_OutputPin
*
unsafe_impl_Parser_OutputPin_from_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
Parser_OutputPin
,
pin
.
pin
.
IPin_iface
);
}
dlls/quartz/waveparser.c
View file @
7fab2428
...
...
@@ -103,7 +103,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR
return
S_OK
;
}
pOutputPin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
]
;
pOutputPin
=
unsafe_impl_Parser_OutputPin_from_IPin
(
This
->
Parser
.
ppPins
[
1
])
;
if
(
SUCCEEDED
(
hr
))
hr
=
IMemAllocator_GetBuffer
(
pin
->
pAlloc
,
&
newsample
,
NULL
,
NULL
,
0
);
...
...
@@ -232,7 +232,7 @@ static HRESULT WINAPI WAVEParserImpl_seek(IMediaSeeking *iface)
}
pPin
->
rtStart
=
pPin
->
rtCurrent
=
bytepos
;
((
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
])
->
dwSamplesProcessed
=
0
;
unsafe_impl_Parser_OutputPin_from_IPin
(
This
->
Parser
.
ppPins
[
1
])
->
dwSamplesProcessed
=
0
;
LeaveCriticalSection
(
&
This
->
Parser
.
filter
.
csFilter
);
TRACE
(
"Done flushing
\n
"
);
...
...
@@ -371,7 +371,7 @@ static HRESULT WAVEParser_first_request(LPVOID iface)
LONGLONG
rtSampleStart
=
pin
->
rtNext
;
/* Add 4 for the next header, which should hopefully work */
LONGLONG
rtSampleStop
=
rtSampleStart
+
MEDIATIME_FROM_BYTES
(
IMediaSample_GetSize
(
sample
));
Parser_OutputPin
*
outpin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
]
;
Parser_OutputPin
*
outpin
=
unsafe_impl_Parser_OutputPin_from_IPin
(
This
->
Parser
.
ppPins
[
1
])
;
if
(
rtSampleStop
>
pin
->
rtStop
)
rtSampleStop
=
MEDIATIME_FROM_BYTES
(
ALIGNUP
(
BYTES_FROM_MEDIATIME
(
pin
->
rtStop
),
pin
->
cbAlign
));
...
...
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