Skip to content

Instantly share code, notes, and snippets.

Seven Du seven1240

Block or report user

Report or block seven1240

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bestTrace crash
Process: BestTrace [84000]
Path: /Applications/BestTrace.app/Contents/MacOS/BestTrace
Identifier: net.ipip.besttrace4mac
Version: 1.15 (40)
App Item ID: 1037779758
App External ID: 828078264
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: BestTrace [84000]
User ID: 501
View redtitle
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$CJKutf8]{$documentclass$}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\usepackage[top=1in,bottom=1in,left=1.25in,right=1.25in]{geometry}
\usepackage{float}
\usepackage{fontspec}
\newfontfamily\zhfont[BoldFont=STHeiti,ItalicFont=STKaiti]{STFangsong}
\newfontfamily\zhpunctfont{STFangsong}
% \setmainfont{Times New Roman}
View testlog
freeswitch@internal> uuid_debug_audio 0d5cd5dc-2f65-4c66-b620-9f0a80505814 both on
+OK Success
freeswitch@internal> R sofia/internal/790019@115.28.17.157 b=41 115.28.17.157:21844 112.224.67.34:20000 112.224.67.34:41166 pt=103 ts=1821971474 m=0
R sofia/internal/790019@115.28.17.157 b=55 115.28.17.157:21844 112.224.67.34:20000 112.224.67.34:41166 pt=103 ts=1821972434 m=0
R sofia/internal/790019@115.28.17.157 b=56 115.28.17.157:21844 112.224.67.34:20000 112.224.67.34:41166 pt=103 ts=1821973394 m=0
R sofia/internal/790019@115.28.17.157 b=44 115.28.17.157:21844 112.224.67.34:20000 112.224.67.34:41166 pt=103 ts=1821974354 m=0
R sofia/internal/790019@115.28.17.157 b=42 115.28.17.157:21844 112.224.67.34:20000 112.224.67.34:41166 pt=103 ts=1821975314 m=0
R sofia/internal/790019@115.28.17.157 b=40 115.28.17.157:21844 112.224.67.34:20000 112.224.67.34:41166 pt=103 ts=1821976274 m=0
R sofia/internal/790019@115.28.17.157 b=41 115.28.17.157:21844 112.224.67.34:20000 112.224.67.34:41166 pt=103 ts=1821977234 m=0
View video.pl
#!/usr/bin/perl
# apt-get install libxml-simple-perl
use List::Permutor;
use XML::Simple;
use Data::Dumper;
use strict;
use warnings;
require ESL;
View qr.pl
#!/usr/bin/perl
use List::Permutor;
use XML::Simple;
use Data::Dumper;
use strict;
use warnings;
use GD::Barcode::QRcode;
use File::Temp qw/ :mktemp /;
use Barcode::ZBar;
View Makefile.pandoc
BUILD_DIR := gen
# pandoc is a handy tool for converting between numerous text formats:
# http://johnmacfarlane.net/pandoc/installing.html
PANDOC := pandoc
# pandoc options
# Liberation fonts: http://en.wikipedia.org/wiki/Liberation_fonts
PANDOC_PDF_OPTS := --toc --chapters --base-header-level=1 --number-sections --template=virsto_doc.tex --variable mainfont="Liberation Serif" --variable sansfont="Liberation Sans" --variable monofont="Liberation Mono" --variable fontsize=12pt --variable documentclass=book
PANDOC_EBOOK_OPTS := --toc --epub-stylesheet=epub.css --epub-cover-image=cover.jpg --base-header-level=1
View gist:90ea297d5a9dfc570fb2
diff --git a/src/mod/applications/mod_cv/mod_cv.cpp b/src/mod/applications/mod_cv/mod_cv.cpp
index faee56f..f12ad00 100644
--- a/src/mod/applications/mod_cv/mod_cv.cpp
+++ b/src/mod/applications/mod_cv/mod_cv.cpp
@@ -96,7 +96,7 @@ typedef struct cv_context_s {
struct detect_stats nestDetected;
int detect_event;
int nest_detect_event;
- switch_png_t *png;
+ switch_image_t *png;
View stream_to_youtube.sh
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
View gist:8f7d60f4f2ba1bc427dd
diff --git a/src/switch_core_codec.c b/src/switch_core_codec.c
index 8ba521d..e681768 100644
--- a/src/switch_core_codec.c
+++ b/src/switch_core_codec.c
@@ -812,9 +812,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_encode_video(switch_codec_t *c
if (frame->datalen) {
frame->packetlen = frame->datalen + 12;
- frame->flags |= SFF_SAME_IMAGE;
+ // frame->flags |= SFF_SAME_IMAGE;
View gist:26827bf5ccfd85e00142
diff --git a/src/mod/codecs/mod_vpx/mod_vpx.c b/src/mod/codecs/mod_vpx/mod_vpx.c
index ee7f7f6..0e91e7e 100644
--- a/src/mod/codecs/mod_vpx/mod_vpx.c
+++ b/src/mod/codecs/mod_vpx/mod_vpx.c
@@ -409,6 +409,7 @@ static switch_status_t switch_vpx_encode(switch_codec_t *codec, switch_frame_t *
context->encoder.err, context->encoder.err_detail);
frame->datalen = 0;
+ frame->m = 1;
return SWITCH_STATUS_FALSE;
You can’t perform that action at this time.