Commit d44d83b6 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Get rid of the no longer used base parser.

parent 40a4c782
......@@ -16,8 +16,6 @@ C_SRCS = \
filtermapper.c \
main.c \
memallocator.c \
parser.c \
pin.c \
regsvr.c \
systemclock.c \
videorenderer.c \
......
......@@ -19,7 +19,6 @@
*/
#include "quartz_private.h"
#include "pin.h"
#include "uuids.h"
#include "mmreg.h"
......
......@@ -19,7 +19,6 @@
*/
#include "quartz_private.h"
#include "pin.h"
#include "uuids.h"
#include "amvideo.h"
......
......@@ -19,7 +19,6 @@
*/
#include "quartz_private.h"
#include "pin.h"
#include "uuids.h"
#include "vfwmsgs.h"
......
......@@ -24,7 +24,6 @@
#include "quartz_private.h"
#include "wine/debug.h"
#include "pin.h"
#include "uuids.h"
#include "vfwmsgs.h"
#include "winbase.h"
......
/*
* Parser declarations
*
* Copyright 2005 Christian Costa
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
typedef struct ParserImpl ParserImpl;
typedef HRESULT (*PFN_PROCESS_SAMPLE) (LPVOID iface, IMediaSample * pSample, DWORD_PTR cookie);
typedef HRESULT (*PFN_QUERY_ACCEPT) (LPVOID iface, const AM_MEDIA_TYPE * pmt);
typedef HRESULT (*PFN_PRE_CONNECT) (IPin * iface, IPin * pConnectPin, ALLOCATOR_PROPERTIES *prop);
typedef HRESULT (*PFN_CLEANUP) (LPVOID iface);
typedef HRESULT (*PFN_DISCONNECT) (LPVOID iface);
typedef struct Parser_OutputPin
{
struct strmbase_source pin;
AM_MEDIA_TYPE * pmt;
LONGLONG dwSamplesProcessed;
ALLOCATOR_PROPERTIES allocProps;
IMemAllocator *alloc;
BOOL readonly;
} Parser_OutputPin;
struct ParserImpl
{
struct strmbase_filter filter;
PFN_DISCONNECT fnDisconnect;
PullPin *pInputPin;
Parser_OutputPin **sources;
ULONG cStreams;
SourceSeeking sourceSeeking;
};
extern HRESULT Parser_AddPin(ParserImpl *filter, const WCHAR *name,
ALLOCATOR_PROPERTIES *props, const AM_MEDIA_TYPE *mt);
HRESULT Parser_Create(ParserImpl *parser, const IBaseFilterVtbl *vtbl, IUnknown *outer,
const CLSID *clsid, const struct strmbase_filter_ops *func_table, const WCHAR *sink_name,
PFN_PROCESS_SAMPLE, PFN_QUERY_ACCEPT, PFN_PRE_CONNECT, PFN_CLEANUP, PFN_DISCONNECT,
REQUESTPROC, STOPPROCESSPROC, SourceSeeking_ChangeStop,
SourceSeeking_ChangeStart, SourceSeeking_ChangeRate) DECLSPEC_HIDDEN;
/* Override the _Release function and call this when releasing */
extern void Parser_Destroy(ParserImpl *This);
extern HRESULT WINAPI Parser_Stop(IBaseFilter * iface);
extern HRESULT WINAPI Parser_Pause(IBaseFilter * iface);
extern HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart);
extern HRESULT WINAPI Parser_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
extern HRESULT WINAPI Parser_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock);
IPin *parser_get_pin(struct strmbase_filter *iface, unsigned int index) DECLSPEC_HIDDEN;
/* COM helpers */
static inline Parser_OutputPin *unsafe_impl_Parser_OutputPin_from_IPin( IPin *iface )
{
return CONTAINING_RECORD(iface, Parser_OutputPin, pin.pin.IPin_iface);
}
/*
* IPin function declarations to allow inheritance
*
* Copyright 2003 Robert Shearman
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* This function will process incoming samples to the pin.
* Any return value valid in IMemInputPin::Receive is allowed here
*
* Cookie is the cookie that was set when requesting the buffer, if you don't
* implement custom requesting, you can safely ignore this
*/
typedef HRESULT (* SAMPLEPROC_PULL)(LPVOID userdata, IMediaSample * pSample, DWORD_PTR cookie);
/* This function will determine whether a type is supported or not.
* It is allowed to return any error value (within reason), as opposed
* to IPin::QueryAccept which is only allowed to return S_OK or S_FALSE.
*/
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.
*
* props contains some defaults, but you can safely override them to your liking
*/
typedef HRESULT (* PRECONNECTPROC)(IPin * iface, IPin * pConnectPin, ALLOCATOR_PROPERTIES *props);
/* This function is called whenever a cleanup operation has to occur,
* this is usually after a flush, seek, or end of stream notification.
* This code may even be repeated multiple times, so build your code to
* tolerate this behavior. Return value is ignored and should be S_OK.
*/
typedef HRESULT (* CLEANUPPROC) (LPVOID userdata);
/* This function is called whenever a request for a new sample is made,
* If you implement it (it can be NULL for default behavior), you have to
* call IMemAllocator_GetBuffer and IMemAllocator_RequestBuffer
* This is useful if you want to request more than 1 buffer at simultaneously
*
* This will also cause the Sample Proc to be called with empty buffers to indicate
* failure in retrieving the sample.
*/
typedef HRESULT (* REQUESTPROC) (LPVOID userdata);
/* This function is called after processing is done (for whatever reason that is caused)
* This is useful if you create processing threads that need to die
*/
typedef HRESULT (* STOPPROCESSPROC) (LPVOID userdata);
#define ALIGNDOWN(value,boundary) ((value)/(boundary)*(boundary))
#define ALIGNUP(value,boundary) (ALIGNDOWN((value)+(boundary)-1, (boundary)))
typedef struct PullPin
{
/* inheritance C style! */
BasePin pin;
LPVOID pUserData;
REFERENCE_TIME rtStart, rtCurrent, rtNext, rtStop;
IAsyncReader * pReader;
IMemAllocator * prefAlloc;
IMemAllocator * pAlloc;
QUERYACCEPTPROC fnQueryAccept;
SAMPLEPROC_PULL fnSampleProc;
PRECONNECTPROC fnPreConnect;
REQUESTPROC fnCustomRequest;
CLEANUPPROC fnCleanProc;
STOPPROCESSPROC fnDone;
double dRate;
BOOL stop_playback;
DWORD cbAlign;
/* Any code that touches the thread must hold the thread lock,
* lock order: thread_lock and then the filter critical section
* also signal thread_sleepy so the thread knows to wake up
*/
CRITICAL_SECTION thread_lock;
HANDLE hThread;
DWORD requested_state;
HANDLE hEventStateChanged, thread_sleepy;
DWORD state;
} PullPin;
#define Req_Sleepy 0
#define Req_Die 1
#define Req_Run 2
#define Req_Pause 3
/*** Constructors ***/
HRESULT PullPin_Construct(const IPinVtbl *PullPin_Vtbl, struct strmbase_filter *filter, const WCHAR *name,
SAMPLEPROC_PULL pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept,
CLEANUPPROC pCleanUp, REQUESTPROC pCustomRequest, STOPPROCESSPROC pDone,
IPin **ppPin);
void PullPin_destroy(PullPin *pin) DECLSPEC_HIDDEN;
/**************************/
/*** Pin Implementation ***/
/* Pull Pin */
HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
HRESULT WINAPI PullPin_Disconnect(IPin * iface);
HRESULT WINAPI PullPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv);
HRESULT WINAPI PullPin_EndOfStream(IPin * iface);
HRESULT WINAPI PullPin_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
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);
/* Thread interaction functions: Hold the thread_lock before calling them */
HRESULT PullPin_StartProcessing(PullPin * This);
HRESULT PullPin_PauseProcessing(PullPin * This);
HRESULT PullPin_WaitForStateChange(PullPin * This, DWORD dwMilliseconds);
/* COM helpers */
static inline PullPin *impl_PullPin_from_IPin( IPin *iface )
{
return CONTAINING_RECORD(iface, PullPin, pin.IPin_iface);
}
......@@ -36,18 +36,9 @@
#include "wine/strmbase.h"
#include "wine/list.h"
static inline const char *debugstr_fourcc(DWORD fourcc)
{
if (!fourcc) return "''";
return wine_dbg_sprintf("'%c%c%c%c'", (char)(fourcc), (char)(fourcc >> 8),
(char)(fourcc >> 16), (char)(fourcc >> 24));
}
/* see IAsyncReader::Request on MSDN for the explanation of this */
#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)
#define BYTES_FROM_MEDIATIME(time) ((time) / 10000000)
HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT FilterGraphNoThread_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
......@@ -71,7 +62,6 @@ HRESULT IEnumRegFiltersImpl_Construct(REGFILTER * pInRegFilters, const ULONG siz
extern const char * qzdebugstr_guid(const GUID * id) DECLSPEC_HIDDEN;
extern void video_unregister_windowclass(void) DECLSPEC_HIDDEN;
BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards);
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt) DECLSPEC_HIDDEN;
BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID *source_clsid) DECLSPEC_HIDDEN;
......
......@@ -19,7 +19,6 @@
*/
#include "quartz_private.h"
#include "pin.h"
#include "uuids.h"
#include "vfwmsgs.h"
......
......@@ -34,7 +34,6 @@
#include "dvdmedia.h"
#include "d3d9.h"
#include "vmr9.h"
#include "pin.h"
#include "wine/debug.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment