diff options
author | rogerdpack <rogerpack2005@gmail.com> | 2015-01-23 06:35:16 -0700 |
---|---|---|
committer | rogerdpack <rogerpack2005@gmail.com> | 2015-01-23 06:35:16 -0700 |
commit | ec81ad21c1f8124dcde08c1e64656331d4c3d9e6 (patch) | |
tree | 285e772cc68940da91502e15d2e77c5e9d1b8bb8 /libavdevice/dshow_capture.h | |
parent | b76a0e24f9effa64e48ff0567af0dc497dd99e84 (diff) | |
download | ffmpeg-ec81ad21c1f8124dcde08c1e64656331d4c3d9e6.tar.gz |
dshow: introduce support for crossbar [multiple input selectable] devices
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Diffstat (limited to 'libavdevice/dshow_capture.h')
-rw-r--r-- | libavdevice/dshow_capture.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h index 09e9b1b15c..602969d8d7 100644 --- a/libavdevice/dshow_capture.h +++ b/libavdevice/dshow_capture.h @@ -277,4 +277,65 @@ long WINAPI libAVFilter_QueryVendorInfo(libAVFilter *, wchar_t **); void libAVFilter_Destroy(libAVFilter *); libAVFilter *libAVFilter_Create (void *, void *, enum dshowDeviceType); +/***************************************************************************** + * dshow_ctx + ****************************************************************************/ +struct dshow_ctx { + const AVClass *class; + + IGraphBuilder *graph; + + char *device_name[2]; + 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; + + IBaseFilter *device_filter[2]; + IPin *device_pin[2]; + libAVFilter *capture_filter[2]; + libAVPin *capture_pin[2]; + + HANDLE mutex; + HANDLE event[2]; /* event[0] is set by DirectShow + * event[1] is set by callback() */ + AVPacketList *pktl; + + 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 + ****************************************************************************/ +HRESULT dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, + IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx); + +void dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx); + #endif /* AVDEVICE_DSHOW_H */ |