]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_openh264, mod_av] add avcodec and openh264 debug
authorwangxiaoli <wangxiaoli@x-y-t.cn>
Thu, 11 Apr 2019 09:09:52 +0000 (17:09 +0800)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:00:13 +0000 (22:00 +0300)
src/mod/applications/mod_av/avcodec.c
src/mod/codecs/mod_openh264/mod_openh264.cpp

index 01c862cf1127e30afebe279caf389cd5259d8c13..827df4df6b39f351671ab3ca48f48d14fedb10d0 100644 (file)
@@ -1764,6 +1764,12 @@ static switch_status_t switch_h264_control(switch_codec_t *codec,
        h264_codec_context_t *context = (h264_codec_context_t *)codec->private_info;
 
        switch(cmd) {
+       case SCC_DEBUG:
+               {
+                       int32_t level = *((uint32_t *) cmd_data);
+                       mod_av_globals.debug = level;
+               }
+               break;
        case SCC_VIDEO_GEN_KEYFRAME:
                context->need_key_frame = 1;
                break;
index 8770a718182a2ac41db6e052846a0310cbec4739..be92f63b7ff51c77e7f1f3c730bd60f82b1e1959 100644 (file)
@@ -77,6 +77,7 @@ typedef struct h264_codec_context_s {
        switch_bool_t last_received_complete_picture;
        switch_codec_settings_t codec_settings;
        unsigned int bandwidth;
+       int32_t debug;
 } h264_codec_context_t;
 
 int FillSpecificParameters(h264_codec_context_t *context) {
@@ -745,6 +746,12 @@ static switch_status_t switch_h264_control(switch_codec_t *codec,
        h264_codec_context_t *context = (h264_codec_context_t *)codec->private_info;
 
        switch(cmd) {
+               case SCC_DEBUG:
+               {
+                       int32_t level = *((uint32_t *) cmd_data);
+                       context->debug = level;
+               }
+               break;
        case SCC_VIDEO_GEN_KEYFRAME:
                context->need_key_frame = 1;
                break;