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
af33888b
Commit
af33888b
authored
Nov 07, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Nov 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Forward media time in ACM Wrapper.
parent
2906a6f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
acmwrapper.c
dlls/quartz/acmwrapper.c
+19
-0
No files found.
dlls/quartz/acmwrapper.c
View file @
af33888b
...
@@ -67,6 +67,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
...
@@ -67,6 +67,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
MMRESULT
res
;
MMRESULT
res
;
HRESULT
hr
;
HRESULT
hr
;
LONGLONG
tStart
=
-
1
,
tStop
=
-
1
,
tMed
;
LONGLONG
tStart
=
-
1
,
tStop
=
-
1
,
tMed
;
LONGLONG
mtStart
=
-
1
,
mtStop
=
-
1
,
mtMed
;
EnterCriticalSection
(
&
This
->
tf
.
filter
.
csFilter
);
EnterCriticalSection
(
&
This
->
tf
.
filter
.
csFilter
);
hr
=
IMediaSample_GetPointer
(
pSample
,
&
pbSrcStream
);
hr
=
IMediaSample_GetPointer
(
pSample
,
&
pbSrcStream
);
...
@@ -80,6 +81,8 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
...
@@ -80,6 +81,8 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
preroll
=
(
IMediaSample_IsPreroll
(
pSample
)
==
S_OK
);
preroll
=
(
IMediaSample_IsPreroll
(
pSample
)
==
S_OK
);
IMediaSample_GetTime
(
pSample
,
&
tStart
,
&
tStop
);
IMediaSample_GetTime
(
pSample
,
&
tStart
,
&
tStop
);
if
(
IMediaSample_GetMediaTime
(
pSample
,
&
mtStart
,
&
mtStop
)
!=
S_OK
)
mtStart
=
mtStop
=
-
1
;
cbSrcStream
=
IMediaSample_GetActualDataLength
(
pSample
);
cbSrcStream
=
IMediaSample_GetActualDataLength
(
pSample
);
/* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */
/* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */
...
@@ -94,6 +97,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
...
@@ -94,6 +97,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
WARN
(
"Discontinuity
\n
"
);
WARN
(
"Discontinuity
\n
"
);
tMed
=
tStart
;
tMed
=
tStart
;
mtMed
=
mtStart
;
TRACE
(
"Sample data ptr = %p, size = %d
\n
"
,
pbSrcStream
,
cbSrcStream
);
TRACE
(
"Sample data ptr = %p, size = %d
\n
"
,
pbSrcStream
,
cbSrcStream
);
...
@@ -192,6 +196,21 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
...
@@ -192,6 +196,21 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam
ERR
(
"No valid timestamp found
\n
"
);
ERR
(
"No valid timestamp found
\n
"
);
IMediaSample_SetTime
(
pOutSample
,
NULL
,
NULL
);
IMediaSample_SetTime
(
pOutSample
,
NULL
,
NULL
);
}
}
if
(
mtStart
<
0
)
{
IMediaSample_SetMediaTime
(
pOutSample
,
NULL
,
NULL
);
}
else
if
(
ash
.
cbSrcLengthUsed
==
cbSrcStream
)
{
IMediaSample_SetMediaTime
(
pOutSample
,
&
mtStart
,
&
mtStop
);
mtStart
=
mtMed
=
mtStop
;
}
else
if
(
mtStop
>=
mtStart
)
{
mtMed
=
mtStop
-
mtStart
;
mtMed
=
mtStart
+
mtMed
*
ash
.
cbSrcLengthUsed
/
cbSrcStream
;
IMediaSample_SetMediaTime
(
pOutSample
,
&
mtStart
,
&
mtMed
);
mtStart
=
mtMed
;
}
else
{
IMediaSample_SetMediaTime
(
pOutSample
,
NULL
,
NULL
);
}
TRACE
(
"Sample stop time: %u.%03u
\n
"
,
(
DWORD
)(
tStart
/
10000000
),
(
DWORD
)((
tStart
/
10000
)
%
1000
));
TRACE
(
"Sample stop time: %u.%03u
\n
"
,
(
DWORD
)(
tStart
/
10000000
),
(
DWORD
)((
tStart
/
10000
)
%
1000
));
LeaveCriticalSection
(
&
This
->
tf
.
filter
.
csFilter
);
LeaveCriticalSection
(
&
This
->
tf
.
filter
.
csFilter
);
...
...
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