36 switch(biCompression) {
64 IMediaControl_Stop(ctx->
control);
65 IMediaControl_Release(ctx->
control);
74 r = IGraphBuilder_EnumFilters(ctx->
graph, &fenum);
77 IEnumFilters_Reset(fenum);
78 while (IEnumFilters_Next(fenum, 1, &f,
NULL) ==
S_OK) {
79 if (IGraphBuilder_RemoveFilter(ctx->
graph, f) ==
S_OK)
80 IEnumFilters_Reset(fenum);
82 IBaseFilter_Release(f);
84 IEnumFilters_Release(fenum);
86 IGraphBuilder_Release(ctx->
graph);
113 CloseHandle(ctx->
mutex);
115 CloseHandle(ctx->
event[0]);
117 CloseHandle(ctx->
event[1]);
135 int l = WideCharToMultiByte(CP_UTF8, 0, w, -1, 0, 0, 0, 0);
138 WideCharToMultiByte(CP_UTF8, 0, w, -1, s, l, 0, 0);
145 static const uint8_t dropscore[] = {62, 75, 87, 100};
148 const char *devtypename = (devtype ==
VideoDevice) ?
"video" :
"audio";
152 "real-time buffer [%s] [%s input] too full or near too full (%d%% of size: %d [rtbufsize parameter])! frame dropped!\n",
169 WaitForSingleObject(ctx->
mutex, INFINITE);
184 pktl_next->
pkt.
pts = time;
185 memcpy(pktl_next->
pkt.
data, buf, buf_size);
187 for(ppktl = &ctx->
pktl ; *ppktl ; ppktl = &(*ppktl)->
next);
191 SetEvent(ctx->
event[1]);
192 ReleaseMutex(ctx->
mutex);
196 ReleaseMutex(ctx->
mutex);
212 IEnumMoniker *classenum =
NULL;
219 const GUID *device_guid[2] = { &CLSID_VideoInputDeviceCategory,
220 &CLSID_AudioInputDeviceCategory };
221 const char *devtypename = (devtype ==
VideoDevice) ?
"video" :
"audio only";
222 const char *sourcetypename = (sourcetype ==
VideoSourceDevice) ?
"video" :
"audio";
224 r = ICreateDevEnum_CreateClassEnumerator(devenum, device_guid[sourcetype],
225 (IEnumMoniker **) &classenum, 0);
233 IPropertyBag *bag =
NULL;
234 char *friendly_name =
NULL;
235 char *unique_name =
NULL;
237 IBindCtx *bind_ctx =
NULL;
239 LPMALLOC co_malloc =
NULL;
242 r = CoGetMalloc(1, &co_malloc);
245 r = CreateBindCtx(0, &bind_ctx);
249 r = IMoniker_GetDisplayName(
m, bind_ctx,
NULL, &olestr);
254 for (i = 0; i < strlen(unique_name); i++) {
255 if (unique_name[i] ==
':')
256 unique_name[i] =
'_';
259 r = IMoniker_BindToStorage(
m, 0, 0, &IID_IPropertyBag, (
void *) &bag);
264 r = IPropertyBag_Read(bag,
L"FriendlyName", &var,
NULL);
274 r = IMoniker_BindToObject(
m, 0, 0, &IID_IBaseFilter, (
void *) &
device_filter);
286 if (olestr && co_malloc)
287 IMalloc_Free(co_malloc, olestr);
289 IBindCtx_Release(bind_ctx);
293 IPropertyBag_Release(bag);
297 IEnumMoniker_Release(classenum);
301 av_log(avctx,
AV_LOG_ERROR,
"Could not find %s device with name [%s] among source devices of type %s.\n",
319 IPin *pin,
int *pformat_set)
328 if (IPin_QueryInterface(pin, &IID_IAMStreamConfig, (
void **) &config) !=
S_OK)
330 if (IAMStreamConfig_GetNumberOfCapabilities(config, &n, &size) !=
S_OK)
337 for (i = 0; i < n && !format_set; i++) {
338 r = IAMStreamConfig_GetStreamCaps(config, i, &type, (
void *) caps);
346 VIDEO_STREAM_CONFIG_CAPS *vcaps = caps;
347 BITMAPINFOHEADER *bih;
353 if (IsEqualGUID(&type->formattype, &FORMAT_VideoInfo)) {
354 VIDEOINFOHEADER *v = (
void *) type->pbFormat;
355 fr = &v->AvgTimePerFrame;
357 }
else if (IsEqualGUID(&type->formattype, &FORMAT_VideoInfo2)) {
358 VIDEOINFOHEADER2 *v = (
void *) type->pbFormat;
359 fr = &v->AvgTimePerFrame;
370 av_log(avctx,
AV_LOG_INFO,
" unknown compression type 0x%X", (
int) bih->biCompression);
378 vcaps->MinOutputSize.cx, vcaps->MinOutputSize.cy,
379 1e7 / vcaps->MaxFrameInterval,
380 vcaps->MaxOutputSize.cx, vcaps->MaxOutputSize.cy,
381 1e7 / vcaps->MinFrameInterval);
395 if (framerate > vcaps->MaxFrameInterval ||
396 framerate < vcaps->MinFrameInterval)
410 AUDIO_STREAM_CONFIG_CAPS *acaps = caps;
415 if (IsEqualGUID(&type->formattype, &FORMAT_WaveFormatEx)) {
416 fx = (
void *) type->pbFormat;
421 av_log(avctx,
AV_LOG_INFO,
" min ch=%lu bits=%lu rate=%6lu max ch=%lu bits=%lu rate=%6lu\n",
422 acaps->MinimumChannels, acaps->MinimumBitsPerSample, acaps->MinimumSampleFrequency,
423 acaps->MaximumChannels, acaps->MaximumBitsPerSample, acaps->MaximumSampleFrequency);
427 if (ctx->
sample_rate > acaps->MaximumSampleFrequency ||
433 if (ctx->
sample_size > acaps->MaximumBitsPerSample ||
439 if (ctx->
channels > acaps->MaximumChannels ||
440 ctx->
channels < acaps->MinimumChannels)
445 if (IAMStreamConfig_SetFormat(config, type) !=
S_OK)
450 CoTaskMemFree(type->pbFormat);
454 IAMStreamConfig_Release(config);
457 *pformat_set = format_set;
468 IAMBufferNegotiation *buffer_negotiation =
NULL;
469 ALLOCATOR_PROPERTIES props = { -1, -1, -1, -1 };
474 if (IPin_QueryInterface(pin, &IID_IAMStreamConfig, (
void **) &config) !=
S_OK)
476 if (IAMStreamConfig_GetFormat(config, &type) !=
S_OK)
478 if (!IsEqualGUID(&type->formattype, &FORMAT_WaveFormatEx))
481 props.cbBuffer = (((WAVEFORMATEX *) type->pbFormat)->nAvgBytesPerSec)
484 if (IPin_QueryInterface(pin, &IID_IAMBufferNegotiation, (
void **) &buffer_negotiation) !=
S_OK)
486 if (IAMBufferNegotiation_SuggestAllocatorProperties(buffer_negotiation, &props) !=
S_OK)
492 if (buffer_negotiation)
493 IAMBufferNegotiation_Release(buffer_negotiation);
496 CoTaskMemFree(type->pbFormat);
500 IAMStreamConfig_Release(config);
510 ISpecifyPropertyPages *property_pages =
NULL;
511 IUnknown *device_filter_iunknown =
NULL;
513 FILTER_INFO filter_info = {0};
514 CAUUID ca_guid = {0};
516 hr = IBaseFilter_QueryInterface(device_filter, &IID_ISpecifyPropertyPages, (
void **)&property_pages);
521 hr = IBaseFilter_QueryFilterInfo(device_filter, &filter_info);
525 hr = IBaseFilter_QueryInterface(device_filter, &IID_IUnknown, (
void **)&device_filter_iunknown);
529 hr = ISpecifyPropertyPages_GetPages(property_pages, &ca_guid);
533 hr = OleCreatePropertyFrame(
NULL, 0, 0, filter_info.achName, 1, &device_filter_iunknown, ca_guid.cElems,
534 ca_guid.pElems, 0, 0,
NULL);
543 ISpecifyPropertyPages_Release(property_pages);
544 if (device_filter_iunknown)
545 IUnknown_Release(device_filter_iunknown);
546 if (filter_info.pGraph)
547 IFilterGraph_Release(filter_info.pGraph);
549 CoTaskMemFree(ca_guid.pElems);
568 const GUID *mediatype[2] = { &MEDIATYPE_Video, &MEDIATYPE_Audio };
569 const char *devtypename = (devtype ==
VideoDevice) ?
"video" :
"audio only";
570 const char *sourcetypename = (sourcetype ==
VideoSourceDevice) ?
"video" :
"audio";
580 if (should_show_properties)
583 r = IBaseFilter_EnumPins(device_filter, &pins);
591 devtypename, sourcetypename);
594 while (!device_pin && IEnumPins_Next(pins, 1, &pin,
NULL) ==
S_OK) {
595 IKsPropertySet *p =
NULL;
596 IEnumMediaTypes *types =
NULL;
601 char *name_buf =
NULL;
602 wchar_t *pin_id =
NULL;
603 char *pin_buf =
NULL;
606 IPin_QueryPinInfo(pin, &info);
607 IBaseFilter_Release(info.pFilter);
609 if (info.dir != PINDIR_OUTPUT)
611 if (IPin_QueryInterface(pin, &IID_IKsPropertySet, (
void **) &p) !=
S_OK)
613 if (IKsPropertySet_Get(p, &ROPSETID_Pin, AMPROPERTY_PIN_CATEGORY,
616 if (!IsEqualGUID(&category, &PIN_CATEGORY_CAPTURE))
620 r = IPin_QueryId(pin, &pin_id);
628 av_log(avctx,
AV_LOG_INFO,
" Pin \"%s\" (alternative pin name \"%s\")\n", name_buf, pin_buf);
633 if (desired_pin_name) {
634 if(strcmp(name_buf, desired_pin_name) && strcmp(pin_buf, desired_pin_name)) {
636 name_buf, pin_buf, desired_pin_name);
653 if (IPin_EnumMediaTypes(pin, &types) !=
S_OK)
656 IEnumMediaTypes_Reset(types);
658 while (!device_pin && IEnumMediaTypes_Next(types, 1, &type,
NULL) ==
S_OK) {
659 if (IsEqualGUID(&type->majortype, mediatype[devtype])) {
669 IEnumMediaTypes_Release(types);
671 IKsPropertySet_Release(p);
672 if (device_pin != pin)
677 CoTaskMemFree(pin_id);
680 IEnumPins_Release(pins);
683 if (set_format && !format_set) {
689 "Could not find output pin from %s capture device.\n", devtypename);
730 ICaptureGraphBuilder2 *graph_builder2 =
NULL;
733 IStream *ifile_stream =
NULL;
734 IStream *ofile_stream =
NULL;
735 IPersistStream *pers_stream =
NULL;
737 const wchar_t *filter_name[2] = {
L"Audio capture filter",
L"Video capture filter" };
743 char *filename =
NULL;
750 hr = SHCreateStreamOnFile ((
LPCSTR) filename, STGM_READ, &ifile_stream);
756 hr = OleLoadFromStream(ifile_stream, &IID_IBaseFilter, (
void **) &device_filter);
766 av_log(avctx,
AV_LOG_INFO,
"Capture filter loaded successfully from file \"%s\".\n", filename);
777 r = IGraphBuilder_AddFilter(graph, device_filter,
NULL);
783 if ((r =
dshow_cycle_pins(avctx, devtype, sourcetype, device_filter, &device_pin)) < 0) {
791 if (!capture_filter) {
801 char *filename =
NULL;
808 hr = SHCreateStreamOnFile ((
LPCSTR) filename, STGM_CREATE | STGM_READWRITE, &ofile_stream);
814 hr = IBaseFilter_QueryInterface(device_filter, &IID_IPersistStream, (
void **) &pers_stream);
820 hr = OleSaveToStream(pers_stream, ofile_stream);
826 hr = IStream_Commit(ofile_stream, STGC_DEFAULT);
836 av_log(avctx,
AV_LOG_INFO,
"Capture filter saved successfully to file \"%s\".\n", filename);
839 r = IGraphBuilder_AddFilter(graph, (IBaseFilter *) capture_filter,
840 filter_name[devtype]);
847 capture_pin = capture_filter->
pin;
850 r = CoCreateInstance(&CLSID_CaptureGraphBuilder2,
NULL, CLSCTX_INPROC_SERVER,
851 &IID_ICaptureGraphBuilder2, (
void **) &graph_builder2);
856 ICaptureGraphBuilder2_SetFiltergraph(graph_builder2, graph);
862 r = ICaptureGraphBuilder2_RenderStream(graph_builder2,
NULL,
NULL, (IUnknown *) device_pin,
NULL ,
863 (IBaseFilter *) capture_filter);
880 if (graph_builder2 !=
NULL)
881 ICaptureGraphBuilder2_Release(graph_builder2);
884 IPersistStream_Release(pers_stream);
887 IStream_Release(ifile_stream);
890 IStream_Release(ofile_stream);
897 switch (sample_fmt) {
938 BITMAPINFOHEADER *bih =
NULL;
941 if (IsEqualGUID(&type.formattype, &FORMAT_VideoInfo)) {
942 VIDEOINFOHEADER *v = (
void *) type.pbFormat;
943 time_base = (
AVRational) { v->AvgTimePerFrame, 10000000 };
945 }
else if (IsEqualGUID(&type.formattype, &FORMAT_VideoInfo2)) {
946 VIDEOINFOHEADER2 *v = (
void *) type.pbFormat;
947 time_base = (
AVRational) { v->AvgTimePerFrame, 10000000 };
957 codec->
width = bih->biWidth;
958 codec->
height = bih->biHeight;
961 if (bih->biCompression ==
MKTAG(
'H',
'D',
'Y',
'C')) {
970 "Please report type 0x%X.\n", (
int) bih->biCompression);
976 if (bih->biCompression == BI_RGB || bih->biCompression == BI_BITFIELDS) {
986 WAVEFORMATEX *fx =
NULL;
988 if (IsEqualGUID(&type.formattype, &FORMAT_WaveFormatEx)) {
989 fx = (
void *) type.pbFormat;
1020 while ((type = strtok(tmp,
"="))) {
1021 char *token = strtok(
NULL,
":");
1024 if (!strcmp(type,
"video")) {
1025 device_name[0] = token;
1026 }
else if (!strcmp(type,
"audio")) {
1027 device_name[1] = token;
1029 device_name[0] =
NULL;
1030 device_name[1] =
NULL;
1035 if (!device_name[0] && !device_name[1]) {
1039 device_name[0] =
av_strdup(device_name[0]);
1041 device_name[1] =
av_strdup(device_name[1]);
1052 ICreateDevEnum *devenum =
NULL;
1055 HANDLE media_event_handle;
1072 "video codec is not set or set to rawvideo\n");
1085 r = CoCreateInstance(&CLSID_FilterGraph,
NULL, CLSCTX_INPROC_SERVER,
1086 &IID_IGraphBuilder, (
void **) &graph);
1093 r = CoCreateInstance(&CLSID_SystemDeviceEnum,
NULL, CLSCTX_INPROC_SERVER,
1094 &IID_ICreateDevEnum, (
void **) &devenum);
1101 av_log(avctx,
AV_LOG_INFO,
"DirectShow video devices (some may be both video and audio devices)\n");
1156 if (!ctx->
event[1]) {
1161 r = IGraphBuilder_QueryInterface(graph, &IID_IMediaControl, (
void **) &control);
1168 r = IGraphBuilder_QueryInterface(graph, &IID_IMediaEvent, (
void **) &media_event);
1175 r = IMediaEvent_GetEventHandle(media_event, (
void *) &media_event_handle);
1180 proc = GetCurrentProcess();
1181 r = DuplicateHandle(proc, media_event_handle, proc, &ctx->
event[0],
1182 0, 0, DUPLICATE_SAME_ACCESS);
1188 r = IMediaControl_Run(control);
1191 r = IMediaControl_GetState(control, 0, &pfs);
1194 av_log(avctx,
AV_LOG_ERROR,
"Could not run graph (sometimes caused by a device already in use by other application)\n");
1203 ICreateDevEnum_Release(devenum);
1222 while (IMediaEvent_GetEvent(media_event, &code, &p1, &p2, 0) != E_ABORT) {
1223 if (code == EC_COMPLETE || code ==
EC_DEVICE_LOST || code == EC_ERRORABORT)
1225 IMediaEvent_FreeEventParams(media_event, code, p1, p2);
1236 while (!ctx->
eof && !pktl) {
1237 WaitForSingleObject(ctx->
mutex, INFINITE);
1245 ResetEvent(ctx->
event[1]);
1246 ReleaseMutex(ctx->
mutex);
1253 WaitForMultipleObjects(2, ctx->
event, 0, INFINITE);
1261 #define OFFSET(x) offsetof(struct dshow_ctx, x)
1262 #define DEC AV_OPT_FLAG_DECODING_PARAM
1303 .priv_data_size =
sizeof(
struct dshow_ctx),
void 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...
static enum AVPixelFormat pix_fmt
int av_parse_video_rate(AVRational *rate, const char *arg)
Parse str and store the detected values in *rate.
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 outp...
char * audio_filter_load_file
void ff_print_VIDEO_STREAM_CONFIG_CAPS(const VIDEO_STREAM_CONFIG_CAPS *caps)
#define AV_LOG_WARNING
Something somehow does not look correct.
#define LIBAVUTIL_VERSION_INT
static enum AVSampleFormat sample_fmt_bits_per_sample(int bits)
unsigned int max_picture_buffer
Maximum amount of memory in bytes to use for buffering frames obtained from realtime capture devices...
HRESULT 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...
static FFServerConfig config
AVInputFormat ff_dshow_demuxer
unsigned long WINAPI libAVPin_Release(libAVPin *)
enum AVColorRange color_range
MPEG vs JPEG YUV range.
IMediaEvent * media_event
int index
stream index in AVFormatContext
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int dshow_add_device(AVFormatContext *avctx, enum dshowDeviceType devtype)
char * video_filter_load_file
enum AVCodecID video_codec_id
int show_analog_tv_tuner_audio_dialog
packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in ...
int show_audio_crossbar_connection_dialog
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
IBaseFilter * device_filter[2]
enum AVSampleFormat sample_fmt
audio sample format
const struct AVCodecTag * avformat_get_riff_video_tags(void)
static int dshow_read_close(AVFormatContext *s)
enum AVCodecID av_codec_get_id(const struct AVCodecTag *const *tags, unsigned int tag)
Get the AVCodecID for the given codec tag tag.
static int dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum, enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype)
static av_cold int end(AVCodecContext *avctx)
libAVFilter * libAVFilter_Create(void *, void *, enum dshowDeviceType)
char * video_filter_save_file
int id
Format-specific stream ID.
static void dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype, IPin *pin, int *pformat_set)
Cycle through available formats using the specified pin, try to set parameters specified through AVOp...
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
int flags
Flags modifying the (de)muxer behaviour.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
enum AVCodecID video_codec_id
Forced video codec_id.
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
static const AVOption options[]
Main libavdevice API header.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVCodecID
Identify the syntax and semantics of the bitstream.
libAVPin * capture_pin[2]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
const char * name
Name of the codec implementation.
unsigned long WINAPI libAVPin_AddRef(libAVPin *)
AVCodecContext * codec
Codec context associated with this stream.
static int shall_we_drop(AVFormatContext *s, int index, enum dshowDeviceType devtype)
static char * dup_wchar_to_utf8(wchar_t *w)
static const AVClass dshow_class
static void callback(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType devtype)
char filename[1024]
input or output filename
static int parse_device_name(AVFormatContext *avctx)
void ff_print_AUDIO_STREAM_CONFIG_CAPS(const AUDIO_STREAM_CONFIG_CAPS *caps)
int width
picture width / height.
static int dshow_read_header(AVFormatContext *avctx)
AVRational requested_framerate
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
char * audio_filter_save_file
packed RGB 8:8:8, 24bpp, BGRBGR...
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
#define FF_ARRAY_ELEMS(a)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc)
#define AV_LOG_INFO
Standard information.
static int set_format(void *obj, const char *name, int fmt, int search_flags, enum AVOptionType type, const char *desc, int nb_fmts)
enum AVMediaType codec_type
AVSampleFormat
Audio sample formats.
char * av_strdup(const char *s)
Duplicate the string s.
int sample_rate
samples per second
main external API structure.
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
static enum AVCodecID waveform_codec_id(enum AVSampleFormat sample_fmt)
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
static enum AVPixelFormat dshow_pixfmt(DWORD biCompression, WORD biBitCount)
Describe the class of an AVClass context structure.
enum AVPixelFormat pixel_format
rational number numerator/denominator
int show_audio_device_dialog
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 dev...
int show_video_device_dialog
offset must point to two consecutive integers
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.
int crossbar_audio_input_pin_number
the normal 219*2^(n-8) "MPEG" YUV ranges
unsigned long WINAPI libAVFilter_Release(libAVFilter *)
libAVFilter * capture_filter[2]
struct AVPacketList * next
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
long WINAPI libAVPin_ConnectionMediaType(libAVPin *, AM_MEDIA_TYPE *)
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
#define AV_PIX_FMT_RGB555
static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt)
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int crossbar_video_input_pin_number
int channels
number of audio channels
void * priv_data
Format private data.
const struct PixelFormatTag * avpriv_get_raw_pix_fmt_tags(void)
void ff_print_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *type)
static int dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum, enum dshowDeviceType devtype, enum dshowSourceFilterType sourcetype, IBaseFilter **pfilter)
Cycle through available devices using the device enumerator devenum, retrieve the device with type sp...
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
int show_video_crossbar_connection_dialog
static int dshow_check_event_queue(IMediaEvent *media_event)
Checks media events from DirectShow and returns -1 on error or EOF.
#define MKTAG(a, b, c, d)
unsigned int video_frame_num
AVPixelFormat
Pixel format.
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int show_analog_tv_tuner_dialog
#define AV_PIX_FMT_0RGB32