FFmpeg
dshow_capture.h
Go to the documentation of this file.
1 /*
2  * DirectShow capture interface
3  * Copyright (c) 2010 Ramiro Polla
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef AVDEVICE_DSHOW_CAPTURE_H
23 #define AVDEVICE_DSHOW_CAPTURE_H
24 
25 #define DSHOWDEBUG 0
26 
27 #include "avdevice.h"
28 
29 #define COBJMACROS
30 #define WIN32_LEAN_AND_MEAN
31 #include <windows.h>
32 #define NO_DSHOW_STRSAFE
33 #include <dshow.h>
34 #include <dvdmedia.h>
35 
36 #include "libavcodec/internal.h"
38 
39 /* EC_DEVICE_LOST is not defined in MinGW dshow headers. */
40 #ifndef EC_DEVICE_LOST
41 #define EC_DEVICE_LOST 0x1f
42 #endif
43 
44 long ff_copy_dshow_media_type(AM_MEDIA_TYPE *dst, const AM_MEDIA_TYPE *src);
45 void ff_print_VIDEO_STREAM_CONFIG_CAPS(const VIDEO_STREAM_CONFIG_CAPS *caps);
46 void ff_print_AUDIO_STREAM_CONFIG_CAPS(const AUDIO_STREAM_CONFIG_CAPS *caps);
47 void ff_print_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *type);
48 void ff_printGUID(const GUID *g);
49 
51 #define dshowdebug(...) ff_dlog(&ff_dshow_context_class_ptr, __VA_ARGS__)
52 
53 static inline void nothing(void *foo)
54 {
55 }
56 
57 struct GUIDoffset {
58  const GUID *iid;
59  int offset;
60 };
61 
65 };
66 
70 };
71 
72 #define DECLARE_QUERYINTERFACE(prefix, class, ...) \
73 long WINAPI \
74 ff_dshow_##prefix##_QueryInterface(class *this, const GUID *riid, void **ppvObject) \
75 { \
76  struct GUIDoffset ifaces[] = __VA_ARGS__; \
77  int i; \
78  dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_QueryInterface(%p, %p, %p)\n", this, riid, ppvObject); \
79  ff_printGUID(riid); \
80  if (!ppvObject) \
81  return E_POINTER; \
82  for (i = 0; i < sizeof(ifaces)/sizeof(ifaces[0]); i++) { \
83  if (IsEqualGUID(riid, ifaces[i].iid)) { \
84  void *obj = (void *) ((uint8_t *) this + ifaces[i].offset); \
85  ff_dshow_##prefix##_AddRef(this); \
86  dshowdebug("\tfound %d with offset %d\n", i, ifaces[i].offset); \
87  *ppvObject = (void *) obj; \
88  return S_OK; \
89  } \
90  } \
91  dshowdebug("\tE_NOINTERFACE\n"); \
92  *ppvObject = NULL; \
93  return E_NOINTERFACE; \
94 }
95 #define DECLARE_ADDREF(prefix, class) \
96 unsigned long WINAPI \
97 ff_dshow_##prefix##_AddRef(class *this) \
98 { \
99  dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_AddRef(%p)\t%ld\n", this, this->ref+1); \
100  return InterlockedIncrement(&this->ref); \
101 }
102 #define DECLARE_RELEASE(prefix, class) \
103 unsigned long WINAPI \
104 ff_dshow_##prefix##_Release(class *this) \
105 { \
106  long ref = InterlockedDecrement(&this->ref); \
107  dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Release(%p)\t%ld\n", this, ref); \
108  if (!ref) \
109  ff_dshow_##prefix##_Destroy(this); \
110  return ref; \
111 }
112 
113 #define DECLARE_DESTROY(prefix, class, func) \
114 void ff_dshow_##prefix##_Destroy(class *this) \
115 { \
116  dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Destroy(%p)\n", this); \
117  func(this); \
118  if (this) { \
119  if (this->vtbl) \
120  CoTaskMemFree(this->vtbl); \
121  CoTaskMemFree(this); \
122  } \
123 }
124 #define DECLARE_CREATE(prefix, class, setup, ...) \
125 class *ff_dshow_##prefix##_Create(__VA_ARGS__) \
126 { \
127  class *this = CoTaskMemAlloc(sizeof(class)); \
128  void *vtbl = CoTaskMemAlloc(sizeof(*this->vtbl)); \
129  dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Create(%p)\n", this); \
130  if (!this || !vtbl) \
131  goto fail; \
132  ZeroMemory(this, sizeof(class)); \
133  ZeroMemory(vtbl, sizeof(*this->vtbl)); \
134  this->ref = 1; \
135  this->vtbl = vtbl; \
136  if (!setup) \
137  goto fail; \
138  dshowdebug("created ff_dshow_"AV_STRINGIFY(prefix)" %p\n", this); \
139  return this; \
140 fail: \
141  ff_dshow_##prefix##_Destroy(this); \
142  dshowdebug("could not create ff_dshow_"AV_STRINGIFY(prefix)"\n"); \
143  return NULL; \
144 }
145 
146 #define SETVTBL(vtbl, prefix, fn) \
147  do { (vtbl)->fn = (void *) ff_dshow_##prefix##_##fn; } while(0)
148 
149 /*****************************************************************************
150  * Forward Declarations
151  ****************************************************************************/
152 typedef struct DShowPin DShowPin;
154 typedef struct DShowEnumPins DShowEnumPins;
156 typedef struct DShowFilter DShowFilter;
157 
158 /*****************************************************************************
159  * DShowPin
160  ****************************************************************************/
161 struct DShowPin {
162  IPinVtbl *vtbl;
163  long ref;
165  IPin *connectedto;
166  AM_MEDIA_TYPE type;
167  IMemInputPinVtbl *imemvtbl;
168 };
169 
170 long WINAPI ff_dshow_pin_QueryInterface (DShowPin *, const GUID *, void **);
171 unsigned long WINAPI ff_dshow_pin_AddRef (DShowPin *);
172 unsigned long WINAPI ff_dshow_pin_Release (DShowPin *);
173 long WINAPI ff_dshow_pin_Connect (DShowPin *, IPin *, const AM_MEDIA_TYPE *);
174 long WINAPI ff_dshow_pin_ReceiveConnection (DShowPin *, IPin *, const AM_MEDIA_TYPE *);
175 long WINAPI ff_dshow_pin_Disconnect (DShowPin *);
176 long WINAPI ff_dshow_pin_ConnectedTo (DShowPin *, IPin **);
177 long WINAPI ff_dshow_pin_ConnectionMediaType (DShowPin *, AM_MEDIA_TYPE *);
178 long WINAPI ff_dshow_pin_QueryPinInfo (DShowPin *, PIN_INFO *);
179 long WINAPI ff_dshow_pin_QueryDirection (DShowPin *, PIN_DIRECTION *);
180 long WINAPI ff_dshow_pin_QueryId (DShowPin *, wchar_t **);
181 long WINAPI ff_dshow_pin_QueryAccept (DShowPin *, const AM_MEDIA_TYPE *);
182 long WINAPI ff_dshow_pin_EnumMediaTypes (DShowPin *, IEnumMediaTypes **);
183 long WINAPI ff_dshow_pin_QueryInternalConnections(DShowPin *, IPin **, unsigned long *);
184 long WINAPI ff_dshow_pin_EndOfStream (DShowPin *);
185 long WINAPI ff_dshow_pin_BeginFlush (DShowPin *);
186 long WINAPI ff_dshow_pin_EndFlush (DShowPin *);
187 long WINAPI ff_dshow_pin_NewSegment (DShowPin *, REFERENCE_TIME, REFERENCE_TIME, double);
188 
189 long WINAPI ff_dshow_meminputpin_QueryInterface (DShowMemInputPin *, const GUID *, void **);
190 unsigned long WINAPI ff_dshow_meminputpin_AddRef (DShowMemInputPin *);
191 unsigned long WINAPI ff_dshow_meminputpin_Release (DShowMemInputPin *);
192 long WINAPI ff_dshow_meminputpin_GetAllocator (DShowMemInputPin *, IMemAllocator **);
193 long WINAPI ff_dshow_meminputpin_NotifyAllocator (DShowMemInputPin *, IMemAllocator *, BOOL);
194 long WINAPI ff_dshow_meminputpin_GetAllocatorRequirements(DShowMemInputPin *, ALLOCATOR_PROPERTIES *);
195 long WINAPI ff_dshow_meminputpin_Receive (DShowMemInputPin *, IMediaSample *);
196 long WINAPI ff_dshow_meminputpin_ReceiveMultiple (DShowMemInputPin *, IMediaSample **, long, long *);
198 
201 
203 
204 /*****************************************************************************
205  * DShowEnumPins
206  ****************************************************************************/
208  IEnumPinsVtbl *vtbl;
209  long ref;
210  int pos;
213 };
214 
215 long WINAPI ff_dshow_enumpins_QueryInterface(DShowEnumPins *, const GUID *, void **);
216 unsigned long WINAPI ff_dshow_enumpins_AddRef (DShowEnumPins *);
217 unsigned long WINAPI ff_dshow_enumpins_Release (DShowEnumPins *);
218 long WINAPI ff_dshow_enumpins_Next (DShowEnumPins *, unsigned long, IPin **, unsigned long *);
219 long WINAPI ff_dshow_enumpins_Skip (DShowEnumPins *, unsigned long);
220 long WINAPI ff_dshow_enumpins_Reset (DShowEnumPins *);
222 
225 
226 /*****************************************************************************
227  * DShowEnumMediaTypes
228  ****************************************************************************/
230  IEnumMediaTypesVtbl *vtbl;
231  long ref;
232  int pos;
233  AM_MEDIA_TYPE type;
234 };
235 
236 long WINAPI ff_dshow_enummediatypes_QueryInterface(DShowEnumMediaTypes *, const GUID *, void **);
237 unsigned long WINAPI ff_dshow_enummediatypes_AddRef (DShowEnumMediaTypes *);
239 long WINAPI ff_dshow_enummediatypes_Next (DShowEnumMediaTypes *, unsigned long, AM_MEDIA_TYPE **, unsigned long *);
240 long WINAPI ff_dshow_enummediatypes_Skip (DShowEnumMediaTypes *, unsigned long);
243 
246 
247 /*****************************************************************************
248  * DShowFilter
249  ****************************************************************************/
250 struct DShowFilter {
251  IBaseFilterVtbl *vtbl;
252  long ref;
253  const wchar_t *name;
255  FILTER_INFO info;
256  FILTER_STATE state;
257  IReferenceClock *clock;
259  void *priv_data;
261  int64_t start_time;
262  void (*callback)(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType type);
263 };
264 
265 long WINAPI ff_dshow_filter_QueryInterface (DShowFilter *, const GUID *, void **);
266 unsigned long WINAPI ff_dshow_filter_AddRef (DShowFilter *);
267 unsigned long WINAPI ff_dshow_filter_Release (DShowFilter *);
268 long WINAPI ff_dshow_filter_GetClassID (DShowFilter *, CLSID *);
269 long WINAPI ff_dshow_filter_Stop (DShowFilter *);
270 long WINAPI ff_dshow_filter_Pause (DShowFilter *);
271 long WINAPI ff_dshow_filter_Run (DShowFilter *, REFERENCE_TIME);
272 long WINAPI ff_dshow_filter_GetState (DShowFilter *, DWORD, FILTER_STATE *);
273 long WINAPI ff_dshow_filter_SetSyncSource (DShowFilter *, IReferenceClock *);
274 long WINAPI ff_dshow_filter_GetSyncSource (DShowFilter *, IReferenceClock **);
275 long WINAPI ff_dshow_filter_EnumPins (DShowFilter *, IEnumPins **);
276 long WINAPI ff_dshow_filter_FindPin (DShowFilter *, const wchar_t *, IPin **);
277 long WINAPI ff_dshow_filter_QueryFilterInfo(DShowFilter *, FILTER_INFO *);
278 long WINAPI ff_dshow_filter_JoinFilterGraph(DShowFilter *, IFilterGraph *, const wchar_t *);
279 long WINAPI ff_dshow_filter_QueryVendorInfo(DShowFilter *, wchar_t **);
280 
282 DShowFilter *ff_dshow_filter_Create (void *, void *, enum dshowDeviceType);
283 
284 /*****************************************************************************
285  * dshow_ctx
286  ****************************************************************************/
287 struct dshow_ctx {
288  const AVClass *class;
289 
290  IGraphBuilder *graph;
291 
292  char *device_name[2];
293  char *device_unique_name[2];
294 
297 
299  int list_devices;
316 
317  IBaseFilter *device_filter[2];
318  IPin *device_pin[2];
321 
322  HANDLE mutex;
323  HANDLE event[2]; /* event[0] is set by DirectShow
324  * event[1] is set by callback() */
326 
327  int eof;
328 
329  int64_t curbufsize[2];
330  unsigned int video_frame_num;
331 
332  IMediaControl *control;
333  IMediaEvent *media_event;
334 
337  char *framerate;
338 
340  int requested_height;
342 
344  int sample_size;
345  int channels;
346 };
347 
348 /*****************************************************************************
349  * CrossBar
350  ****************************************************************************/
351 HRESULT ff_dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2,
352  IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx);
353 
354 void ff_dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx);
355 
356 #endif /* AVDEVICE_DSHOW_CAPTURE_H */
ff_printGUID
void ff_printGUID(const GUID *g)
Definition: dshow_common.c:42
dshow_ctx::video_codec_id
enum AVCodecID video_codec_id
Definition: dshow_capture.h:338
dshow_ctx::show_audio_crossbar_connection_dialog
int show_audio_crossbar_connection_dialog
Definition: dshow_capture.h:310
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
ff_dshow_enummediatypes_Reset
long WINAPI ff_dshow_enummediatypes_Reset(DShowEnumMediaTypes *)
Definition: dshow_enummediatypes.c:60
DShowPin::filter
DShowFilter * filter
Definition: dshow_capture.h:166
ff_dshow_pin_QueryId
long WINAPI ff_dshow_pin_QueryId(DShowPin *, wchar_t **)
Definition: dshow_pin.c:126
ff_dshow_meminputpin_GetAllocator
long WINAPI ff_dshow_meminputpin_GetAllocator(DShowMemInputPin *, IMemAllocator **)
Definition: dshow_pin.c:272
DShowEnumPins
Definition: dshow_capture.h:207
dshow_ctx::list_devices
int list_devices
Definition: dshow_capture.h:301
ff_dshow_filter_Run
long WINAPI ff_dshow_filter_Run(DShowFilter *, REFERENCE_TIME)
Definition: dshow_filter.c:47
nothing
static void nothing(void *foo)
Definition: dshow_capture.h:53
dshow_ctx::requested_width
int requested_width
Definition: dshow_capture.h:341
VideoDevice
@ VideoDevice
Definition: dshow_capture.h:63
ff_dshow_meminputpin_AddRef
unsigned long WINAPI ff_dshow_meminputpin_AddRef(DShowMemInputPin *)
Definition: dshow_pin.c:260
ff_dshow_pin_QueryInterface
long WINAPI ff_dshow_pin_QueryInterface(DShowPin *, const GUID *, void **)
DShowFilter::ref
long ref
Definition: dshow_capture.h:254
ff_dshow_pin_Release
unsigned long WINAPI ff_dshow_pin_Release(DShowPin *)
dshow_ctx::media_event
IMediaEvent * media_event
Definition: dshow_capture.h:335
ff_dshow_pin_ReceiveConnection
long WINAPI ff_dshow_pin_ReceiveConnection(DShowPin *, IPin *, const AM_MEDIA_TYPE *)
Definition: dshow_pin.c:38
ff_dshow_filter_GetState
long WINAPI ff_dshow_filter_GetState(DShowFilter *, DWORD, FILTER_STATE *)
Definition: dshow_filter.c:54
ff_dshow_show_filter_properties
void ff_dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx)
Pops up a user dialog allowing them to adjust properties for the given filter, if possible.
Definition: dshow.c:1122
dshow_ctx::video_filter_save_file
char * video_filter_save_file
Definition: dshow_capture.h:316
dshow_ctx::video_frame_num
unsigned int video_frame_num
Definition: dshow_capture.h:332
ff_dshow_enumpins_AddRef
unsigned long WINAPI ff_dshow_enumpins_AddRef(DShowEnumPins *)
ff_print_VIDEO_STREAM_CONFIG_CAPS
void ff_print_VIDEO_STREAM_CONFIG_CAPS(const VIDEO_STREAM_CONFIG_CAPS *caps)
Definition: dshow_common.c:85
index
fg index
Definition: ffmpeg_filter.c:167
internal.h
ff_dshow_pin_EndFlush
long WINAPI ff_dshow_pin_EndFlush(DShowPin *)
Definition: dshow_pin.c:175
ff_dshow_meminputpin_ReceiveCanBlock
long WINAPI ff_dshow_meminputpin_ReceiveCanBlock(DShowMemInputPin *)
Definition: dshow_pin.c:369
dshow_ctx::graph
IGraphBuilder * graph
Definition: dshow_capture.h:292
ff_dshow_pin_QueryAccept
long WINAPI ff_dshow_pin_QueryAccept(DShowPin *, const AM_MEDIA_TYPE *)
Definition: dshow_pin.c:137
filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
DShowFilter::name
const wchar_t * name
Definition: dshow_capture.h:255
dshow_ctx::device_filter
IBaseFilter * device_filter[2]
Definition: dshow_capture.h:319
ff_dshow_enummediatypes_Release
unsigned long WINAPI ff_dshow_enummediatypes_Release(DShowEnumMediaTypes *)
DShowPin::ref
long ref
Definition: dshow_capture.h:165
dshow_ctx::video_filter_load_file
char * video_filter_load_file
Definition: dshow_capture.h:315
ff_dshow_filter_Stop
long WINAPI ff_dshow_filter_Stop(DShowFilter *)
Definition: dshow_filter.c:35
ff_dshow_enummediatypes_AddRef
unsigned long WINAPI ff_dshow_enummediatypes_AddRef(DShowEnumMediaTypes *)
ff_dshow_filter_QueryFilterInfo
long WINAPI ff_dshow_filter_QueryFilterInfo(DShowFilter *, FILTER_INFO *)
Definition: dshow_filter.c:119
dshow_ctx::capture_pin
DShowPin * capture_pin[2]
Definition: dshow_capture.h:322
dshow_ctx::audio_device_number
int audio_device_number
Definition: dshow_capture.h:298
DShowFilter::info
FILTER_INFO info
Definition: dshow_capture.h:257
ff_dshow_pin_Destroy
void ff_dshow_pin_Destroy(DShowPin *)
ff_dshow_filter_EnumPins
long WINAPI ff_dshow_filter_EnumPins(DShowFilter *, IEnumPins **)
Definition: dshow_filter.c:88
ff_dshow_meminputpin_GetAllocatorRequirements
long WINAPI ff_dshow_meminputpin_GetAllocatorRequirements(DShowMemInputPin *, ALLOCATOR_PROPERTIES *)
Definition: dshow_pin.c:283
DShowEnumPins::vtbl
IEnumPinsVtbl * vtbl
Definition: dshow_capture.h:210
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
ff_dshow_filter_Create
DShowFilter * ff_dshow_filter_Create(void *, void *, enum dshowDeviceType)
ff_print_AM_MEDIA_TYPE
void ff_print_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *type)
Definition: dshow_common.c:134
DShowEnumMediaTypes::pos
int pos
Definition: dshow_capture.h:234
dshow_ctx::channels
int channels
Definition: dshow_capture.h:347
dshow_ctx
Definition: dshow_capture.h:287
DShowFilter::pin
DShowPin * pin
Definition: dshow_capture.h:256
DShowFilter::vtbl
IBaseFilterVtbl * vtbl
Definition: dshow_capture.h:253
ff_dshow_filter_Pause
long WINAPI ff_dshow_filter_Pause(DShowFilter *)
Definition: dshow_filter.c:41
dshow_ctx::sample_rate
int sample_rate
Definition: dshow_capture.h:345
DShowPin::imemvtbl
IMemInputPinVtbl * imemvtbl
Definition: dshow_capture.h:169
dshow_ctx::show_analog_tv_tuner_audio_dialog
int show_analog_tv_tuner_audio_dialog
Definition: dshow_capture.h:312
ff_dshow_try_setup_crossbar_options
HRESULT ff_dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx)
Given a fully constructed graph, check if there is a cross bar filter, and configure its pins if so.
Definition: dshow_crossbar.c:140
ff_dshow_enummediatypes_Skip
long WINAPI ff_dshow_enummediatypes_Skip(DShowEnumMediaTypes *, unsigned long)
Definition: dshow_enummediatypes.c:53
g
const char * g
Definition: vf_curves.c:117
ff_dshow_enummediatypes_Next
long WINAPI ff_dshow_enummediatypes_Next(DShowEnumMediaTypes *, unsigned long, AM_MEDIA_TYPE **, unsigned long *)
dshow_ctx::eof
int eof
Definition: dshow_capture.h:329
ff_copy_dshow_media_type
long ff_copy_dshow_media_type(AM_MEDIA_TYPE *dst, const AM_MEDIA_TYPE *src)
Definition: dshow_common.c:24
DShowFilter::type
enum dshowDeviceType type
Definition: dshow_capture.h:260
ff_dshow_filter_Destroy
void ff_dshow_filter_Destroy(DShowFilter *)
DShowFilter
Definition: dshow_capture.h:250
AVFormatContext
Format I/O context.
Definition: avformat.h:1200
ff_dshow_meminputpin_Release
unsigned long WINAPI ff_dshow_meminputpin_Release(DShowMemInputPin *)
Definition: dshow_pin.c:266
ff_dshow_pin_EndOfStream
long WINAPI ff_dshow_pin_EndOfStream(DShowPin *)
Definition: dshow_pin.c:163
ff_dshow_enumpins_Skip
long WINAPI ff_dshow_enumpins_Skip(DShowEnumPins *, unsigned long)
Definition: dshow_enumpins.c:48
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
DShowEnumMediaTypes
Definition: dshow_capture.h:229
dshow_ctx::audio_buffer_size
int audio_buffer_size
Definition: dshow_capture.h:302
ff_dshow_meminputpin_Destroy
void ff_dshow_meminputpin_Destroy(DShowMemInputPin *)
Definition: dshow_pin.c:376
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
src
#define src
Definition: vp8dsp.c:255
ff_dshow_filter_GetSyncSource
long WINAPI ff_dshow_filter_GetSyncSource(DShowFilter *, IReferenceClock **)
Definition: dshow_filter.c:76
ff_dshow_meminputpin_NotifyAllocator
long WINAPI ff_dshow_meminputpin_NotifyAllocator(DShowMemInputPin *, IMemAllocator *, BOOL)
Definition: dshow_pin.c:277
ff_dshow_pin_Disconnect
long WINAPI ff_dshow_pin_Disconnect(DShowPin *)
Definition: dshow_pin.c:65
ff_dshow_filter_FindPin
long WINAPI ff_dshow_filter_FindPin(DShowFilter *, const wchar_t *, IPin **)
Definition: dshow_filter.c:102
DShowEnumMediaTypes::type
AM_MEDIA_TYPE type
Definition: dshow_capture.h:235
ff_dshow_pin_BeginFlush
long WINAPI ff_dshow_pin_BeginFlush(DShowPin *)
Definition: dshow_pin.c:169
ff_print_AUDIO_STREAM_CONFIG_CAPS
void ff_print_AUDIO_STREAM_CONFIG_CAPS(const AUDIO_STREAM_CONFIG_CAPS *caps)
Definition: dshow_common.c:115
DShowPin::type
AM_MEDIA_TYPE type
Definition: dshow_capture.h:168
DShowFilter::state
FILTER_STATE state
Definition: dshow_capture.h:258
ff_dshow_enummediatypes_Create
DShowEnumMediaTypes * ff_dshow_enummediatypes_Create(const AM_MEDIA_TYPE *type)
dshow_ctx::show_audio_device_dialog
int show_audio_device_dialog
Definition: dshow_capture.h:308
dshow_ctx::mutex
HANDLE mutex
Definition: dshow_capture.h:324
AVCodecID
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: codec_id.h:47
dshow_ctx::video_pin_name
char * video_pin_name
Definition: dshow_capture.h:305
dshowSourceFilterType
dshowSourceFilterType
Definition: dshow_capture.h:67
dshow_ctx::list_options
int list_options
Definition: dshow_capture.h:300
ff_dshow_pin_QueryInternalConnections
long WINAPI ff_dshow_pin_QueryInternalConnections(DShowPin *, IPin **, unsigned long *)
Definition: dshow_pin.c:157
ff_dshow_pin_QueryPinInfo
long WINAPI ff_dshow_pin_QueryPinInfo(DShowPin *, PIN_INFO *)
Definition: dshow_pin.c:102
AudioDevice
@ AudioDevice
Definition: dshow_capture.h:64
DShowPin::vtbl
IPinVtbl * vtbl
Definition: dshow_capture.h:164
ff_dshow_filter_QueryInterface
long WINAPI ff_dshow_filter_QueryInterface(DShowFilter *, const GUID *, void **)
ff_dshow_enumpins_Clone
long WINAPI ff_dshow_enumpins_Clone(DShowEnumPins *, DShowEnumPins **)
Definition: dshow_enumpins.c:61
dshow_ctx::requested_framerate
AVRational requested_framerate
Definition: dshow_capture.h:343
dshow_ctx::use_video_device_timestamps
int use_video_device_timestamps
Definition: dshow_capture.h:317
DShowMemInputPin
struct DShowMemInputPin DShowMemInputPin
Definition: dshow_capture.h:153
ff_dshow_pin_QueryDirection
long WINAPI ff_dshow_pin_QueryDirection(DShowPin *, PIN_DIRECTION *)
Definition: dshow_pin.c:118
ff_dshow_enumpins_Reset
long WINAPI ff_dshow_enumpins_Reset(DShowEnumPins *)
Definition: dshow_enumpins.c:55
dshow_ctx::crossbar_audio_input_pin_number
int crossbar_audio_input_pin_number
Definition: dshow_capture.h:304
DShowEnumPins::filter
DShowFilter * filter
Definition: dshow_capture.h:214
avdevice.h
ff_dshow_pin_NewSegment
long WINAPI ff_dshow_pin_NewSegment(DShowPin *, REFERENCE_TIME, REFERENCE_TIME, double)
Definition: dshow_pin.c:181
ff_dshow_enumpins_Destroy
void ff_dshow_enumpins_Destroy(DShowEnumPins *)
DShowEnumMediaTypes::vtbl
IEnumMediaTypesVtbl * vtbl
Definition: dshow_capture.h:232
dshow_ctx::show_video_device_dialog
int show_video_device_dialog
Definition: dshow_capture.h:307
AudioSourceDevice
@ AudioSourceDevice
Definition: dshow_capture.h:69
dshow_ctx::device_name
char * device_name[2]
Definition: dshow_capture.h:294
ff_dshow_filter_GetClassID
long WINAPI ff_dshow_filter_GetClassID(DShowFilter *, CLSID *)
dshow_ctx::requested_height
int requested_height
Definition: dshow_capture.h:342
GUIDoffset
Definition: dshow_capture.h:57
DShowFilter::clock
IReferenceClock * clock
Definition: dshow_capture.h:259
PacketListEntry
Definition: packet_internal.h:26
DShowEnumPins::pos
int pos
Definition: dshow_capture.h:212
ff_dshow_filter_JoinFilterGraph
long WINAPI ff_dshow_filter_JoinFilterGraph(DShowFilter *, IFilterGraph *, const wchar_t *)
Definition: dshow_filter.c:131
dshow_ctx::audio_filter_save_file
char * audio_filter_save_file
Definition: dshow_capture.h:314
ff_dshow_enumpins_Create
DShowEnumPins * ff_dshow_enumpins_Create(DShowPin *pin, DShowFilter *filter)
ff_dshow_meminputpin_Receive
long WINAPI ff_dshow_meminputpin_Receive(DShowMemInputPin *, IMediaSample *)
Definition: dshow_pin.c:289
ff_dshow_pin_EnumMediaTypes
long WINAPI ff_dshow_pin_EnumMediaTypes(DShowPin *, IEnumMediaTypes **)
Definition: dshow_pin.c:142
ff_dshow_enummediatypes_Destroy
void ff_dshow_enummediatypes_Destroy(DShowEnumMediaTypes *)
ff_dshow_meminputpin_QueryInterface
long WINAPI ff_dshow_meminputpin_QueryInterface(DShowMemInputPin *, const GUID *, void **)
Definition: dshow_pin.c:253
DShowFilter::stream_index
int stream_index
Definition: dshow_capture.h:262
dshow_ctx::audio_pin_name
char * audio_pin_name
Definition: dshow_capture.h:306
ff_dshow_filter_AddRef
unsigned long WINAPI ff_dshow_filter_AddRef(DShowFilter *)
dshow_ctx::pixel_format
enum AVPixelFormat pixel_format
Definition: dshow_capture.h:337
dshow_ctx::capture_filter
DShowFilter * capture_filter[2]
Definition: dshow_capture.h:321
dshow_ctx::video_device_number
int video_device_number
Definition: dshow_capture.h:297
dshow_ctx::crossbar_video_input_pin_number
int crossbar_video_input_pin_number
Definition: dshow_capture.h:303
ff_dshow_enumpins_QueryInterface
long WINAPI ff_dshow_enumpins_QueryInterface(DShowEnumPins *, const GUID *, void **)
ff_dshow_pin_ConnectedTo
long WINAPI ff_dshow_pin_ConnectedTo(DShowPin *, IPin **)
Definition: dshow_pin.c:78
DShowEnumPins::pin
DShowPin * pin
Definition: dshow_capture.h:213
dshow_ctx::pktl
PacketListEntry * pktl
Definition: dshow_capture.h:327
ff_dshow_context_class_ptr
const AVClass * ff_dshow_context_class_ptr
Definition: dshow_common.c:60
ff_dshow_filter_SetSyncSource
long WINAPI ff_dshow_filter_SetSyncSource(DShowFilter *, IReferenceClock *)
Definition: dshow_filter.c:62
DShowFilter::priv_data
void * priv_data
Definition: dshow_capture.h:261
VideoSourceDevice
@ VideoSourceDevice
Definition: dshow_capture.h:68
dshow_ctx::show_analog_tv_tuner_dialog
int show_analog_tv_tuner_dialog
Definition: dshow_capture.h:311
GUIDoffset::offset
int offset
Definition: dshow_capture.h:59
dshow_ctx::framerate
char * framerate
Definition: dshow_capture.h:339
dshow_ctx::device_pin
IPin * device_pin[2]
Definition: dshow_capture.h:320
dshow_ctx::sample_size
int sample_size
Definition: dshow_capture.h:346
ff_dshow_pin_ConnectionMediaType
long WINAPI ff_dshow_pin_ConnectionMediaType(DShowPin *, AM_MEDIA_TYPE *)
Definition: dshow_pin.c:91
GUIDoffset::iid
const GUID * iid
Definition: dshow_capture.h:58
ff_dshow_meminputpin_ReceiveMultiple
long WINAPI ff_dshow_meminputpin_ReceiveMultiple(DShowMemInputPin *, IMediaSample **, long, long *)
Definition: dshow_pin.c:357
ff_dshow_pin_AddRef
unsigned long WINAPI ff_dshow_pin_AddRef(DShowPin *)
DShowEnumMediaTypes::ref
long ref
Definition: dshow_capture.h:233
packet_internal.h
DShowPin::connectedto
IPin * connectedto
Definition: dshow_capture.h:167
dshow_ctx::audio_filter_load_file
char * audio_filter_load_file
Definition: dshow_capture.h:313
ff_dshow_pin_Connect
long WINAPI ff_dshow_pin_Connect(DShowPin *, IPin *, const AM_MEDIA_TYPE *)
dshow_ctx::show_video_crossbar_connection_dialog
int show_video_crossbar_connection_dialog
Definition: dshow_capture.h:309
dshow_ctx::control
IMediaControl * control
Definition: dshow_capture.h:334
ff_dshow_enummediatypes_QueryInterface
long WINAPI ff_dshow_enummediatypes_QueryInterface(DShowEnumMediaTypes *, const GUID *, void **)
ff_dshow_pin_Create
DShowPin * ff_dshow_pin_Create(DShowFilter *filter)
ff_dshow_enummediatypes_Clone
long WINAPI ff_dshow_enummediatypes_Clone(DShowEnumMediaTypes *, DShowEnumMediaTypes **)
Definition: dshow_enummediatypes.c:66
dshow_ctx::curbufsize
int64_t curbufsize[2]
Definition: dshow_capture.h:331
DShowFilter::callback
void(* callback)(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType type)
Definition: dshow_capture.h:264
DShowFilter::start_time
int64_t start_time
Definition: dshow_capture.h:263
DShowPin
Definition: dshow_capture.h:161
dshowDeviceType
dshowDeviceType
Definition: dshow_capture.h:62
ff_dshow_enumpins_Release
unsigned long WINAPI ff_dshow_enumpins_Release(DShowEnumPins *)
ff_dshow_enumpins_Next
long WINAPI ff_dshow_enumpins_Next(DShowEnumPins *, unsigned long, IPin **, unsigned long *)
DShowEnumPins::ref
long ref
Definition: dshow_capture.h:211
ff_dshow_filter_Release
unsigned long WINAPI ff_dshow_filter_Release(DShowFilter *)
ff_dshow_filter_QueryVendorInfo
long WINAPI ff_dshow_filter_QueryVendorInfo(DShowFilter *, wchar_t **)
Definition: dshow_filter.c:142
dshow_ctx::device_unique_name
char * device_unique_name[2]
Definition: dshow_capture.h:295