FFmpeg
|
#include "dshow_capture.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "libavutil/mem.h"
#include "libavformat/demux.h"
#include "libavformat/internal.h"
#include "libavformat/riff.h"
#include "avdevice.h"
#include "libavcodec/raw.h"
#include "objidl.h"
#include "shlwapi.h"
#include "d3d9types.h"
#include "dxva2api.h"
Go to the source code of this file.
Data Structures | |
struct | dshow_format_info |
Macros | |
#define | AMCONTROL_COLORINFO_PRESENT 0x00000080 |
#define | OFFSET(x) offsetof(struct dshow_ctx, x) |
#define | DEC AV_OPT_FLAG_DECODING_PARAM |
Functions | |
static enum AVPixelFormat | dshow_pixfmt (DWORD biCompression, WORD biBitCount) |
static enum AVColorRange | dshow_color_range (DXVA2_ExtendedFormat *fmt_info) |
static enum AVColorSpace | dshow_color_space (DXVA2_ExtendedFormat *fmt_info) |
static enum AVColorPrimaries | dshow_color_primaries (DXVA2_ExtendedFormat *fmt_info) |
static enum AVColorTransferCharacteristic | dshow_color_trc (DXVA2_ExtendedFormat *fmt_info) |
static enum AVChromaLocation | dshow_chroma_loc (DXVA2_ExtendedFormat *fmt_info) |
static int | dshow_read_close (AVFormatContext *s) |
static char * | dup_wchar_to_utf8 (wchar_t *w) |
static int | shall_we_drop (AVFormatContext *s, int index, enum dshowDeviceType devtype) |
static void | callback (void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType devtype) |
static void | dshow_get_device_media_types (AVFormatContext *avctx, enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype, IBaseFilter *device_filter, enum AVMediaType **media_types, int *nb_media_types) |
static int | dshow_cycle_devices (AVFormatContext *avctx, ICreateDevEnum *devenum, enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype, IBaseFilter **pfilter, char **device_unique_name, AVDeviceInfoList **device_list) |
Cycle through available devices using the device enumerator devenum, retrieve the device with type specified by devtype and return the pointer to the object found in *pfilter. More... | |
static int | dshow_get_device_list (AVFormatContext *avctx, AVDeviceInfoList *device_list) |
static int | dshow_should_set_format (AVFormatContext *avctx, enum dshowDeviceType devtype) |
static struct dshow_format_info * | dshow_get_format_info (AM_MEDIA_TYPE *type) |
static void | dshow_get_default_format (IPin *pin, IAMStreamConfig *config, enum dshowDeviceType devtype, AM_MEDIA_TYPE **type) |
static void | dshow_cycle_formats (AVFormatContext *avctx, enum dshowDeviceType devtype, IPin *pin, int *pformat_set) |
Cycle through available formats available from the specified pin, try to set parameters specified through AVOptions, or the pin's default format if no such parameters were set. More... | |
static int | dshow_set_audio_buffer_size (AVFormatContext *avctx, IPin *pin) |
Set audio device buffer size in milliseconds (which can directly impact latency, depending on the device). More... | |
void | ff_dshow_show_filter_properties (IBaseFilter *device_filter, AVFormatContext *avctx) |
Pops up a user dialog allowing them to adjust properties for the given filter, if possible. More... | |
static int | dshow_cycle_pins (AVFormatContext *avctx, enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype, IBaseFilter *device_filter, IPin **ppin) |
Cycle through available pins using the device_filter device, of type devtype, retrieve the first output pin and return the pointer to the object found in *ppin. More... | |
static int | dshow_list_device_options (AVFormatContext *avctx, ICreateDevEnum *devenum, enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype) |
List options for device with type devtype, source filter type sourcetype. More... | |
static int | dshow_open_device (AVFormatContext *avctx, ICreateDevEnum *devenum, enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype) |
static enum AVCodecID | waveform_codec_id (enum AVSampleFormat sample_fmt) |
static enum AVSampleFormat | sample_fmt_bits_per_sample (int bits) |
static int | dshow_add_device (AVFormatContext *avctx, enum dshowDeviceType devtype) |
static int | parse_device_name (AVFormatContext *avctx) |
static int | dshow_read_header (AVFormatContext *avctx) |
static int | dshow_check_event_queue (IMediaEvent *media_event) |
Checks media events from DirectShow and returns -1 on error or EOF. More... | |
static int | dshow_read_packet (AVFormatContext *s, AVPacket *pkt) |
Variables | |
static const AVOption | options [] |
static const AVClass | dshow_class |
const FFInputFormat | ff_dshow_demuxer |
#define DEC AV_OPT_FLAG_DECODING_PARAM |
|
static |
Definition at line 60 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 83 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 107 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 131 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 168 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 223 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 239 of file dshow.c.
Referenced by dshow_read_header().
|
static |
Definition at line 313 of file dshow.c.
Referenced by dshow_cycle_pins().
|
static |
Definition at line 323 of file dshow.c.
Referenced by callback().
|
static |
Definition at line 342 of file dshow.c.
Referenced by av_log_set_callback(), av_opt_query_ranges(), dshow_open_device(), ff_dshow_filter_Setup(), libspeex_decode_init(), and parse_atoms().
|
static |
|
static |
Cycle through available devices using the device enumerator devenum, retrieve the device with type specified by devtype and return the pointer to the object found in *pfilter.
If pfilter is NULL, list all device names. If device_list is not NULL, populate it with found devices instead of outputting device names to log
Definition at line 463 of file dshow.c.
Referenced by dshow_get_device_list(), dshow_list_device_options(), dshow_open_device(), and dshow_read_header().
|
static |
|
static |
Definition at line 661 of file dshow.c.
Referenced by dshow_cycle_formats(), and dshow_cycle_pins().
|
static |
Definition at line 693 of file dshow.c.
Referenced by dshow_add_device(), and dshow_cycle_formats().
|
static |
Definition at line 762 of file dshow.c.
Referenced by dshow_cycle_formats().
|
static |
Cycle through available formats available from the specified pin, try to set parameters specified through AVOptions, or the pin's default format if no such parameters were set.
If successful, return 1 in *pformat_set. If pformat_set is NULL, list all pin capabilities.
If we should open the device with the default format, then:
Definition at line 795 of file dshow.c.
Referenced by dshow_cycle_pins().
|
static |
Set audio device buffer size in milliseconds (which can directly impact latency, depending on the device).
Definition at line 1079 of file dshow.c.
Referenced by dshow_cycle_pins().
void ff_dshow_show_filter_properties | ( | IBaseFilter * | device_filter, |
AVFormatContext * | avctx | ||
) |
Pops up a user dialog allowing them to adjust properties for the given filter, if possible.
Definition at line 1123 of file dshow.c.
Referenced by dshow_cycle_pins(), and ff_dshow_try_setup_crossbar_options().
|
static |
Cycle through available pins using the device_filter device, of type devtype, retrieve the first output pin and return the pointer to the object found in *ppin.
If ppin is NULL, cycle through all pins listing audio/video capabilities.
Definition at line 1173 of file dshow.c.
Referenced by dshow_list_device_options(), and dshow_open_device().
|
static |
List options for device with type devtype, source filter type sourcetype.
devenum | device enumerator used for accessing the device |
Definition at line 1300 of file dshow.c.
Referenced by dshow_read_header().
|
static |
Definition at line 1318 of file dshow.c.
Referenced by dshow_read_header().
|
static |
Definition at line 1507 of file dshow.c.
Referenced by dshow_add_device().
|
static |
Definition at line 1517 of file dshow.c.
Referenced by dshow_add_device().
|
static |
Definition at line 1528 of file dshow.c.
Referenced by dshow_read_header().
|
static |
Definition at line 1642 of file dshow.c.
Referenced by dshow_read_header().
|
static |
|
static |
Checks media events from DirectShow and returns -1 on error or EOF.
Also purges all events that might be in the event queue to stop the trigger of event notification.
Definition at line 1846 of file dshow.c.
Referenced by dshow_read_packet().
|
static |
|
static |
|
static |
const FFInputFormat ff_dshow_demuxer |