Rebase against 98c2c9a9c98d174851fa7a87db79599dd7d8af89

This commit is contained in:
Alistair Leslie-Hughes
2019-10-22 08:28:23 +11:00
parent 9807a02bb3
commit a568bd3e79
5 changed files with 30 additions and 146 deletions

View File

@@ -1,68 +0,0 @@
From e2abc9b73d2e909f62468de5d66c5d9ec51fce0f Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Tue, 22 Jul 2014 08:32:31 -0600
Subject: quartz: Implement MediaSeeking_GetStopPosition on top of
MediaSeeking_GetPositions.
---
dlls/quartz/filtergraph.c | 37 ++++++++++++++++---------------------
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 4c093f3..0d06ba4 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -2430,27 +2430,6 @@ static HRESULT WINAPI MediaSeeking_GetDuration(IMediaSeeking *iface, LONGLONG *p
return hr;
}
-static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *pStop)
-{
- IFilterGraphImpl *This = impl_from_IMediaSeeking(iface);
- HRESULT hr = S_OK;
-
- TRACE("(%p/%p)->(%p)\n", This, iface, pStop);
-
- if (!pStop)
- return E_POINTER;
-
- EnterCriticalSection(&This->cs);
- if (This->stop_position < 0)
- /* Stop position not set, use duration instead */
- hr = IMediaSeeking_GetDuration(iface, pStop);
- else
- *pStop = This->stop_position;
- LeaveCriticalSection(&This->cs);
-
- return hr;
-}
-
static HRESULT WINAPI MediaSeeking_ConvertTimeFormat(IMediaSeeking *iface, LONGLONG *pTarget,
const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
{
@@ -2565,6 +2544,22 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG
return hr;
}
+static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *pStop)
+{
+ IFilterGraphImpl *This = impl_from_IMediaSeeking(iface);
+ LONGLONG time;
+ HRESULT hr;
+
+ TRACE("(%p/%p)->(%p)\n", This, iface, pStop);
+
+ if (!pStop)
+ return E_POINTER;
+
+ hr = MediaSeeking_GetPositions(iface, &time, pStop);
+
+ return hr;
+}
+
static HRESULT WINAPI MediaSeeking_GetAvailable(IMediaSeeking *iface, LONGLONG *pEarliest,
LONGLONG *pLatest)
{
--
1.7.9.5

View File

@@ -1,44 +0,0 @@
From 3c9438db949d434b8cb5fba36ee55df384624016 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Tue, 22 Jul 2014 08:34:09 -0600
Subject: quartz: Remove unused cache of MediaSeeking stop position.
---
dlls/quartz/filtergraph.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 0d06ba4..df6b4bd 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -201,7 +201,6 @@ typedef struct _IFilterGraphImpl {
GUID timeformatseek;
REFERENCE_TIME start_time;
REFERENCE_TIME pause_time;
- LONGLONG stop_position;
LONG recursioncount;
IUnknown *pSite;
LONG version;
@@ -2471,11 +2470,6 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *
(dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning)
FIXME("Adjust method %x not handled yet!\n", dwCurrentFlags & 0x7);
- if ((dwStopFlags & 0x7) == AM_SEEKING_AbsolutePositioning)
- This->stop_position = *pStop;
- else if ((dwStopFlags & 0x7) != AM_SEEKING_NoPositioning)
- FIXME("Stop position not handled yet!\n");
-
if (state == State_Running && !(dwCurrentFlags & AM_SEEKING_NoFlush))
IMediaControl_Pause(&This->IMediaControl_iface);
args.current = pCurrent;
@@ -5669,7 +5663,6 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
fimpl->nItfCacheEntries = 0;
memcpy(&fimpl->timeformatseek, &TIME_FORMAT_MEDIA_TIME, sizeof(GUID));
fimpl->start_time = fimpl->pause_time = 0;
- fimpl->stop_position = -1;
fimpl->punkFilterMapper2 = NULL;
fimpl->recursioncount = 0;
fimpl->version = 0;
--
1.7.9.5