Created
April 1, 2020 05:44
-
-
Save rdp/7a93f34f576a7557e54507630e5ec667 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c | |
index d7f5bd7..afd8cef 100644 | |
--- a/libavdevice/dshow.c | |
+++ b/libavdevice/dshow.c | |
@@ -716,9 +716,9 @@ dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum, | |
if ((r = dshow_cycle_devices(avctx, devenum, devtype, sourcetype, &device_filter, &device_unique_name)) < 0) | |
return r; | |
ctx->device_filter[devtype] = device_filter; | |
+ ctx->device_unique_name[devtype] = device_unique_name; | |
if ((r = dshow_cycle_pins(avctx, devtype, sourcetype, device_filter, NULL)) < 0) | |
return r; | |
- av_freep(&device_unique_name); | |
return 0; | |
} | |
diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h | |
index 475d62b..f8a6ebb 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" | |
@@ -49,6 +49,7 @@ 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__) | |
+ | |
static inline void nothing(void *foo) | |
{ | |
} | |
diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c | |
index 53b1c91..131a794 100644 | |
--- a/libavdevice/dshow_pin.c | |
+++ b/libavdevice/dshow_pin.c | |
@@ -359,9 +359,9 @@ libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample) | |
ctx = s->priv_data; | |
index = pin->filter->stream_index; | |
- av_log(NULL, AV_LOG_VERBOSE, "dshow passing through packet of type %s size %8d " | |
- "timestamp %"PRId64" orig timestamp %"PRId64" graph timestamp %"PRId64" diff %"PRId64" %s\n", | |
- devtypename, buf_size, curtime, orig_curtime, graphtime, graphtime - orig_curtime, ctx->device_name[devtype]); | |
+//av_log(NULL, AV_LOG_VERBOSE, "dshow passing through packet of type %s size %8d " | |
+ // "timestamp %"PRId64" orig timestamp %"PRId64" graph timestamp %"PRId64" diff %"PRId64" %s\n", | |
+ // devtypename, buf_size, curtime, orig_curtime, graphtime, graphtime - orig_curtime, ctx->device_name[devtype]); | |
pin->filter->callback(priv_data, index, buf, buf_size, curtime, devtype); | |
return S_OK; | |
diff --git a/libavutil/internal.h b/libavutil/internal.h | |
index 4acbcf5..caa9faf 100644 | |
--- a/libavutil/internal.h | |
+++ b/libavutil/internal.h | |
@@ -261,7 +261,7 @@ void avpriv_request_sample(void *avc, | |
#define PTRDIFF_SPECIFIER "td" | |
#define SIZE_SPECIFIER "zu" | |
#endif | |
- | |
+#define DEBUG 1 | |
#ifdef DEBUG | |
# define ff_dlog(ctx, ...) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__) | |
#else | |
root@ffmpeg:~/ffmpeg-windows-build-helpers/native_build/sandbox_native/win32/quick_install/ffmpeg_simple# git diff > me.diff | |
root@ffmpeg:~/ffmpeg-windows-build-helpers/native_build/sandbox_native/win32/quick_install/ffmpeg_simple# cat me.diff | |
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c | |
index d7f5bd7..afd8cef 100644 | |
--- a/libavdevice/dshow.c | |
+++ b/libavdevice/dshow.c | |
@@ -716,9 +716,9 @@ dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum, | |
if ((r = dshow_cycle_devices(avctx, devenum, devtype, sourcetype, &device_filter, &device_unique_name)) < 0) | |
return r; | |
ctx->device_filter[devtype] = device_filter; | |
+ ctx->device_unique_name[devtype] = device_unique_name; | |
if ((r = dshow_cycle_pins(avctx, devtype, sourcetype, device_filter, NULL)) < 0) | |
return r; | |
- av_freep(&device_unique_name); | |
return 0; | |
} | |
diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h | |
index 475d62b..f8a6ebb 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" | |
@@ -49,6 +49,7 @@ 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__) | |
+ | |
static inline void nothing(void *foo) | |
{ | |
} | |
diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c | |
index 53b1c91..131a794 100644 | |
--- a/libavdevice/dshow_pin.c | |
+++ b/libavdevice/dshow_pin.c | |
@@ -359,9 +359,9 @@ libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample) | |
ctx = s->priv_data; | |
index = pin->filter->stream_index; | |
- av_log(NULL, AV_LOG_VERBOSE, "dshow passing through packet of type %s size %8d " | |
- "timestamp %"PRId64" orig timestamp %"PRId64" graph timestamp %"PRId64" diff %"PRId64" %s\n", | |
- devtypename, buf_size, curtime, orig_curtime, graphtime, graphtime - orig_curtime, ctx->device_name[devtype]); | |
+//av_log(NULL, AV_LOG_VERBOSE, "dshow passing through packet of type %s size %8d " | |
+ // "timestamp %"PRId64" orig timestamp %"PRId64" graph timestamp %"PRId64" diff %"PRId64" %s\n", | |
+ // devtypename, buf_size, curtime, orig_curtime, graphtime, graphtime - orig_curtime, ctx->device_name[devtype]); | |
pin->filter->callback(priv_data, index, buf, buf_size, curtime, devtype); | |
return S_OK; | |
diff --git a/libavutil/internal.h b/libavutil/internal.h | |
index 4acbcf5..caa9faf 100644 | |
--- a/libavutil/internal.h | |
+++ b/libavutil/internal.h | |
@@ -261,7 +261,7 @@ void avpriv_request_sample(void *avc, | |
#define PTRDIFF_SPECIFIER "td" | |
#define SIZE_SPECIFIER "zu" | |
#endif | |
- | |
+#define DEBUG 1 | |
#ifdef DEBUG | |
# define ff_dlog(ctx, ...) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__) | |
#else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment