Git Product home page Git Product logo

srtgo's Introduction

PkgGoDev

srtgo

Go bindings for SRT (Secure Reliable Transport), the open source transport technology that optimizes streaming performance across unpredictable networks.

Why srtgo?

The purpose of srtgo is easing the adoption of SRT transport technology. Using Go, with just a few lines of code you can implement an application that sends/receives data with all the benefits of SRT technology: security and reliability, while keeping latency low.

Is this a new implementation of SRT?

No! We are just exposing the great work done by the community in the SRT project as a golang library. All the functionality and implementation still resides in the official SRT project.

Features supported

  • Basic API exposed to easy develop SRT sender/receiver apps
  • Caller and Listener mode
  • Live transport type
  • File transport type
  • Message/Buffer API
  • SRT transport options up to SRT 1.4.1
  • SRT Stats retrieval

Usage

Example of a SRT receiver application:

package main

import (
    "github.com/haivision/srtgo"
    "fmt"
)

func main() {
    options := make(map[string]string)
    options["transtype"] = "file"

    sck := srtgo.NewSrtSocket("0.0.0.0", 8090, options)
    defer sck.Close()
    sck.Listen(1)
    s, _ := sck.Accept()
    defer s.Close()

    buf := make([]byte, 2048)
    for {
        n, _ := s.Read(buf)
        if n == 0 {
            break
        }
        fmt.Println("Received %d bytes", n)
    }
    //....
}

Dependencies

  • srtlib

You can find detailed instructions about how to install srtlib in its README file

gosrt has been developed with srt 1.4.1 as its main target and has been successfully tested in srt 1.3.4 and above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.