Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
8099a624
Commit
8099a624
authored
16 years ago
by
Maarten Lankhorst
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
quartz: Get rid of the sample holding code in the wave parser.
parent
0f73bbad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/quartz/waveparser.c
+6
-39
6 additions, 39 deletions
dlls/quartz/waveparser.c
with
6 additions
and
39 deletions
dlls/quartz/waveparser.c
+
6
−
39
View file @
8099a624
...
...
@@ -42,7 +42,6 @@ static const WCHAR wcsOutputPinName[] = {'o','u','t','p','u','t',' ','p','i','n'
typedef
struct
WAVEParserImpl
{
ParserImpl
Parser
;
IMediaSample
*
pCurrentSample
;
LONGLONG
StartOfFile
;
/* in media time */
LONGLONG
EndOfFile
;
DWORD
dwSampleSize
;
...
...
@@ -97,28 +96,6 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR
pOutputPin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
];
/* Try to get rid of the current sample in case we had a S_FALSE last time */
if
(
This
->
pCurrentSample
)
{
Parser_OutputPin
*
pOutputPin
=
(
Parser_OutputPin
*
)
This
->
Parser
.
ppPins
[
1
];
IMediaSample
*
pCurrentSample
=
This
->
pCurrentSample
;
/* Requeue buffer */
hr
=
OutputPin_SendSample
(
&
pOutputPin
->
pin
,
pCurrentSample
);
if
(
hr
!=
S_OK
)
{
Sleep
(
10
);
TRACE
(
"Requeueing!
\n
"
);
IMediaSample_AddRef
(
pSample
);
IAsyncReader_Request
(
This
->
Parser
.
pInputPin
->
pReader
,
pSample
,
0
);
return
hr
;
}
IMediaSample_Release
(
This
->
pCurrentSample
);
This
->
pCurrentSample
=
NULL
;
}
if
(
SUCCEEDED
(
hr
))
hr
=
IMemAllocator_GetBuffer
(
pin
->
pAlloc
,
&
newsample
,
NULL
,
NULL
,
0
);
...
...
@@ -156,18 +133,14 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR
IMediaSample_SetTime
(
pSample
,
&
tAviStart
,
&
tAviStop
);
hr
=
OutputPin_SendSample
(
&
pOutputPin
->
pin
,
pSample
);
if
(
hr
!=
S_OK
&&
hr
!=
VFW_E_NOT_CONNECTED
&&
hr
!=
S_FALS
E
)
if
(
hr
!=
S_OK
&&
hr
!=
S_FALSE
&&
hr
!=
VFW_E_WRONG_STAT
E
)
ERR
(
"Error sending sample (%x)
\n
"
,
hr
);
if
(
hr
==
S_FALSE
)
{
This
->
pCurrentSample
=
pSample
;
IMediaSample_AddRef
(
pSample
);
hr
=
S_OK
;
}
else
if
(
hr
!=
S_OK
)
/* Unset progression if denied! */
This
->
Parser
.
pInputPin
->
rtCurrent
=
tStart
;
}
if
(
tStop
>=
This
->
EndOfFile
||
(
bytepos_to_duration
(
This
,
tStop
)
>=
This
->
Parser
.
mediaSeeking
.
llStop
))
if
(
tStop
>=
This
->
EndOfFile
||
(
bytepos_to_duration
(
This
,
tStop
)
>=
This
->
Parser
.
mediaSeeking
.
llStop
)
||
hr
==
VFW_E_NOT_CONNECTED
)
{
int
i
;
...
...
@@ -338,7 +311,7 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
props
->
cbAlign
=
((
WAVEFORMATEX
*
)
amt
.
pbFormat
)
->
nBlockAlign
;
props
->
cbPrefix
=
0
;
props
->
cbBuffer
=
4096
;
props
->
cBuffers
=
2
;
props
->
cBuffers
=
3
;
pWAVEParser
->
dwSampleSize
=
((
WAVEFORMATEX
*
)
amt
.
pbFormat
)
->
nBlockAlign
;
IAsyncReader_Length
(
This
->
pReader
,
&
length
,
&
avail
);
pWAVEParser
->
dwLength
=
length
/
(
ULONGLONG
)
pWAVEParser
->
dwSampleSize
;
...
...
@@ -364,10 +337,6 @@ static HRESULT WAVEParser_Cleanup(LPVOID iface)
TRACE
(
"(%p)->()
\n
"
,
This
);
if
(
This
->
pCurrentSample
)
IMediaSample_Release
(
This
->
pCurrentSample
);
This
->
pCurrentSample
=
NULL
;
return
S_OK
;
}
...
...
@@ -457,8 +426,6 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
/* Note: This memory is managed by the transform filter once created */
This
=
CoTaskMemAlloc
(
sizeof
(
WAVEParserImpl
));
This
->
pCurrentSample
=
NULL
;
hr
=
Parser_Create
(
&
(
This
->
Parser
),
&
WAVEParser_Vtbl
,
&
CLSID_WAVEParser
,
WAVEParser_Sample
,
WAVEParser_QueryAccept
,
WAVEParser_InputPin_PreConnect
,
WAVEParser_Cleanup
,
WAVEParser_disconnect
,
WAVEParser_first_request
,
NULL
,
NULL
,
WAVEParserImpl_seek
,
NULL
);
if
(
FAILED
(
hr
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment