Skip to content

Instantly share code, notes, and snippets.

View Sean-Der's full-sized avatar
🙈
Lexi is the love of my life, I love her more then Daisy loves cheese

Sean DuBois Sean-Der

🙈
Lexi is the love of my life, I love her more then Daisy loves cheese
View GitHub Profile
Build complete.
Don't forget to run 'make test'.
=====================================================================
PHP : /usr/local/php70-debug-zts/bin/php
PHP_SAPI : cli
PHP_VERSION : 7.0.0-dev
ZEND_VERSION: 3.0.0-dev
@Sean-Der
Sean-Der / gist:02f1ce7dea34538f3c2c
Created December 27, 2015 07:03
pecl-encryption-gnupg PHP 5.5 test failures
PHP : /usr/local/php55/bin/php
PHP_SAPI : cli
PHP_VERSION : 5.5.31-dev
ZEND_VERSION: 2.5.0
PHP_OS : Linux - Linux php7dev 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64
INI actual : /home/vagrant/src/pecl-encryption-gnupg/tmp-php.ini
More .INIs :
CWD : /home/vagrant/src/pecl-encryption-gnupg
Extra dirs :
VALGRIND : Not used
@Sean-Der
Sean-Der / gist:14d4586f187c207c572f751dd2b20297
Created March 26, 2017 21:22
Janus libmicrohttpd threads
Thread 49 (Thread 0x7fb3c1fe3700 (LWP 62941)):
#0 0x00007fb428495b5d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007fb3fc3d73b7 in ?? () from /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10
#2 0x00007fb42876b6ba in start_thread (arg=0x7fb3c1fe3700) at pthread_create.c:333
#3 0x00007fb4284a182d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 48 (Thread 0x7fb3cc7f8700 (LWP 49268)):
#0 0x00007fb428495b5d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007fb3fc3d73b7 in ?? () from /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10
#2 0x00007fb42876b6ba in start_thread (arg=0x7fb3cc7f8700) at pthread_create.c:333
@Sean-Der
Sean-Der / Dockerfile
Last active February 1, 2023 16:47
GStreamer AV1 Dockerfile and example pipeline
FROM debian:sid
ENV DISPLAY :0
RUN echo 'deb http://mirrors.kernel.org/debian/ sid main contrib non-free\n\
deb-src http://mirrors.kernel.org/debian/ sid main contrib non-free\n'\
>> /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y install git build-essential bison flex cmake
RUN apt-get -y build-dep gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
diff --git a/examples/gstreamer-send/gst/gst.go b/examples/gstreamer-send/gst/gst.go
index 2887df2..20feaaf 100644
--- a/examples/gstreamer-send/gst/gst.go
+++ b/examples/gstreamer-send/gst/gst.go
@@ -39,7 +39,7 @@ func CreatePipeline(codec webrtc.TrackType, in chan<- webrtc.RTCSample) *Pipelin
case webrtc.VP9:
pipelineStr = "videotestsrc ! vp9enc ! " + pipelineStr
case webrtc.H264:
- pipelineStr = "videotestsrc ! x264enc speed-preset=veryfast key-int-max=60 ! video/x-h264,stream-format=byte-stream ! " + pipelineStr
+ pipelineStr = "videotestsrc ! x264enc speed-preset=veryfast key-int-max=2 aud=false ! video/x-h264,profile=baseline ! rtph264pay pt=100 ssrc=2147483647 config-interval=1 ! " + pipelineStr
package main
import (
"bufio"
"encoding/base64"
"fmt"
"io/ioutil"
"math/rand"
"os"
"time"
diff --git a/pkg/ice/agent.go b/pkg/ice/agent.go
index 6c0d0ce..c61a877 100644
--- a/pkg/ice/agent.go
+++ b/pkg/ice/agent.go
@@ -113,8 +113,11 @@ func (a *Agent) Start(isControlling bool, remoteUfrag, remotePwd string) error {
}
func (a *Agent) pingCandidate(local, remote Candidate) {
+ var msg *stun.Message
+ var err error
diff --git a/internal/network/manager.go b/internal/network/manager.go
index f012216..c4a8cff 100644
--- a/internal/network/manager.go
+++ b/internal/network/manager.go
@@ -85,6 +85,9 @@ func NewManager(btg BufferTransportGenerator, dcet DataChannelEventHandler, ntf
// AddURL takes an ICE Url, allocates any state and adds the candidate
func (m *Manager) AddURL(url *ice.URL) error {
+ m.portsLock.Lock()
+ defer m.portsLock.Unlock()
diff --git a/internal/network/port-receive.go b/internal/network/port-receive.go
index 4216a7e..12fdd49 100644
--- a/internal/network/port-receive.go
+++ b/internal/network/port-receive.go
@@ -100,6 +100,7 @@ func (p *port) handleDTLS(raw []byte, srcAddr string) {
}
if len(decrypted) > 0 {
+ fmt.Printf("decrypted %v ", decrypted)
p.handleSCTP(decrypted, p.m.sctpAssociation)
diff --git a/internal/network/port-receive.go b/internal/network/port-receive.go
index 4216a7e..12fdd49 100644
--- a/internal/network/port-receive.go
+++ b/internal/network/port-receive.go
@@ -100,6 +100,7 @@ func (p *port) handleDTLS(raw []byte, srcAddr string) {
}
if len(decrypted) > 0 {
+ fmt.Printf("decrypted %v ", decrypted)
p.handleSCTP(decrypted, p.m.sctpAssociation)