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
0f73bbad
Commit
0f73bbad
authored
Apr 30, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
May 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Get rid of the sample holding code in the mpeg splitter.
Instead just revert the position slightly, this is a lot easier to maintain.
parent
3066116f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
39 deletions
+7
-39
mpegsplit.c
dlls/quartz/mpegsplit.c
+7
-39
No files found.
dlls/quartz/mpegsplit.c
View file @
0f73bbad
...
...
@@ -63,7 +63,6 @@ struct seek_entry {
typedef
struct
MPEGSplitterImpl
{
ParserImpl
Parser
;
IMediaSample
*
pCurrentSample
;
LONGLONG
EndOfFile
;
LONGLONG
duration
;
LONGLONG
position
;
...
...
@@ -180,6 +179,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample)
assert
(
length
==
len
||
length
+
4
==
len
);
IMediaSample_SetActualDataLength
(
pCurrentSample
,
length
);
/* Queue the next sample */
if
(
length
+
4
==
len
)
{
PullPin
*
pin
=
This
->
Parser
.
pInputPin
;
...
...
@@ -269,46 +269,18 @@ static HRESULT MPEGSplitter_process_sample(LPVOID iface, IMediaSample * pSample,
/* trace removed for performance reasons */
/* TRACE("(%p), %llu -> %llu\n", pSample, tStart, tStop); */
/* Try to get rid of current sample, if any */
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
(
"Yuck!
\n
"
);
IMediaSample_AddRef
(
pSample
);
IAsyncReader_Request
(
This
->
Parser
.
pInputPin
->
pReader
,
pSample
,
0
);
return
hr
;
}
IMediaSample_Release
(
This
->
pCurrentSample
);
This
->
pCurrentSample
=
NULL
;
}
/* Now, try to find a new header */
hr
=
FillBuffer
(
This
,
pSample
);
if
(
hr
!=
S_OK
)
{
/* We still have our sample! Do damage control and send it next round */
WARN
(
"Failed with hres: %08x!
\n
"
,
hr
);
/*
If set to S_FALSE we keep the sample, to transmit it next time
*/
if
(
hr
==
S_FALSE
)
/*
Unset progression if denied!
*/
if
(
hr
==
VFW_E_WRONG_STATE
||
hr
==
S_FALSE
)
{
This
->
pCurrentSample
=
pSample
;
IMediaSample_AddRef
(
This
->
pCurrentSample
)
;
memcpy
(
This
->
header
,
pbSrcStream
,
4
)
;
This
->
Parser
.
pInputPin
->
rtCurrent
=
tStart
;
}
/* Sample was rejected because of whatever reason (paused/flushing/etc), no need to terminate the processing */
if
(
hr
==
S_FALSE
)
hr
=
S_OK
;
}
if
(
BYTES_FROM_MEDIATIME
(
tStop
)
>=
This
->
EndOfFile
||
This
->
position
>=
This
->
Parser
.
mediaSeeking
.
llStop
)
...
...
@@ -555,7 +527,7 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin, ALLOCATO
/* Make the output buffer a multiple of the frame size */
props
->
cbBuffer
=
0x4000
/
format
->
nBlockAlign
*
format
->
nBlockAlign
;
props
->
cBuffers
=
2
;
props
->
cBuffers
=
3
;
hr
=
Parser_AddPin
(
&
(
This
->
Parser
),
&
piOutput
,
props
,
&
amt
);
}
...
...
@@ -644,11 +616,7 @@ static HRESULT MPEGSplitter_cleanup(LPVOID iface)
{
MPEGSplitterImpl
*
This
=
(
MPEGSplitterImpl
*
)
iface
;
TRACE
(
"(%p) Deleting sample
\n
"
,
This
);
if
(
This
->
pCurrentSample
)
IMediaSample_Release
(
This
->
pCurrentSample
);
This
->
pCurrentSample
=
NULL
;
TRACE
(
"(%p)
\n
"
,
This
);
return
S_OK
;
}
...
...
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