2011-05-21 15:24:50 +03:00
|
|
|
/*
|
|
|
|
* DirectShow capture interface
|
|
|
|
* Copyright (c) 2010 Ramiro Polla
|
|
|
|
*
|
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg 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.
|
|
|
|
*
|
|
|
|
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2016-01-29 04:25:13 +02:00
|
|
|
#ifndef AVDEVICE_DSHOW_CAPTURE_H
|
|
|
|
#define AVDEVICE_DSHOW_CAPTURE_H
|
2012-05-09 09:11:16 +03:00
|
|
|
|
2011-05-21 15:24:50 +03:00
|
|
|
#define DSHOWDEBUG 0
|
|
|
|
|
2011-05-26 20:11:25 +03:00
|
|
|
#include "avdevice.h"
|
2011-05-21 15:24:50 +03:00
|
|
|
|
|
|
|
#define COBJMACROS
|
2014-11-27 10:00:36 +02:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2011-05-21 15:24:50 +03:00
|
|
|
#include <windows.h>
|
2012-11-03 19:05:51 +03:00
|
|
|
#define NO_DSHOW_STRSAFE
|
2011-05-21 15:24:50 +03:00
|
|
|
#include <dshow.h>
|
|
|
|
#include <dvdmedia.h>
|
|
|
|
|
2015-05-07 01:21:42 +02:00
|
|
|
#include "libavcodec/internal.h"
|
2021-03-05 16:26:24 +02:00
|
|
|
#include "libavcodec/packet_internal.h"
|
2015-05-07 01:21:42 +02:00
|
|
|
|
2012-12-17 08:44:12 +03:00
|
|
|
/* EC_DEVICE_LOST is not defined in MinGW dshow headers. */
|
|
|
|
#ifndef EC_DEVICE_LOST
|
|
|
|
#define EC_DEVICE_LOST 0x1f
|
|
|
|
#endif
|
|
|
|
|
2011-05-21 15:24:50 +03:00
|
|
|
long ff_copy_dshow_media_type(AM_MEDIA_TYPE *dst, const AM_MEDIA_TYPE *src);
|
2011-09-09 06:12:42 +03:00
|
|
|
void ff_print_VIDEO_STREAM_CONFIG_CAPS(const VIDEO_STREAM_CONFIG_CAPS *caps);
|
|
|
|
void ff_print_AUDIO_STREAM_CONFIG_CAPS(const AUDIO_STREAM_CONFIG_CAPS *caps);
|
2011-05-21 15:24:50 +03:00
|
|
|
void ff_print_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *type);
|
|
|
|
void ff_printGUID(const GUID *g);
|
|
|
|
|
|
|
|
extern const AVClass *ff_dshow_context_class_ptr;
|
2015-05-07 01:21:42 +02:00
|
|
|
#define dshowdebug(...) ff_dlog(&ff_dshow_context_class_ptr, __VA_ARGS__)
|
2011-05-21 15:24:50 +03:00
|
|
|
|
|
|
|
static inline void nothing(void *foo)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
struct GUIDoffset {
|
|
|
|
const GUID *iid;
|
|
|
|
int offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum dshowDeviceType {
|
|
|
|
VideoDevice = 0,
|
|
|
|
AudioDevice = 1,
|
|
|
|
};
|
|
|
|
|
2015-01-23 15:54:44 +02:00
|
|
|
enum dshowSourceFilterType {
|
|
|
|
VideoSourceDevice = 0,
|
|
|
|
AudioSourceDevice = 1,
|
|
|
|
};
|
|
|
|
|
2021-01-22 00:45:48 +02:00
|
|
|
#define DECLARE_QUERYINTERFACE(prefix, class, ...) \
|
2022-01-02 11:49:38 +02:00
|
|
|
long WINAPI \
|
2021-01-22 00:45:48 +02:00
|
|
|
ff_dshow_##prefix##_QueryInterface(class *this, const GUID *riid, void **ppvObject) \
|
2011-05-21 15:24:50 +03:00
|
|
|
{ \
|
|
|
|
struct GUIDoffset ifaces[] = __VA_ARGS__; \
|
|
|
|
int i; \
|
2021-01-22 00:45:48 +02:00
|
|
|
dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_QueryInterface(%p, %p, %p)\n", this, riid, ppvObject); \
|
2011-05-21 15:24:50 +03:00
|
|
|
ff_printGUID(riid); \
|
|
|
|
if (!ppvObject) \
|
|
|
|
return E_POINTER; \
|
|
|
|
for (i = 0; i < sizeof(ifaces)/sizeof(ifaces[0]); i++) { \
|
|
|
|
if (IsEqualGUID(riid, ifaces[i].iid)) { \
|
|
|
|
void *obj = (void *) ((uint8_t *) this + ifaces[i].offset); \
|
2021-01-22 00:45:48 +02:00
|
|
|
ff_dshow_##prefix##_AddRef(this); \
|
2011-05-21 15:24:50 +03:00
|
|
|
dshowdebug("\tfound %d with offset %d\n", i, ifaces[i].offset); \
|
|
|
|
*ppvObject = (void *) obj; \
|
|
|
|
return S_OK; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
dshowdebug("\tE_NOINTERFACE\n"); \
|
|
|
|
*ppvObject = NULL; \
|
|
|
|
return E_NOINTERFACE; \
|
|
|
|
}
|
2021-01-22 00:45:48 +02:00
|
|
|
#define DECLARE_ADDREF(prefix, class) \
|
2022-01-02 11:49:38 +02:00
|
|
|
unsigned long WINAPI \
|
2021-01-22 00:45:48 +02:00
|
|
|
ff_dshow_##prefix##_AddRef(class *this) \
|
2011-05-21 15:24:50 +03:00
|
|
|
{ \
|
2021-01-22 00:45:48 +02:00
|
|
|
dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_AddRef(%p)\t%ld\n", this, this->ref+1); \
|
2011-05-21 15:24:50 +03:00
|
|
|
return InterlockedIncrement(&this->ref); \
|
|
|
|
}
|
2021-01-22 00:45:48 +02:00
|
|
|
#define DECLARE_RELEASE(prefix, class) \
|
2022-01-02 11:49:38 +02:00
|
|
|
unsigned long WINAPI \
|
2021-01-22 00:45:48 +02:00
|
|
|
ff_dshow_##prefix##_Release(class *this) \
|
2011-05-21 15:24:50 +03:00
|
|
|
{ \
|
|
|
|
long ref = InterlockedDecrement(&this->ref); \
|
2021-01-22 00:45:48 +02:00
|
|
|
dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Release(%p)\t%ld\n", this, ref); \
|
2011-05-21 15:24:50 +03:00
|
|
|
if (!ref) \
|
2021-01-22 00:45:48 +02:00
|
|
|
ff_dshow_##prefix##_Destroy(this); \
|
2011-05-21 15:24:50 +03:00
|
|
|
return ref; \
|
|
|
|
}
|
|
|
|
|
2021-01-22 00:45:48 +02:00
|
|
|
#define DECLARE_DESTROY(prefix, class, func) \
|
|
|
|
void ff_dshow_##prefix##_Destroy(class *this) \
|
2011-05-21 15:24:50 +03:00
|
|
|
{ \
|
2021-01-22 00:45:48 +02:00
|
|
|
dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Destroy(%p)\n", this); \
|
2011-05-21 15:24:50 +03:00
|
|
|
func(this); \
|
|
|
|
if (this) { \
|
|
|
|
if (this->vtbl) \
|
|
|
|
CoTaskMemFree(this->vtbl); \
|
|
|
|
CoTaskMemFree(this); \
|
|
|
|
} \
|
|
|
|
}
|
2021-01-22 00:45:48 +02:00
|
|
|
#define DECLARE_CREATE(prefix, class, setup, ...) \
|
|
|
|
class *ff_dshow_##prefix##_Create(__VA_ARGS__) \
|
2011-05-21 15:24:50 +03:00
|
|
|
{ \
|
|
|
|
class *this = CoTaskMemAlloc(sizeof(class)); \
|
|
|
|
void *vtbl = CoTaskMemAlloc(sizeof(*this->vtbl)); \
|
2021-01-22 00:45:48 +02:00
|
|
|
dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Create(%p)\n", this); \
|
2011-05-21 15:24:50 +03:00
|
|
|
if (!this || !vtbl) \
|
|
|
|
goto fail; \
|
|
|
|
ZeroMemory(this, sizeof(class)); \
|
|
|
|
ZeroMemory(vtbl, sizeof(*this->vtbl)); \
|
|
|
|
this->ref = 1; \
|
|
|
|
this->vtbl = vtbl; \
|
|
|
|
if (!setup) \
|
|
|
|
goto fail; \
|
2021-01-22 00:45:48 +02:00
|
|
|
dshowdebug("created ff_dshow_"AV_STRINGIFY(prefix)" %p\n", this); \
|
2011-05-21 15:24:50 +03:00
|
|
|
return this; \
|
|
|
|
fail: \
|
2021-01-22 00:45:48 +02:00
|
|
|
ff_dshow_##prefix##_Destroy(this); \
|
|
|
|
dshowdebug("could not create ff_dshow_"AV_STRINGIFY(prefix)"\n"); \
|
2011-05-21 15:24:50 +03:00
|
|
|
return NULL; \
|
|
|
|
}
|
|
|
|
|
2021-01-22 00:45:48 +02:00
|
|
|
#define SETVTBL(vtbl, prefix, fn) \
|
|
|
|
do { (vtbl)->fn = (void *) ff_dshow_##prefix##_##fn; } while(0)
|
2011-05-21 15:24:50 +03:00
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* Forward Declarations
|
|
|
|
****************************************************************************/
|
2021-01-22 00:45:48 +02:00
|
|
|
typedef struct DShowPin DShowPin;
|
|
|
|
typedef struct DShowMemInputPin DShowMemInputPin;
|
|
|
|
typedef struct DShowEnumPins DShowEnumPins;
|
|
|
|
typedef struct DShowEnumMediaTypes DShowEnumMediaTypes;
|
|
|
|
typedef struct DShowFilter DShowFilter;
|
2011-05-21 15:24:50 +03:00
|
|
|
|
|
|
|
/*****************************************************************************
|
2021-01-22 00:45:48 +02:00
|
|
|
* DShowPin
|
2011-05-21 15:24:50 +03:00
|
|
|
****************************************************************************/
|
2021-01-22 00:45:48 +02:00
|
|
|
struct DShowPin {
|
2011-05-21 15:24:50 +03:00
|
|
|
IPinVtbl *vtbl;
|
|
|
|
long ref;
|
2021-01-22 00:45:48 +02:00
|
|
|
DShowFilter *filter;
|
2011-05-21 15:24:50 +03:00
|
|
|
IPin *connectedto;
|
|
|
|
AM_MEDIA_TYPE type;
|
|
|
|
IMemInputPinVtbl *imemvtbl;
|
|
|
|
};
|
|
|
|
|
2022-01-02 11:49:38 +02:00
|
|
|
long WINAPI ff_dshow_pin_QueryInterface (DShowPin *, const GUID *, void **);
|
|
|
|
unsigned long WINAPI ff_dshow_pin_AddRef (DShowPin *);
|
|
|
|
unsigned long WINAPI ff_dshow_pin_Release (DShowPin *);
|
|
|
|
long WINAPI ff_dshow_pin_Connect (DShowPin *, IPin *, const AM_MEDIA_TYPE *);
|
|
|
|
long WINAPI ff_dshow_pin_ReceiveConnection (DShowPin *, IPin *, const AM_MEDIA_TYPE *);
|
|
|
|
long WINAPI ff_dshow_pin_Disconnect (DShowPin *);
|
|
|
|
long WINAPI ff_dshow_pin_ConnectedTo (DShowPin *, IPin **);
|
|
|
|
long WINAPI ff_dshow_pin_ConnectionMediaType (DShowPin *, AM_MEDIA_TYPE *);
|
|
|
|
long WINAPI ff_dshow_pin_QueryPinInfo (DShowPin *, PIN_INFO *);
|
|
|
|
long WINAPI ff_dshow_pin_QueryDirection (DShowPin *, PIN_DIRECTION *);
|
|
|
|
long WINAPI ff_dshow_pin_QueryId (DShowPin *, wchar_t **);
|
|
|
|
long WINAPI ff_dshow_pin_QueryAccept (DShowPin *, const AM_MEDIA_TYPE *);
|
|
|
|
long WINAPI ff_dshow_pin_EnumMediaTypes (DShowPin *, IEnumMediaTypes **);
|
|
|
|
long WINAPI ff_dshow_pin_QueryInternalConnections(DShowPin *, IPin **, unsigned long *);
|
|
|
|
long WINAPI ff_dshow_pin_EndOfStream (DShowPin *);
|
|
|
|
long WINAPI ff_dshow_pin_BeginFlush (DShowPin *);
|
|
|
|
long WINAPI ff_dshow_pin_EndFlush (DShowPin *);
|
|
|
|
long WINAPI ff_dshow_pin_NewSegment (DShowPin *, REFERENCE_TIME, REFERENCE_TIME, double);
|
2021-01-22 00:45:48 +02:00
|
|
|
|
2022-01-02 11:49:38 +02:00
|
|
|
long WINAPI ff_dshow_meminputpin_QueryInterface (DShowMemInputPin *, const GUID *, void **);
|
|
|
|
unsigned long WINAPI ff_dshow_meminputpin_AddRef (DShowMemInputPin *);
|
|
|
|
unsigned long WINAPI ff_dshow_meminputpin_Release (DShowMemInputPin *);
|
|
|
|
long WINAPI ff_dshow_meminputpin_GetAllocator (DShowMemInputPin *, IMemAllocator **);
|
|
|
|
long WINAPI ff_dshow_meminputpin_NotifyAllocator (DShowMemInputPin *, IMemAllocator *, BOOL);
|
|
|
|
long WINAPI ff_dshow_meminputpin_GetAllocatorRequirements(DShowMemInputPin *, ALLOCATOR_PROPERTIES *);
|
|
|
|
long WINAPI ff_dshow_meminputpin_Receive (DShowMemInputPin *, IMediaSample *);
|
|
|
|
long WINAPI ff_dshow_meminputpin_ReceiveMultiple (DShowMemInputPin *, IMediaSample **, long, long *);
|
|
|
|
long WINAPI ff_dshow_meminputpin_ReceiveCanBlock (DShowMemInputPin *);
|
2021-01-22 00:45:48 +02:00
|
|
|
|
|
|
|
void ff_dshow_pin_Destroy(DShowPin *);
|
|
|
|
DShowPin *ff_dshow_pin_Create (DShowFilter *filter);
|
|
|
|
|
|
|
|
void ff_dshow_meminputpin_Destroy(DShowMemInputPin *);
|
2011-05-21 15:24:50 +03:00
|
|
|
|
|
|
|
/*****************************************************************************
|
2021-01-22 00:45:48 +02:00
|
|
|
* DShowEnumPins
|
2011-05-21 15:24:50 +03:00
|
|
|
****************************************************************************/
|
2021-01-22 00:45:48 +02:00
|
|
|
struct DShowEnumPins {
|
2011-05-21 15:24:50 +03:00
|
|
|
IEnumPinsVtbl *vtbl;
|
|
|
|
long ref;
|
|
|
|
int pos;
|
2021-01-22 00:45:48 +02:00
|
|
|
DShowPin *pin;
|
|
|
|
DShowFilter *filter;
|
2011-05-21 15:24:50 +03:00
|
|
|
};
|
|
|
|
|
2022-01-02 11:49:38 +02:00
|
|
|
long WINAPI ff_dshow_enumpins_QueryInterface(DShowEnumPins *, const GUID *, void **);
|
|
|
|
unsigned long WINAPI ff_dshow_enumpins_AddRef (DShowEnumPins *);
|
|
|
|
unsigned long WINAPI ff_dshow_enumpins_Release (DShowEnumPins *);
|
|
|
|
long WINAPI ff_dshow_enumpins_Next (DShowEnumPins *, unsigned long, IPin **, unsigned long *);
|
|
|
|
long WINAPI ff_dshow_enumpins_Skip (DShowEnumPins *, unsigned long);
|
|
|
|
long WINAPI ff_dshow_enumpins_Reset (DShowEnumPins *);
|
|
|
|
long WINAPI ff_dshow_enumpins_Clone (DShowEnumPins *, DShowEnumPins **);
|
2011-05-21 15:24:50 +03:00
|
|
|
|
2021-01-22 00:45:48 +02:00
|
|
|
void ff_dshow_enumpins_Destroy(DShowEnumPins *);
|
|
|
|
DShowEnumPins *ff_dshow_enumpins_Create (DShowPin *pin, DShowFilter *filter);
|
2011-05-21 15:24:50 +03:00
|
|
|
|
|
|
|
/*****************************************************************************
|
2021-01-22 00:45:48 +02:00
|
|
|
* DShowEnumMediaTypes
|
2011-05-21 15:24:50 +03:00
|
|
|
****************************************************************************/
|
2021-01-22 00:45:48 +02:00
|
|
|
struct DShowEnumMediaTypes {
|
2015-01-23 15:01:32 +02:00
|
|
|
IEnumMediaTypesVtbl *vtbl;
|
2011-05-21 15:24:50 +03:00
|
|
|
long ref;
|
|
|
|
int pos;
|
|
|
|
AM_MEDIA_TYPE type;
|
|
|
|
};
|
|
|
|
|
2022-01-02 11:49:38 +02:00
|
|
|
long WINAPI ff_dshow_enummediatypes_QueryInterface(DShowEnumMediaTypes *, const GUID *, void **);
|
|
|
|
unsigned long WINAPI ff_dshow_enummediatypes_AddRef (DShowEnumMediaTypes *);
|
|
|
|
unsigned long WINAPI ff_dshow_enummediatypes_Release (DShowEnumMediaTypes *);
|
|
|
|
long WINAPI ff_dshow_enummediatypes_Next (DShowEnumMediaTypes *, unsigned long, AM_MEDIA_TYPE **, unsigned long *);
|
|
|
|
long WINAPI ff_dshow_enummediatypes_Skip (DShowEnumMediaTypes *, unsigned long);
|
|
|
|
long WINAPI ff_dshow_enummediatypes_Reset (DShowEnumMediaTypes *);
|
|
|
|
long WINAPI ff_dshow_enummediatypes_Clone (DShowEnumMediaTypes *, DShowEnumMediaTypes **);
|
2011-05-21 15:24:50 +03:00
|
|
|
|
2021-01-22 00:45:48 +02:00
|
|
|
void ff_dshow_enummediatypes_Destroy(DShowEnumMediaTypes *);
|
|
|
|
DShowEnumMediaTypes *ff_dshow_enummediatypes_Create(const AM_MEDIA_TYPE *type);
|
2011-05-21 15:24:50 +03:00
|
|
|
|
|
|
|
/*****************************************************************************
|
2021-01-22 00:45:48 +02:00
|
|
|
* DShowFilter
|
2011-05-21 15:24:50 +03:00
|
|
|
****************************************************************************/
|
2021-01-22 00:45:48 +02:00
|
|
|
struct DShowFilter {
|
2011-05-21 15:24:50 +03:00
|
|
|
IBaseFilterVtbl *vtbl;
|
|
|
|
long ref;
|
|
|
|
const wchar_t *name;
|
2021-01-22 00:45:48 +02:00
|
|
|
DShowPin *pin;
|
2011-05-21 15:24:50 +03:00
|
|
|
FILTER_INFO info;
|
|
|
|
FILTER_STATE state;
|
|
|
|
IReferenceClock *clock;
|
|
|
|
enum dshowDeviceType type;
|
|
|
|
void *priv_data;
|
|
|
|
int stream_index;
|
|
|
|
int64_t start_time;
|
2014-03-27 22:44:20 +03:00
|
|
|
void (*callback)(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType type);
|
2011-05-21 15:24:50 +03:00
|
|
|
};
|
|
|
|
|
2022-01-02 11:49:38 +02:00
|
|
|
long WINAPI ff_dshow_filter_QueryInterface (DShowFilter *, const GUID *, void **);
|
|
|
|
unsigned long WINAPI ff_dshow_filter_AddRef (DShowFilter *);
|
|
|
|
unsigned long WINAPI ff_dshow_filter_Release (DShowFilter *);
|
|
|
|
long WINAPI ff_dshow_filter_GetClassID (DShowFilter *, CLSID *);
|
|
|
|
long WINAPI ff_dshow_filter_Stop (DShowFilter *);
|
|
|
|
long WINAPI ff_dshow_filter_Pause (DShowFilter *);
|
|
|
|
long WINAPI ff_dshow_filter_Run (DShowFilter *, REFERENCE_TIME);
|
|
|
|
long WINAPI ff_dshow_filter_GetState (DShowFilter *, DWORD, FILTER_STATE *);
|
|
|
|
long WINAPI ff_dshow_filter_SetSyncSource (DShowFilter *, IReferenceClock *);
|
|
|
|
long WINAPI ff_dshow_filter_GetSyncSource (DShowFilter *, IReferenceClock **);
|
|
|
|
long WINAPI ff_dshow_filter_EnumPins (DShowFilter *, IEnumPins **);
|
|
|
|
long WINAPI ff_dshow_filter_FindPin (DShowFilter *, const wchar_t *, IPin **);
|
|
|
|
long WINAPI ff_dshow_filter_QueryFilterInfo(DShowFilter *, FILTER_INFO *);
|
|
|
|
long WINAPI ff_dshow_filter_JoinFilterGraph(DShowFilter *, IFilterGraph *, const wchar_t *);
|
|
|
|
long WINAPI ff_dshow_filter_QueryVendorInfo(DShowFilter *, wchar_t **);
|
2021-01-22 00:45:48 +02:00
|
|
|
|
|
|
|
void ff_dshow_filter_Destroy(DShowFilter *);
|
|
|
|
DShowFilter *ff_dshow_filter_Create (void *, void *, enum dshowDeviceType);
|
2012-05-09 09:11:16 +03:00
|
|
|
|
2015-01-23 15:35:16 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* dshow_ctx
|
|
|
|
****************************************************************************/
|
|
|
|
struct dshow_ctx {
|
|
|
|
const AVClass *class;
|
|
|
|
|
|
|
|
IGraphBuilder *graph;
|
|
|
|
|
|
|
|
char *device_name[2];
|
2016-06-15 10:17:11 +02:00
|
|
|
char *device_unique_name[2];
|
|
|
|
|
2015-01-23 15:35:16 +02:00
|
|
|
int video_device_number;
|
|
|
|
int audio_device_number;
|
|
|
|
|
|
|
|
int list_options;
|
|
|
|
int list_devices;
|
|
|
|
int audio_buffer_size;
|
|
|
|
int crossbar_video_input_pin_number;
|
|
|
|
int crossbar_audio_input_pin_number;
|
|
|
|
char *video_pin_name;
|
|
|
|
char *audio_pin_name;
|
|
|
|
int show_video_device_dialog;
|
|
|
|
int show_audio_device_dialog;
|
2015-01-26 10:29:58 +02:00
|
|
|
int show_video_crossbar_connection_dialog;
|
|
|
|
int show_audio_crossbar_connection_dialog;
|
2015-01-25 04:56:02 +02:00
|
|
|
int show_analog_tv_tuner_dialog;
|
|
|
|
int show_analog_tv_tuner_audio_dialog;
|
2015-04-22 18:38:38 +02:00
|
|
|
char *audio_filter_load_file;
|
|
|
|
char *audio_filter_save_file;
|
|
|
|
char *video_filter_load_file;
|
|
|
|
char *video_filter_save_file;
|
2021-12-21 15:53:27 +02:00
|
|
|
int use_video_device_timestamps;
|
2015-01-23 15:35:16 +02:00
|
|
|
|
|
|
|
IBaseFilter *device_filter[2];
|
|
|
|
IPin *device_pin[2];
|
2021-01-22 00:45:48 +02:00
|
|
|
DShowFilter *capture_filter[2];
|
|
|
|
DShowPin *capture_pin[2];
|
2015-01-23 15:35:16 +02:00
|
|
|
|
|
|
|
HANDLE mutex;
|
|
|
|
HANDLE event[2]; /* event[0] is set by DirectShow
|
|
|
|
* event[1] is set by callback() */
|
2021-12-16 02:49:39 +02:00
|
|
|
PacketListEntry *pktl;
|
2015-01-23 15:35:16 +02:00
|
|
|
|
|
|
|
int eof;
|
|
|
|
|
|
|
|
int64_t curbufsize[2];
|
|
|
|
unsigned int video_frame_num;
|
|
|
|
|
|
|
|
IMediaControl *control;
|
|
|
|
IMediaEvent *media_event;
|
|
|
|
|
|
|
|
enum AVPixelFormat pixel_format;
|
|
|
|
enum AVCodecID video_codec_id;
|
|
|
|
char *framerate;
|
|
|
|
|
|
|
|
int requested_width;
|
|
|
|
int requested_height;
|
|
|
|
AVRational requested_framerate;
|
|
|
|
|
|
|
|
int sample_rate;
|
|
|
|
int sample_size;
|
|
|
|
int channels;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* CrossBar
|
|
|
|
****************************************************************************/
|
2018-06-25 20:47:03 +02:00
|
|
|
HRESULT ff_dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2,
|
2015-01-23 15:35:16 +02:00
|
|
|
IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx);
|
|
|
|
|
2018-06-25 20:47:03 +02:00
|
|
|
void ff_dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx);
|
2015-01-23 15:35:16 +02:00
|
|
|
|
2016-01-29 04:25:13 +02:00
|
|
|
#endif /* AVDEVICE_DSHOW_CAPTURE_H */
|