FFmpeg
|
#include "dshow_capture.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "libavutil/mem.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 AVInputFormat | ff_dshow_demuxer |
#define DEC AV_OPT_FLAG_DECODING_PARAM |
|
static |
Definition at line 59 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 82 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 106 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 130 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 167 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 222 of file dshow.c.
Referenced by dshow_get_format_info().
|
static |
Definition at line 238 of file dshow.c.
Referenced by dshow_read_header().
|
static |
Definition at line 312 of file dshow.c.
Referenced by dshow_cycle_pins().
|
static |
Definition at line 322 of file dshow.c.
Referenced by callback().
|
static |
Definition at line 341 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 462 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 660 of file dshow.c.
Referenced by dshow_cycle_formats(), and dshow_cycle_pins().
|
static |
Definition at line 692 of file dshow.c.
Referenced by dshow_add_device(), and dshow_cycle_formats().
|
static |
Definition at line 761 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 794 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 1078 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 1122 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 1172 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 1299 of file dshow.c.
Referenced by dshow_read_header().
|
static |
Definition at line 1317 of file dshow.c.
Referenced by dshow_read_header().
|
static |
Definition at line 1506 of file dshow.c.
Referenced by dshow_add_device().
|
static |
Definition at line 1516 of file dshow.c.
Referenced by dshow_add_device().
|
static |
Definition at line 1527 of file dshow.c.
Referenced by dshow_read_header().
|
static |
Definition at line 1638 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 1842 of file dshow.c.
Referenced by dshow_read_packet().
|
static |
|
static |
|
static |
const AVInputFormat ff_dshow_demuxer |