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
0a6f11c8
Commit
0a6f11c8
authored
Sep 25, 2003
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- A few cosmetic fixes.
- Various bug fixes. - Add some OutputPin helpers. - Add a new type of pin, PullPin.
parent
59bec503
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
7 deletions
+56
-7
filesource.c
dlls/quartz/filesource.c
+1
-4
pin.c
dlls/quartz/pin.c
+0
-0
pin.h
dlls/quartz/pin.h
+50
-3
quartz_private.h
dlls/quartz/quartz_private.h
+5
-0
No files found.
dlls/quartz/filesource.c
View file @
0a6f11c8
...
...
@@ -34,9 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
static
const
WCHAR
wszOutputPinName
[]
=
{
'O'
,
'u'
,
't'
,
'p'
,
'u'
,
't'
,
0
};
/* see IAsyncReader::Request on MSDN for the explanation of this */
#define BYTES_FROM_MEDIATIME(time) ((time) / 10000000)
typedef
struct
AsyncReader
{
const
struct
IBaseFilterVtbl
*
lpVtbl
;
...
...
@@ -877,7 +874,7 @@ static HRESULT FileAsyncReader_Construct(HANDLE hFile, IBaseFilter * pBaseFilter
piOutput
.
pFilter
=
pBaseFilter
;
strcpyW
(
piOutput
.
achName
,
wszOutputPinName
);
if
(
SUCCEEDED
(
OutputPin_Init
(
&
piOutput
,
pBaseFilter
,
AcceptProcAFR
,
pCritSec
,
&
pPinImpl
->
pin
)))
if
(
SUCCEEDED
(
OutputPin_Init
(
&
piOutput
,
NULL
,
pBaseFilter
,
AcceptProcAFR
,
pCritSec
,
&
pPinImpl
->
pin
)))
{
pPinImpl
->
pin
.
pin
.
lpVtbl
=
&
FileAsyncReaderPin_Vtbl
;
pPinImpl
->
lpVtblAR
=
&
FileAsyncReader_Vtbl
;
...
...
dlls/quartz/pin.c
View file @
0a6f11c8
This diff is collapsed.
Click to expand it.
dlls/quartz/pin.h
View file @
0a6f11c8
...
...
@@ -29,6 +29,12 @@ typedef HRESULT (* SAMPLEPROC)(LPVOID userdata, IMediaSample * pSample);
*/
typedef
HRESULT
(
*
QUERYACCEPTPROC
)(
LPVOID
userdata
,
const
AM_MEDIA_TYPE
*
pmt
);
/* This function is called prior to finalizing a connection with
* another pin and can be used to get things from the other pin
* like IMemInput interfaces.
*/
typedef
HRESULT
(
*
PRECONNECTPROC
)(
IPin
*
iface
,
IPin
*
pConnectPin
);
typedef
struct
IPinImpl
{
const
struct
IPinVtbl
*
lpVtbl
;
...
...
@@ -38,7 +44,7 @@ typedef struct IPinImpl
IPin
*
pConnectedTo
;
AM_MEDIA_TYPE
mtCurrent
;
ENUMMEDIADETAILS
enumMediaDetails
;
QUERYACCEPTPROC
p
QueryAccept
;
QUERYACCEPTPROC
fn
QueryAccept
;
LPVOID
pUserData
;
}
IPinImpl
;
...
...
@@ -49,7 +55,7 @@ typedef struct InputPin
const
IMemInputPinVtbl
*
lpVtblMemInput
;
IMemAllocator
*
pAllocator
;
SAMPLEPROC
p
SampleProc
;
SAMPLEPROC
fn
SampleProc
;
REFERENCE_TIME
tStart
;
REFERENCE_TIME
tStop
;
double
dRate
;
...
...
@@ -62,14 +68,33 @@ typedef struct OutputPin
IMemInputPin
*
pMemInputPin
;
HRESULT
(
*
pConnectSpecific
)(
IPin
*
iface
,
IPin
*
pReceiver
,
const
AM_MEDIA_TYPE
*
pmt
);
ALLOCATOR_PROPERTIES
allocProps
;
}
OutputPin
;
typedef
struct
PullPin
{
/* inheritance C style! */
IPinImpl
pin
;
IAsyncReader
*
pReader
;
IMemAllocator
*
pAlloc
;
SAMPLEPROC
fnSampleProc
;
PRECONNECTPROC
fnPreConnect
;
HANDLE
hThread
;
HANDLE
hEventStateChanged
;
REFERENCE_TIME
rtStart
;
REFERENCE_TIME
rtStop
;
}
PullPin
;
/*** Initializers ***/
HRESULT
InputPin_Init
(
const
PIN_INFO
*
pPinInfo
,
SAMPLEPROC
pSampleProc
,
LPVOID
pUserData
,
QUERYACCEPTPROC
pQueryAccept
,
LPCRITICAL_SECTION
pCritSec
,
InputPin
*
pPinImpl
);
HRESULT
OutputPin_Init
(
const
PIN_INFO
*
pPinInfo
,
LPVOID
pUserData
,
QUERYACCEPTPROC
pQueryAccept
,
LPCRITICAL_SECTION
pCritSec
,
OutputPin
*
pPinImpl
);
HRESULT
OutputPin_Init
(
const
PIN_INFO
*
pPinInfo
,
ALLOCATOR_PROPERTIES
*
props
,
LPVOID
pUserData
,
QUERYACCEPTPROC
pQueryAccept
,
LPCRITICAL_SECTION
pCritSec
,
OutputPin
*
pPinImpl
);
HRESULT
PullPin_Init
(
const
PIN_INFO
*
pPinInfo
,
SAMPLEPROC
pSampleProc
,
LPVOID
pUserData
,
QUERYACCEPTPROC
pQueryAccept
,
LPCRITICAL_SECTION
pCritSec
,
PullPin
*
pPinImpl
);
/*** Constructors ***/
HRESULT
InputPin_Construct
(
const
PIN_INFO
*
pPinInfo
,
SAMPLEPROC
pSampleProc
,
LPVOID
pUserData
,
QUERYACCEPTPROC
pQueryAccept
,
LPCRITICAL_SECTION
pCritSec
,
IPin
**
ppPin
);
HRESULT
OutputPin_Construct
(
const
PIN_INFO
*
pPinInfo
,
ALLOCATOR_PROPERTIES
*
props
,
LPVOID
pUserData
,
QUERYACCEPTPROC
pQueryAccept
,
LPCRITICAL_SECTION
pCritSec
,
IPin
**
ppPin
);
HRESULT
PullPin_Construct
(
const
PIN_INFO
*
pPinInfo
,
SAMPLEPROC
pSampleProc
,
LPVOID
pUserData
,
QUERYACCEPTPROC
pQueryAccept
,
LPCRITICAL_SECTION
pCritSec
,
IPin
**
ppPin
);
/**************************/
/*** Pin Implementation ***/
...
...
@@ -100,12 +125,19 @@ HRESULT WINAPI InputPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENC
HRESULT
WINAPI
OutputPin_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
);
ULONG
WINAPI
OutputPin_Release
(
IPin
*
iface
);
HRESULT
WINAPI
OutputPin_Connect
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
);
HRESULT
WINAPI
OutputPin_Disconnect
(
IPin
*
iface
);
HRESULT
WINAPI
OutputPin_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
);
HRESULT
WINAPI
OutputPin_EndOfStream
(
IPin
*
iface
);
HRESULT
WINAPI
OutputPin_BeginFlush
(
IPin
*
iface
);
HRESULT
WINAPI
OutputPin_EndFlush
(
IPin
*
iface
);
HRESULT
WINAPI
OutputPin_NewSegment
(
IPin
*
iface
,
REFERENCE_TIME
tStart
,
REFERENCE_TIME
tStop
,
double
dRate
);
HRESULT
OutputPin_CommitAllocator
(
OutputPin
*
This
);
HRESULT
OutputPin_GetDeliveryBuffer
(
OutputPin
*
This
,
IMediaSample
**
ppSample
,
const
REFERENCE_TIME
*
tStart
,
const
REFERENCE_TIME
*
tStop
,
DWORD
dwFlags
);
HRESULT
OutputPin_SendSample
(
OutputPin
*
This
,
IMediaSample
*
pSample
);
HRESULT
OutputPin_DeliverDisconnect
(
OutputPin
*
This
);
HRESULT
OutputPin_DeliverNewSegment
(
OutputPin
*
This
,
REFERENCE_TIME
tStart
,
REFERENCE_TIME
tStop
,
double
dRate
);
/**********************************/
/*** MemInputPin Implementation ***/
...
...
@@ -118,3 +150,18 @@ HRESULT WINAPI MemInputPin_GetAllocatorRequirements(IMemInputPin * iface, ALLOCA
HRESULT
WINAPI
MemInputPin_Receive
(
IMemInputPin
*
iface
,
IMediaSample
*
pSample
);
HRESULT
WINAPI
MemInputPin_ReceiveMultiple
(
IMemInputPin
*
iface
,
IMediaSample
**
pSamples
,
long
nSamples
,
long
*
nSamplesProcessed
);
HRESULT
WINAPI
MemInputPin_ReceiveCanBlock
(
IMemInputPin
*
iface
);
/* Pull Pin */
HRESULT
WINAPI
PullPin_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
);
HRESULT
WINAPI
PullPin_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
);
ULONG
WINAPI
PullPin_Release
(
IPin
*
iface
);
HRESULT
PullPin_InitProcessing
(
PullPin
*
This
);
HRESULT
PullPin_StartProcessing
(
PullPin
*
This
);
HRESULT
PullPin_StopProcessing
(
PullPin
*
This
);
HRESULT
PullPin_PauseProcessing
(
PullPin
*
This
);
HRESULT
PullPin_Seek
(
PullPin
*
This
,
REFERENCE_TIME
rtStart
,
REFERENCE_TIME
rtStop
);
HRESULT
WINAPI
PullPin_EndOfStream
(
IPin
*
iface
);
HRESULT
WINAPI
PullPin_BeginFlush
(
IPin
*
iface
);
HRESULT
WINAPI
PullPin_EndFlush
(
IPin
*
iface
);
HRESULT
WINAPI
PullPin_NewSegment
(
IPin
*
iface
,
REFERENCE_TIME
tStart
,
REFERENCE_TIME
tStop
,
double
dRate
);
HRESULT
PullPin_WaitForStateChange
(
PullPin
*
This
,
DWORD
dwMilliseconds
);
dlls/quartz/quartz_private.h
View file @
0a6f11c8
...
...
@@ -32,6 +32,11 @@
#include "winuser.h"
#include "dshow.h"
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
#define SEC_FROM_MEDIATIME(time) ((time) / 10000000)
#define BYTES_FROM_MEDIATIME(time) SEC_FROM_MEDIATIME(time)
#define MSEC_FROM_MEDIATIME(time) ((time) / 10000)
HRESULT
FILTERGRAPH_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
;
HRESULT
FilterMapper2_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
HRESULT
AsyncReader_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
);
...
...
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