fix examples

This commit is contained in:
Eric Tang
2017-12-02 22:11:10 -05:00
parent 4a9f1df22f
commit 19ec196131
2 changed files with 13 additions and 2 deletions
+6 -1
View File
@@ -9,6 +9,7 @@ import (
"fmt"
"math/rand"
"net/url"
"os"
"regexp"
"strings"
"time"
@@ -57,7 +58,11 @@ func main() {
flag.Set("logtostderr", "true")
flag.Parse()
lpms := core.New("1935", "8000", "", "")
dir, err := os.Getwd()
if err != nil {
glog.Infof("Error getting work directory: %v", err)
}
lpms := core.New("1935", "8000", "", "", fmt.Sprintf("%v/.tmp", dir))
//Streams needed for transcoding:
var rtmpStrm stream.RTMPVideoStream
+7 -1
View File
@@ -3,8 +3,10 @@ package main
import (
"context"
"flag"
"fmt"
"io"
"net/url"
"os"
"strings"
"time"
@@ -250,7 +252,11 @@ func main() {
flag.Set("logtostderr", "true")
flag.Parse()
lpms := core.New("1935", "8000", "", "")
dir, err := os.Getwd()
if err != nil {
glog.Infof("Error getting work directory: %v", err)
}
lpms := core.New("1935", "8000", "", "", fmt.Sprintf("%v/.tmp", dir))
lpms.HandleRTMPPublish(
//makeStreamID