<div dir="ltr">Michael,<div><br></div><div>No core file is generated. Can I force one to be generated? How?</div><div><br></div><div>Thanks,</div><div><br></div><div>Guillermo</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 23, 2017 at 8:01 PM, Michael Jerris <span dir="ltr"><<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">can you drop a core file and see where its stuck?<div><div class="h5"><div><br><div><blockquote type="cite"><div>On Jun 23, 2017, at 6:57 PM, Guillermo Ruiz Camauer <<a href="mailto:grcamauer@gmail.com" target="_blank">grcamauer@gmail.com</a>> wrote:</div><br class="m_-9044544942880372702Apple-interchange-newline"><div><div dir="ltr">I have created a small utility program based on fs_encode which will take ALL files in a directory and convert them from .WAV to .G729 and .PCMU formats. The utility is called wavBatchEncode and takes just a directory path as an argument.<div><br></div><div>This program was working very well until I upgraded FreeSwitch. Now the program seems to hang when it tries to write out the first converted files. I have to KILL the program from another terminal. It leaves 2 0 byte files with .PCMU and .G729 extension.</div><div><br></div><div> I have run through a GIT bisect to find where things broke. The last working version is Version 1.6.16 git ae1cdce 2017-04-11.</div><div>The first broken version is <wbr>38621e47bad3b63f03a0a27f6ca9ed<wbr>92f6969032.</div><div><br></div><div>I then used GIT DIFF to see if I could see what had happened. There are very few modifications between these two commits:</div><div><br></div><div><div>root@fs3:/usr/src/freeswitch.<wbr>git# git diff ae1cdce 38621e47bad3b63f03a0a27f6ca9ed<wbr>92f6969032</div><div>diff --git a/src/include/switch_module_<wbr>interfaces.h b/src/include/switch_module_<wbr>interfaces.h</div><div>index e0a5c20..7ca027d 100644</div><div>--- a/src/include/switch_module_<wbr>interfaces.h</div><div>+++ b/src/include/switch_module_<wbr>interfaces.h</div><div>@@ -329,6 +329,11 @@ typedef struct switch_mm_s {</div><div> switch_video_profile_t vprofile;</div><div> switch_video_encode_speed_t vencspd;</div><div> uint8_t try_hardware_encoder;</div><div>+ int scale_w;</div><div>+ int scale_h;</div><div>+ switch_img_fmt_t fmt;</div><div>+ char *auth_username;</div><div>+ char *auth_password;</div><div> } switch_mm_t;</div><div> </div><div> /*! an abstract representation of a file handle (some parameters based on compat with libsndfile) */</div><div>diff --git a/src/mod/applications/mod_av/<wbr>avformat.c b/src/mod/applications/mod_av/<wbr>avformat.c</div><div>index b944625..4b92801 100644</div><div>--- a/src/mod/applications/mod_av/<wbr>avformat.c</div><div>+++ b/src/mod/applications/mod_av/<wbr>avformat.c</div><div>@@ -906,7 +906,7 @@ SWITCH_STANDARD_APP(record_av_<wbr>function)</div><div> char codec_str[256];</div><div> const AVCodecDescriptor *desc;</div><div> </div><div>- if (!strncmp(data, "rtmp://", 7)) {</div><div>+ if (!strncmp(data, "rtmp://", 7) || !strncmp(data, "rtsp://", 7)) {</div><div> fmt->video_codec = AV_CODEC_ID_H264;</div><div> fmt->audio_codec = AV_CODEC_ID_AAC;</div><div> }</div><div>@@ -1694,9 +1694,20 @@ static switch_status_t av_file_open(switch_file_<wbr>handle_t *handle, const char *pa</div><div> return SWITCH_STATUS_GENERR;</div><div> } else if (handle->stream_name && (!strcasecmp(handle->stream_<wbr>name, "rtmp") || !strcasecmp(handle->stream_<wbr>name, "youtube"))) {</div><div> format = "flv";</div><div>- switch_snprintf(file, sizeof(file), "<a>rtmp://%s</a>", path);</div><div>+</div><div>+ // meh really silly format for the user / pass libav.....</div><div>+ if (handle->mm.auth_username && handle->mm.auth_password) { </div><div>+ switch_snprintf(file, sizeof(file), "<a>rtmp://%s</a> pubUser=%s pubPasswd=%s flashver=FMLE/3.0", path, handle->mm.auth_username, handle->mm.auth_password);</div><div>+ } else {</div><div>+ switch_snprintf(file, sizeof(file), "<a>rtmp://%s</a>", path);</div><div>+ }</div><div>+</div><div>+ } else if (handle->stream_name && !strcasecmp(handle->stream_<wbr>name, "rtsp")) {</div><div>+ format = "rtsp";</div><div>+ switch_snprintf(file, sizeof(file), "<a>rtsp://%s</a>", path);</div><div> }</div><div> </div><div>+</div><div> ext++;</div><div> </div><div> if ((context = (av_file_context_t *)switch_core_alloc(handle-><wbr>memory_pool, sizeof(av_file_context_t))) == 0) {</div><div>@@ -1783,7 +1794,7 @@ static switch_status_t av_file_open(switch_file_<wbr>handle_t *handle, const char *pa</div><div> if (fmt->video_codec != AV_CODEC_ID_NONE) {</div><div> const AVCodecDescriptor *desc;</div><div> </div><div>- if ((handle->stream_name && (!strcasecmp(handle->stream_<wbr>name, "rtmp") || !strcasecmp(handle->stream_<wbr>name, "youtube")))) {</div><div>+ if ((handle->stream_name && (!strcasecmp(handle->stream_<wbr>name, "rtmp") || !strcasecmp(handle->stream_<wbr>name, "rtsp") || !strcasecmp(handle->stream_<wbr>name, "youtube")))) {</div><div> </div><div> if (fmt->video_codec != AV_CODEC_ID_H264 ) {</div><div> fmt->video_codec = AV_CODEC_ID_H264; // force H264</div><div>@@ -2525,6 +2536,7 @@ SWITCH_MODULE_LOAD_FUNCTION(<wbr>mod_avformat_load)</div><div> </div><div> supported_formats[i++] = "av";</div><div> supported_formats[i++] = "rtmp";</div><div>+ supported_formats[i++] = "rtsp";</div><div> supported_formats[i++] = "mp4";</div><div> supported_formats[i++] = "m4a";</div><div> supported_formats[i++] = "mov";</div><div>diff --git a/src/mod/applications/mod_av/<wbr>mod_av.c b/src/mod/applications/mod_av/<wbr>mod_av.c</div><div>index 3d3bd82..141fcdc 100644</div><div>--- a/src/mod/applications/mod_av/<wbr>mod_av.c</div><div>+++ b/src/mod/applications/mod_av/<wbr>mod_av.c</div><div>@@ -93,7 +93,7 @@ int mod_av_lockmgr_cb(void **m, enum AVLockOp op)</div><div> static void log_callback(void *ptr, int level, const char *fmt, va_list vl)</div><div> {</div><div> switch_log_level_t switch_level = SWITCH_LOG_DEBUG;</div><div>-</div><div>+ return;</div><div> /* naggy messages */</div><div> if (level == AV_LOG_DEBUG || level == AV_LOG_WARNING) return;</div><div> </div><div>diff --git a/src/switch_core_file.c b/src/switch_core_file.c</div><div>index 46ee539..aff9442 100644</div><div>--- a/src/switch_core_file.c</div><div>+++ b/src/switch_core_file.c</div><div>@@ -177,6 +177,14 @@ SWITCH_DECLARE(switch_status_<wbr>t) switch_core_perform_file_open(<wbr>const char *file,</div><div> fh->mm.try_hardware_encoder = switch_true(val);</div><div> }</div><div> </div><div>+ if ((val = switch_event_get_header(fh-><wbr>params, "auth_username"))) {</div><div>+ fh->mm.auth_username = switch_core_strdup(fh->memory_<wbr>pool, val);</div><div>+ }</div><div>+</div><div>+ if ((val = switch_event_get_header(fh-><wbr>params, "auth_password"))) {</div><div>+ fh->mm.auth_password = switch_core_strdup(fh->memory_<wbr>pool, val);</div><div>+ }</div><div>+</div><div> if ((val = switch_event_get_header(fh-><wbr>params, "fps"))) {</div><div> float ftmp = atof(val);</div><div> if (ftmp > 0.0f) {</div><div>(END)</div><div><br></div><div><br></div><div>I believe that it is the changes in switch_core_file.c that break my utility program, but I can't be sure. Just o add some detail, I have a Digium TCE400 card in my system which handles the G729 conversion.</div><div><br></div><div>I have no idea of what those auth_username and auth_password parameters are, but that seems to break things for me. Any idea of what I can do to get things working again?</div><div><br></div><div>I have created a PasteBin with the code of my fs_encode derived utility: <a href="https://pastebin.freeswitch.org/view/a3d64c69" style="font-size:13px;color:rgb(0,136,204);text-decoration-line:none;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif" target="_blank">https://pastebin.<wbr>freeswitch.org/view/a3d64c69</a> It is pretty short.</div><div><br></div></div></div></div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Guillermo Ruiz Camauer<br></div>
</div>