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
9d1f49cd
Commit
9d1f49cd
authored
Mar 31, 2007
by
Chris Robinson
Committed by
Alexandre Julliard
Apr 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Set the sample time based on the number of bytes read before sending it downstream.
parent
b3c4d6ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
filesource.c
dlls/quartz/filesource.c
+2
-1
pin.c
dlls/quartz/pin.c
+12
-2
No files found.
dlls/quartz/filesource.c
View file @
9d1f49cd
...
...
@@ -1045,6 +1045,7 @@ static HRESULT WINAPI FileAsyncReader_Request(IAsyncReader * iface, IMediaSample
static
HRESULT
WINAPI
FileAsyncReader_WaitForNext
(
IAsyncReader
*
iface
,
DWORD
dwTimeout
,
IMediaSample
**
ppSample
,
DWORD_PTR
*
pdwUser
)
{
HRESULT
hr
=
S_OK
;
DWORD
dwBytes
=
0
;
DATAREQUEST
*
pDataRq
=
NULL
;
FileAsyncReader
*
This
=
impl_from_IAsyncReader
(
iface
);
...
...
@@ -1083,7 +1084,6 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw
if
(
SUCCEEDED
(
hr
))
{
DWORD
dwBytes
;
/* get any errors */
if
(
!
GetOverlappedResult
(
This
->
hFile
,
&
pDataRq
->
ovl
,
&
dwBytes
,
FALSE
))
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
...
...
@@ -1091,6 +1091,7 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw
if
(
SUCCEEDED
(
hr
))
{
IMediaSample_SetActualDataLength
(
pDataRq
->
pSample
,
dwBytes
);
*
ppSample
=
pDataRq
->
pSample
;
*
pdwUser
=
pDataRq
->
dwUserData
;
}
...
...
dlls/quartz/pin.c
View file @
9d1f49cd
...
...
@@ -1198,6 +1198,7 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
* so that one sample is processed while one sample is fetched. However,
* it is harder to debug so for the moment it will stay as it is */
IMediaSample
*
pSample
=
NULL
;
REFERENCE_TIME
rtSampleStart
;
REFERENCE_TIME
rtSampleStop
;
DWORD_PTR
dwUser
;
...
...
@@ -1209,10 +1210,11 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
if
(
SUCCEEDED
(
hr
))
{
rtSampleStop
=
This
->
rtCurrent
+
MEDIATIME_FROM_BYTES
(
IMediaSample_GetSize
(
pSample
));
rtSampleStart
=
This
->
rtCurrent
;
rtSampleStop
=
rtSampleStart
+
MEDIATIME_FROM_BYTES
(
IMediaSample_GetSize
(
pSample
));
if
(
rtSampleStop
>
This
->
rtStop
)
rtSampleStop
=
MEDIATIME_FROM_BYTES
(
ALIGNUP
(
BYTES_FROM_MEDIATIME
(
This
->
rtStop
),
allocProps
.
cbAlign
));
hr
=
IMediaSample_SetTime
(
pSample
,
&
This
->
rtCurren
t
,
&
rtSampleStop
);
hr
=
IMediaSample_SetTime
(
pSample
,
&
rtSampleStar
t
,
&
rtSampleStop
);
This
->
rtCurrent
=
rtSampleStop
;
}
...
...
@@ -1226,6 +1228,14 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
hr
=
IPin_QueryPinInfo
((
IPin
*
)
&
This
->
pin
,
&
pinInfo
);
if
(
SUCCEEDED
(
hr
))
{
rtSampleStop
=
rtSampleStart
+
MEDIATIME_FROM_BYTES
(
IMediaSample_GetActualDataLength
(
pSample
));
if
(
rtSampleStop
>
This
->
rtStop
)
rtSampleStop
=
MEDIATIME_FROM_BYTES
(
ALIGNUP
(
BYTES_FROM_MEDIATIME
(
This
->
rtStop
),
allocProps
.
cbAlign
));
hr
=
IMediaSample_SetTime
(
pSample
,
&
rtSampleStart
,
&
rtSampleStop
);
}
if
(
SUCCEEDED
(
hr
))
hr
=
This
->
fnSampleProc
(
This
->
pin
.
pUserData
,
pSample
);
else
ERR
(
"Processing error: %x
\n
"
,
hr
);
...
...
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