Commit 911ba841 authored by James Almer's avatar James Almer

avdevice/dshow: Add namespace prefix to the remaining global symbols

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 56709ca8
...@@ -87,13 +87,13 @@ dshow_read_close(AVFormatContext *s) ...@@ -87,13 +87,13 @@ dshow_read_close(AVFormatContext *s)
} }
if (ctx->capture_pin[VideoDevice]) if (ctx->capture_pin[VideoDevice])
libAVPin_Release(ctx->capture_pin[VideoDevice]); ff_dshow_pin_Release(ctx->capture_pin[VideoDevice]);
if (ctx->capture_pin[AudioDevice]) if (ctx->capture_pin[AudioDevice])
libAVPin_Release(ctx->capture_pin[AudioDevice]); ff_dshow_pin_Release(ctx->capture_pin[AudioDevice]);
if (ctx->capture_filter[VideoDevice]) if (ctx->capture_filter[VideoDevice])
libAVFilter_Release(ctx->capture_filter[VideoDevice]); ff_dshow_filter_Release(ctx->capture_filter[VideoDevice]);
if (ctx->capture_filter[AudioDevice]) if (ctx->capture_filter[AudioDevice])
libAVFilter_Release(ctx->capture_filter[AudioDevice]); ff_dshow_filter_Release(ctx->capture_filter[AudioDevice]);
if (ctx->device_pin[VideoDevice]) if (ctx->device_pin[VideoDevice])
IPin_Release(ctx->device_pin[VideoDevice]); IPin_Release(ctx->device_pin[VideoDevice]);
...@@ -731,8 +731,8 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum, ...@@ -731,8 +731,8 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum,
char *device_filter_unique_name = NULL; char *device_filter_unique_name = NULL;
IGraphBuilder *graph = ctx->graph; IGraphBuilder *graph = ctx->graph;
IPin *device_pin = NULL; IPin *device_pin = NULL;
libAVPin *capture_pin = NULL; DShowPin *capture_pin = NULL;
libAVFilter *capture_filter = NULL; DShowFilter *capture_filter = NULL;
ICaptureGraphBuilder2 *graph_builder2 = NULL; ICaptureGraphBuilder2 *graph_builder2 = NULL;
int ret = AVERROR(EIO); int ret = AVERROR(EIO);
int r; int r;
...@@ -807,7 +807,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum, ...@@ -807,7 +807,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum,
ctx->device_pin[devtype] = device_pin; ctx->device_pin[devtype] = device_pin;
capture_filter = libAVFilter_Create(avctx, callback, devtype); capture_filter = ff_dshow_filter_Create(avctx, callback, devtype);
if (!capture_filter) { if (!capture_filter) {
av_log(avctx, AV_LOG_ERROR, "Could not create grabber filter.\n"); av_log(avctx, AV_LOG_ERROR, "Could not create grabber filter.\n");
goto error; goto error;
...@@ -863,7 +863,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum, ...@@ -863,7 +863,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum,
goto error; goto error;
} }
libAVPin_AddRef(capture_filter->pin); ff_dshow_pin_AddRef(capture_filter->pin);
capture_pin = capture_filter->pin; capture_pin = capture_filter->pin;
ctx->capture_pin[devtype] = capture_pin; ctx->capture_pin[devtype] = capture_pin;
...@@ -953,7 +953,7 @@ dshow_add_device(AVFormatContext *avctx, ...@@ -953,7 +953,7 @@ dshow_add_device(AVFormatContext *avctx,
ctx->capture_filter[devtype]->stream_index = st->index; ctx->capture_filter[devtype]->stream_index = st->index;
libAVPin_ConnectionMediaType(ctx->capture_pin[devtype], &type); ff_dshow_pin_ConnectionMediaType(ctx->capture_pin[devtype], &type);
par = st->codecpar; par = st->codecpar;
if (devtype == VideoDevice) { if (devtype == VideoDevice) {
......
This diff is collapsed.
...@@ -21,17 +21,16 @@ ...@@ -21,17 +21,16 @@
#include "dshow_capture.h" #include "dshow_capture.h"
DECLARE_QUERYINTERFACE(libAVEnumMediaTypes, DECLARE_QUERYINTERFACE(enummediatypes, DShowEnumMediaTypes,
{ {&IID_IUnknown,0}, {&IID_IEnumMediaTypes,0} }) { {&IID_IUnknown,0}, {&IID_IEnumMediaTypes,0} })
DECLARE_ADDREF(libAVEnumMediaTypes) DECLARE_ADDREF(enummediatypes, DShowEnumMediaTypes)
DECLARE_RELEASE(libAVEnumMediaTypes) DECLARE_RELEASE(enummediatypes, DShowEnumMediaTypes)
long WINAPI long ff_dshow_enummediatypes_Next(DShowEnumMediaTypes *this, unsigned long n,
libAVEnumMediaTypes_Next(libAVEnumMediaTypes *this, unsigned long n,
AM_MEDIA_TYPE **types, unsigned long *fetched) AM_MEDIA_TYPE **types, unsigned long *fetched)
{ {
int count = 0; int count = 0;
dshowdebug("libAVEnumMediaTypes_Next(%p)\n", this); dshowdebug("ff_dshow_enummediatypes_Next(%p)\n", this);
if (!types) if (!types)
return E_POINTER; return E_POINTER;
if (!this->pos && n == 1) { if (!this->pos && n == 1) {
...@@ -51,29 +50,26 @@ libAVEnumMediaTypes_Next(libAVEnumMediaTypes *this, unsigned long n, ...@@ -51,29 +50,26 @@ libAVEnumMediaTypes_Next(libAVEnumMediaTypes *this, unsigned long n,
return S_FALSE; return S_FALSE;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_enummediatypes_Skip(DShowEnumMediaTypes *this, unsigned long n)
libAVEnumMediaTypes_Skip(libAVEnumMediaTypes *this, unsigned long n)
{ {
dshowdebug("libAVEnumMediaTypes_Skip(%p)\n", this); dshowdebug("ff_dshow_enummediatypes_Skip(%p)\n", this);
if (n) /* Any skip will always fall outside of the only valid type. */ if (n) /* Any skip will always fall outside of the only valid type. */
return S_FALSE; return S_FALSE;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_enummediatypes_Reset(DShowEnumMediaTypes *this)
libAVEnumMediaTypes_Reset(libAVEnumMediaTypes *this)
{ {
dshowdebug("libAVEnumMediaTypes_Reset(%p)\n", this); dshowdebug("ff_dshow_enummediatypes_Reset(%p)\n", this);
this->pos = 0; this->pos = 0;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_enummediatypes_Clone(DShowEnumMediaTypes *this, DShowEnumMediaTypes **enums)
libAVEnumMediaTypes_Clone(libAVEnumMediaTypes *this, libAVEnumMediaTypes **enums)
{ {
libAVEnumMediaTypes *new; DShowEnumMediaTypes *new;
dshowdebug("libAVEnumMediaTypes_Clone(%p)\n", this); dshowdebug("ff_dshow_enummediatypes_Clone(%p)\n", this);
if (!enums) if (!enums)
return E_POINTER; return E_POINTER;
new = libAVEnumMediaTypes_Create(&this->type); new = ff_dshow_enummediatypes_Create(&this->type);
if (!new) if (!new)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
new->pos = this->pos; new->pos = this->pos;
...@@ -81,17 +77,16 @@ libAVEnumMediaTypes_Clone(libAVEnumMediaTypes *this, libAVEnumMediaTypes **enums ...@@ -81,17 +77,16 @@ libAVEnumMediaTypes_Clone(libAVEnumMediaTypes *this, libAVEnumMediaTypes **enums
return S_OK; return S_OK;
} }
static int static int ff_dshow_enummediatypes_Setup(DShowEnumMediaTypes *this, const AM_MEDIA_TYPE *type)
libAVEnumMediaTypes_Setup(libAVEnumMediaTypes *this, const AM_MEDIA_TYPE *type)
{ {
IEnumMediaTypesVtbl *vtbl = this->vtbl; IEnumMediaTypesVtbl *vtbl = this->vtbl;
SETVTBL(vtbl, libAVEnumMediaTypes, QueryInterface); SETVTBL(vtbl, enummediatypes, QueryInterface);
SETVTBL(vtbl, libAVEnumMediaTypes, AddRef); SETVTBL(vtbl, enummediatypes, AddRef);
SETVTBL(vtbl, libAVEnumMediaTypes, Release); SETVTBL(vtbl, enummediatypes, Release);
SETVTBL(vtbl, libAVEnumMediaTypes, Next); SETVTBL(vtbl, enummediatypes, Next);
SETVTBL(vtbl, libAVEnumMediaTypes, Skip); SETVTBL(vtbl, enummediatypes, Skip);
SETVTBL(vtbl, libAVEnumMediaTypes, Reset); SETVTBL(vtbl, enummediatypes, Reset);
SETVTBL(vtbl, libAVEnumMediaTypes, Clone); SETVTBL(vtbl, enummediatypes, Clone);
if (!type) { if (!type) {
this->type.majortype = GUID_NULL; this->type.majortype = GUID_NULL;
...@@ -101,5 +96,5 @@ libAVEnumMediaTypes_Setup(libAVEnumMediaTypes *this, const AM_MEDIA_TYPE *type) ...@@ -101,5 +96,5 @@ libAVEnumMediaTypes_Setup(libAVEnumMediaTypes *this, const AM_MEDIA_TYPE *type)
return 1; return 1;
} }
DECLARE_CREATE(libAVEnumMediaTypes, libAVEnumMediaTypes_Setup(this, type), const AM_MEDIA_TYPE *type) DECLARE_CREATE(enummediatypes, DShowEnumMediaTypes, ff_dshow_enummediatypes_Setup(this, type), const AM_MEDIA_TYPE *type)
DECLARE_DESTROY(libAVEnumMediaTypes, nothing) DECLARE_DESTROY(enummediatypes, DShowEnumMediaTypes, nothing)
...@@ -21,21 +21,20 @@ ...@@ -21,21 +21,20 @@
#include "dshow_capture.h" #include "dshow_capture.h"
DECLARE_QUERYINTERFACE(libAVEnumPins, DECLARE_QUERYINTERFACE(enumpins, DShowEnumPins,
{ {&IID_IUnknown,0}, {&IID_IEnumPins,0} }) { {&IID_IUnknown,0}, {&IID_IEnumPins,0} })
DECLARE_ADDREF(libAVEnumPins) DECLARE_ADDREF(enumpins, DShowEnumPins)
DECLARE_RELEASE(libAVEnumPins) DECLARE_RELEASE(enumpins, DShowEnumPins)
long WINAPI long ff_dshow_enumpins_Next(DShowEnumPins *this, unsigned long n, IPin **pins,
libAVEnumPins_Next(libAVEnumPins *this, unsigned long n, IPin **pins,
unsigned long *fetched) unsigned long *fetched)
{ {
int count = 0; int count = 0;
dshowdebug("libAVEnumPins_Next(%p)\n", this); dshowdebug("ff_dshow_enumpins_Next(%p)\n", this);
if (!pins) if (!pins)
return E_POINTER; return E_POINTER;
if (!this->pos && n == 1) { if (!this->pos && n == 1) {
libAVPin_AddRef(this->pin); ff_dshow_pin_AddRef(this->pin);
*pins = (IPin *) this->pin; *pins = (IPin *) this->pin;
count = 1; count = 1;
this->pos = 1; this->pos = 1;
...@@ -46,29 +45,26 @@ libAVEnumPins_Next(libAVEnumPins *this, unsigned long n, IPin **pins, ...@@ -46,29 +45,26 @@ libAVEnumPins_Next(libAVEnumPins *this, unsigned long n, IPin **pins,
return S_FALSE; return S_FALSE;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_enumpins_Skip(DShowEnumPins *this, unsigned long n)
libAVEnumPins_Skip(libAVEnumPins *this, unsigned long n)
{ {
dshowdebug("libAVEnumPins_Skip(%p)\n", this); dshowdebug("ff_dshow_enumpins_Skip(%p)\n", this);
if (n) /* Any skip will always fall outside of the only valid pin. */ if (n) /* Any skip will always fall outside of the only valid pin. */
return S_FALSE; return S_FALSE;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_enumpins_Reset(DShowEnumPins *this)
libAVEnumPins_Reset(libAVEnumPins *this)
{ {
dshowdebug("libAVEnumPins_Reset(%p)\n", this); dshowdebug("ff_dshow_enumpins_Reset(%p)\n", this);
this->pos = 0; this->pos = 0;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_enumpins_Clone(DShowEnumPins *this, DShowEnumPins **pins)
libAVEnumPins_Clone(libAVEnumPins *this, libAVEnumPins **pins)
{ {
libAVEnumPins *new; DShowEnumPins *new;
dshowdebug("libAVEnumPins_Clone(%p)\n", this); dshowdebug("ff_dshow_enumpins_Clone(%p)\n", this);
if (!pins) if (!pins)
return E_POINTER; return E_POINTER;
new = libAVEnumPins_Create(this->pin, this->filter); new = ff_dshow_enumpins_Create(this->pin, this->filter);
if (!new) if (!new)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
new->pos = this->pos; new->pos = this->pos;
...@@ -76,30 +72,28 @@ libAVEnumPins_Clone(libAVEnumPins *this, libAVEnumPins **pins) ...@@ -76,30 +72,28 @@ libAVEnumPins_Clone(libAVEnumPins *this, libAVEnumPins **pins)
return S_OK; return S_OK;
} }
static int static int ff_dshow_enumpins_Setup(DShowEnumPins *this, DShowPin *pin, DShowFilter *filter)
libAVEnumPins_Setup(libAVEnumPins *this, libAVPin *pin, libAVFilter *filter)
{ {
IEnumPinsVtbl *vtbl = this->vtbl; IEnumPinsVtbl *vtbl = this->vtbl;
SETVTBL(vtbl, libAVEnumPins, QueryInterface); SETVTBL(vtbl, enumpins, QueryInterface);
SETVTBL(vtbl, libAVEnumPins, AddRef); SETVTBL(vtbl, enumpins, AddRef);
SETVTBL(vtbl, libAVEnumPins, Release); SETVTBL(vtbl, enumpins, Release);
SETVTBL(vtbl, libAVEnumPins, Next); SETVTBL(vtbl, enumpins, Next);
SETVTBL(vtbl, libAVEnumPins, Skip); SETVTBL(vtbl, enumpins, Skip);
SETVTBL(vtbl, libAVEnumPins, Reset); SETVTBL(vtbl, enumpins, Reset);
SETVTBL(vtbl, libAVEnumPins, Clone); SETVTBL(vtbl, enumpins, Clone);
this->pin = pin; this->pin = pin;
this->filter = filter; this->filter = filter;
libAVFilter_AddRef(this->filter); ff_dshow_filter_AddRef(this->filter);
return 1; return 1;
} }
static int static int ff_dshow_enumpins_Cleanup(DShowEnumPins *this)
libAVEnumPins_Cleanup(libAVEnumPins *this)
{ {
libAVFilter_Release(this->filter); ff_dshow_filter_Release(this->filter);
return 1; return 1;
} }
DECLARE_CREATE(libAVEnumPins, libAVEnumPins_Setup(this, pin, filter), DECLARE_CREATE(enumpins, DShowEnumPins, ff_dshow_enumpins_Setup(this, pin, filter),
libAVPin *pin, libAVFilter *filter) DShowPin *pin, DShowFilter *filter)
DECLARE_DESTROY(libAVEnumPins, libAVEnumPins_Cleanup) DECLARE_DESTROY(enumpins, DShowEnumPins, ff_dshow_enumpins_Cleanup)
...@@ -21,53 +21,47 @@ ...@@ -21,53 +21,47 @@
#include "dshow_capture.h" #include "dshow_capture.h"
DECLARE_QUERYINTERFACE(libAVFilter, DECLARE_QUERYINTERFACE(filter, DShowFilter,
{ {&IID_IUnknown,0}, {&IID_IBaseFilter,0} }) { {&IID_IUnknown,0}, {&IID_IBaseFilter,0} })
DECLARE_ADDREF(libAVFilter) DECLARE_ADDREF(filter, DShowFilter)
DECLARE_RELEASE(libAVFilter) DECLARE_RELEASE(filter, DShowFilter)
long WINAPI long ff_dshow_filter_GetClassID(DShowFilter *this, CLSID *id)
libAVFilter_GetClassID(libAVFilter *this, CLSID *id)
{ {
dshowdebug("libAVFilter_GetClassID(%p)\n", this); dshowdebug("ff_dshow_filter_GetClassID(%p)\n", this);
/* I'm not creating a ClassID just for this. */ /* I'm not creating a ClassID just for this. */
return E_FAIL; return E_FAIL;
} }
long WINAPI long ff_dshow_filter_Stop(DShowFilter *this)
libAVFilter_Stop(libAVFilter *this)
{ {
dshowdebug("libAVFilter_Stop(%p)\n", this); dshowdebug("ff_dshow_filter_Stop(%p)\n", this);
this->state = State_Stopped; this->state = State_Stopped;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_Pause(DShowFilter *this)
libAVFilter_Pause(libAVFilter *this)
{ {
dshowdebug("libAVFilter_Pause(%p)\n", this); dshowdebug("ff_dshow_filter_Pause(%p)\n", this);
this->state = State_Paused; this->state = State_Paused;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_Run(DShowFilter *this, REFERENCE_TIME start)
libAVFilter_Run(libAVFilter *this, REFERENCE_TIME start)
{ {
dshowdebug("libAVFilter_Run(%p) %"PRId64"\n", this, start); dshowdebug("ff_dshow_filter_Run(%p) %"PRId64"\n", this, start);
this->state = State_Running; this->state = State_Running;
this->start_time = start; this->start_time = start;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_GetState(DShowFilter *this, DWORD ms, FILTER_STATE *state)
libAVFilter_GetState(libAVFilter *this, DWORD ms, FILTER_STATE *state)
{ {
dshowdebug("libAVFilter_GetState(%p)\n", this); dshowdebug("ff_dshow_filter_GetState(%p)\n", this);
if (!state) if (!state)
return E_POINTER; return E_POINTER;
*state = this->state; *state = this->state;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_SetSyncSource(DShowFilter *this, IReferenceClock *clock)
libAVFilter_SetSyncSource(libAVFilter *this, IReferenceClock *clock)
{ {
dshowdebug("libAVFilter_SetSyncSource(%p)\n", this); dshowdebug("ff_dshow_filter_SetSyncSource(%p)\n", this);
if (this->clock != clock) { if (this->clock != clock) {
if (this->clock) if (this->clock)
...@@ -79,10 +73,9 @@ libAVFilter_SetSyncSource(libAVFilter *this, IReferenceClock *clock) ...@@ -79,10 +73,9 @@ libAVFilter_SetSyncSource(libAVFilter *this, IReferenceClock *clock)
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_GetSyncSource(DShowFilter *this, IReferenceClock **clock)
libAVFilter_GetSyncSource(libAVFilter *this, IReferenceClock **clock)
{ {
dshowdebug("libAVFilter_GetSyncSource(%p)\n", this); dshowdebug("ff_dshow_filter_GetSyncSource(%p)\n", this);
if (!clock) if (!clock)
return E_POINTER; return E_POINTER;
...@@ -92,32 +85,30 @@ libAVFilter_GetSyncSource(libAVFilter *this, IReferenceClock **clock) ...@@ -92,32 +85,30 @@ libAVFilter_GetSyncSource(libAVFilter *this, IReferenceClock **clock)
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_EnumPins(DShowFilter *this, IEnumPins **enumpin)
libAVFilter_EnumPins(libAVFilter *this, IEnumPins **enumpin)
{ {
libAVEnumPins *new; DShowEnumPins *new;
dshowdebug("libAVFilter_EnumPins(%p)\n", this); dshowdebug("ff_dshow_filter_EnumPins(%p)\n", this);
if (!enumpin) if (!enumpin)
return E_POINTER; return E_POINTER;
new = libAVEnumPins_Create(this->pin, this); new = ff_dshow_enumpins_Create(this->pin, this);
if (!new) if (!new)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
*enumpin = (IEnumPins *) new; *enumpin = (IEnumPins *) new;
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_FindPin(DShowFilter *this, const wchar_t *id, IPin **pin)
libAVFilter_FindPin(libAVFilter *this, const wchar_t *id, IPin **pin)
{ {
libAVPin *found = NULL; DShowPin *found = NULL;
dshowdebug("libAVFilter_FindPin(%p)\n", this); dshowdebug("ff_dshow_filter_FindPin(%p)\n", this);
if (!id || !pin) if (!id || !pin)
return E_POINTER; return E_POINTER;
if (!wcscmp(id, L"In")) { if (!wcscmp(id, L"In")) {
found = this->pin; found = this->pin;
libAVPin_AddRef(found); ff_dshow_pin_AddRef(found);
} }
*pin = (IPin *) found; *pin = (IPin *) found;
if (!found) if (!found)
...@@ -125,10 +116,9 @@ libAVFilter_FindPin(libAVFilter *this, const wchar_t *id, IPin **pin) ...@@ -125,10 +116,9 @@ libAVFilter_FindPin(libAVFilter *this, const wchar_t *id, IPin **pin)
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_QueryFilterInfo(DShowFilter *this, FILTER_INFO *info)
libAVFilter_QueryFilterInfo(libAVFilter *this, FILTER_INFO *info)
{ {
dshowdebug("libAVFilter_QueryFilterInfo(%p)\n", this); dshowdebug("ff_dshow_filter_QueryFilterInfo(%p)\n", this);
if (!info) if (!info)
return E_POINTER; return E_POINTER;
...@@ -138,11 +128,10 @@ libAVFilter_QueryFilterInfo(libAVFilter *this, FILTER_INFO *info) ...@@ -138,11 +128,10 @@ libAVFilter_QueryFilterInfo(libAVFilter *this, FILTER_INFO *info)
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_JoinFilterGraph(DShowFilter *this, IFilterGraph *graph,
libAVFilter_JoinFilterGraph(libAVFilter *this, IFilterGraph *graph,
const wchar_t *name) const wchar_t *name)
{ {
dshowdebug("libAVFilter_JoinFilterGraph(%p)\n", this); dshowdebug("ff_dshow_filter_JoinFilterGraph(%p)\n", this);
this->info.pGraph = graph; this->info.pGraph = graph;
if (name) if (name)
...@@ -150,10 +139,9 @@ libAVFilter_JoinFilterGraph(libAVFilter *this, IFilterGraph *graph, ...@@ -150,10 +139,9 @@ libAVFilter_JoinFilterGraph(libAVFilter *this, IFilterGraph *graph,
return S_OK; return S_OK;
} }
long WINAPI long ff_dshow_filter_QueryVendorInfo(DShowFilter *this, wchar_t **info)
libAVFilter_QueryVendorInfo(libAVFilter *this, wchar_t **info)
{ {
dshowdebug("libAVFilter_QueryVendorInfo(%p)\n", this); dshowdebug("ff_dshow_filter_QueryVendorInfo(%p)\n", this);
if (!info) if (!info)
return E_POINTER; return E_POINTER;
...@@ -161,27 +149,27 @@ libAVFilter_QueryVendorInfo(libAVFilter *this, wchar_t **info) ...@@ -161,27 +149,27 @@ libAVFilter_QueryVendorInfo(libAVFilter *this, wchar_t **info)
} }
static int static int
libAVFilter_Setup(libAVFilter *this, void *priv_data, void *callback, ff_dshow_filter_Setup(DShowFilter *this, void *priv_data, void *callback,
enum dshowDeviceType type) enum dshowDeviceType type)
{ {
IBaseFilterVtbl *vtbl = this->vtbl; IBaseFilterVtbl *vtbl = this->vtbl;
SETVTBL(vtbl, libAVFilter, QueryInterface); SETVTBL(vtbl, filter, QueryInterface);
SETVTBL(vtbl, libAVFilter, AddRef); SETVTBL(vtbl, filter, AddRef);
SETVTBL(vtbl, libAVFilter, Release); SETVTBL(vtbl, filter, Release);
SETVTBL(vtbl, libAVFilter, GetClassID); SETVTBL(vtbl, filter, GetClassID);
SETVTBL(vtbl, libAVFilter, Stop); SETVTBL(vtbl, filter, Stop);
SETVTBL(vtbl, libAVFilter, Pause); SETVTBL(vtbl, filter, Pause);
SETVTBL(vtbl, libAVFilter, Run); SETVTBL(vtbl, filter, Run);
SETVTBL(vtbl, libAVFilter, GetState); SETVTBL(vtbl, filter, GetState);
SETVTBL(vtbl, libAVFilter, SetSyncSource); SETVTBL(vtbl, filter, SetSyncSource);
SETVTBL(vtbl, libAVFilter, GetSyncSource); SETVTBL(vtbl, filter, GetSyncSource);
SETVTBL(vtbl, libAVFilter, EnumPins); SETVTBL(vtbl, filter, EnumPins);
SETVTBL(vtbl, libAVFilter, FindPin); SETVTBL(vtbl, filter, FindPin);
SETVTBL(vtbl, libAVFilter, QueryFilterInfo); SETVTBL(vtbl, filter, QueryFilterInfo);
SETVTBL(vtbl, libAVFilter, JoinFilterGraph); SETVTBL(vtbl, filter, JoinFilterGraph);
SETVTBL(vtbl, libAVFilter, QueryVendorInfo); SETVTBL(vtbl, filter, QueryVendorInfo);
this->pin = libAVPin_Create(this); this->pin = ff_dshow_pin_Create(this);
this->priv_data = priv_data; this->priv_data = priv_data;
this->callback = callback; this->callback = callback;
...@@ -189,12 +177,11 @@ libAVFilter_Setup(libAVFilter *this, void *priv_data, void *callback, ...@@ -189,12 +177,11 @@ libAVFilter_Setup(libAVFilter *this, void *priv_data, void *callback,
return 1; return 1;
} }
static int static int ff_dshow_filter_Cleanup(DShowFilter *this)
libAVFilter_Cleanup(libAVFilter *this)
{ {
libAVPin_Release(this->pin); ff_dshow_pin_Release(this->pin);
return 1; return 1;
} }
DECLARE_CREATE(libAVFilter, libAVFilter_Setup(this, priv_data, callback, type), DECLARE_CREATE(filter, DShowFilter, ff_dshow_filter_Setup(this, priv_data, callback, type),
void *priv_data, void *callback, enum dshowDeviceType type) void *priv_data, void *callback, enum dshowDeviceType type)
DECLARE_DESTROY(libAVFilter, libAVFilter_Cleanup) DECLARE_DESTROY(filter, DShowFilter, ff_dshow_filter_Cleanup)
This diff is collapsed.
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