Skip to content

Instantly share code, notes, and snippets.

@rdp
Created August 15, 2016 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdp/b3d080d126b341f08b112f06489a6b25 to your computer and use it in GitHub Desktop.
Save rdp/b3d080d126b341f08b112f06489a6b25 to your computer and use it in GitHub Desktop.
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index f2453e6..6bc49b8 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -1206,16 +1206,20 @@ static int dshow_read_header(AVFormatContext *avctx)
goto error;
}
+ printf("here1\n");
r = IMediaControl_Run(control);
+ printf("here2 %d (0 is OK Ithink)\n", r);
if (r == S_FALSE) {
+ printf("here2.5\n");
OAFilterState pfs;
r = IMediaControl_GetState(control, 0, &pfs);
}
if (r != S_OK) {
+ printf("here2.75\n");
av_log(avctx, AV_LOG_ERROR, "Could not run graph (sometimes caused by a device already in use by other application)\n");
goto error;
}
-
+printf("her3\n");
ret = 0;
error:
diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h
index 475d62b..8baea77 100644
--- a/libavdevice/dshow_capture.h
+++ b/libavdevice/dshow_capture.h
@@ -22,7 +22,7 @@
#ifndef AVDEVICE_DSHOW_CAPTURE_H
#define AVDEVICE_DSHOW_CAPTURE_H
-#define DSHOWDEBUG 0
+#define DSHOWDEBUG 1
#include "avdevice.h"
@@ -47,7 +47,7 @@ void ff_print_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *type);
void ff_printGUID(const GUID *g);
extern const AVClass *ff_dshow_context_class_ptr;
-#define dshowdebug(...) ff_dlog(&ff_dshow_context_class_ptr, __VA_ARGS__)
+#define dshowdebug(...) av_log(&ff_dshow_context_class_ptr, AV_LOG_DEBUG, __VA_ARGS__)
static inline void nothing(void *foo)
{
diff --git a/libavdevice/dshow_filter.c b/libavdevice/dshow_filter.c
index 7360adc..6047f06 100644
--- a/libavdevice/dshow_filter.c
+++ b/libavdevice/dshow_filter.c
@@ -153,11 +153,12 @@ libAVFilter_JoinFilterGraph(libAVFilter *this, IFilterGraph *graph,
long WINAPI
libAVFilter_QueryVendorInfo(libAVFilter *this, wchar_t **info)
{
- dshowdebug("libAVFilter_QueryVendorInfo(%p)\n", this);
+ dshowdebug("libAVFilter_QueryVendorInfo(%p) not impl\n", this);
+ return E_NOTIMPL;
if (!info)
return E_POINTER;
- *info = wcsdup(L"libAV");
+ *info = NULL;//wcsdup(L"libAV");
return S_OK;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment