Skip to content

Commit

Permalink
MOD:build
Browse files Browse the repository at this point in the history
  • Loading branch information
palfish committed Feb 13, 2019
1 parent 1203140 commit 270f19d
Show file tree
Hide file tree
Showing 45 changed files with 139 additions and 141 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ JOY4 is powerful library written in golang, well-designed interface makes a few

Well-designed and easy-to-use interfaces:

- Muxer / Demuxer ([doc](https://godoc.org/github.com/nareix/joy4/av#Demuxer) [example](https://github.com/nareix/joy4/blob/master/examples/open_probe_file/main.go))
- Audio Decoder ([doc](https://godoc.org/github.com/nareix/joy4/av#AudioDecoder) [example](https://github.com/nareix/joy4/blob/master/examples/audio_decode/main.go))
- Transcoding ([doc](https://godoc.org/github.com/nareix/joy4/av/transcode) [example](https://github.com/nareix/joy4/blob/master/examples/transcode/main.go))
- Streaming server ([example](https://github.com/nareix/joy4/blob/master/examples/http_flv_and_rtmp_server/main.go))
- Muxer / Demuxer ([doc](https://godoc.org/github.com/shawnfeng/joy4/av#Demuxer) [example](https://github.com/shawnfeng/joy4/blob/master/examples/open_probe_file/main.go))
- Audio Decoder ([doc](https://godoc.org/github.com/shawnfeng/joy4/av#AudioDecoder) [example](https://github.com/shawnfeng/joy4/blob/master/examples/audio_decode/main.go))
- Transcoding ([doc](https://godoc.org/github.com/shawnfeng/joy4/av/transcode) [example](https://github.com/shawnfeng/joy4/blob/master/examples/transcode/main.go))
- Streaming server ([example](https://github.com/shawnfeng/joy4/blob/master/examples/http_flv_and_rtmp_server/main.go))

Support container formats:

Expand All @@ -34,31 +34,31 @@ RTMP / HTTP-FLV Server
- High performance


Publisher-subscriber packet buffer queue ([doc](https://godoc.org/github.com/nareix/joy4/av/pubsub))
Publisher-subscriber packet buffer queue ([doc](https://godoc.org/github.com/shawnfeng/joy4/av/pubsub))

- Customize publisher buffer time and subscriber read position


- Multiple channels live streaming ([example](https://github.com/nareix/joy4/blob/master/examples/rtmp_server_channels/main.go))
- Multiple channels live streaming ([example](https://github.com/shawnfeng/joy4/blob/master/examples/rtmp_server_channels/main.go))

Packet filters ([doc](https://godoc.org/github.com/nareix/joy4/av/pktque))
Packet filters ([doc](https://godoc.org/github.com/shawnfeng/joy4/av/pktque))

- Wait first keyframe
- Fix timestamp
- Make A/V sync
- Customize ([example](https://github.com/nareix/joy4/blob/master/examples/rtmp_server_channels/main.go#L19))
- Customize ([example](https://github.com/shawnfeng/joy4/blob/master/examples/rtmp_server_channels/main.go#L19))

FFMPEG Golang-style binding ([doc](https://godoc.org/github.com/nareix/joy4/cgo/ffmpeg))
FFMPEG Golang-style binding ([doc](https://godoc.org/github.com/shawnfeng/joy4/cgo/ffmpeg))
- Audio Encoder / Decoder
- Video Decoder
- Audio Resampler

Support codec and container parsers:

- H264 SPS/PPS/AVCDecoderConfigure parser ([doc](https://godoc.org/github.com/nareix/joy4/codec/h264parser))
- AAC ADTSHeader/MPEG4AudioConfig parser ([doc](https://godoc.org/github.com/nareix/joy4/codec/aacparser))
- MP4 Atoms parser ([doc](https://godoc.org/github.com/nareix/joy4/format/mp4/mp4io))
- FLV AMF0 object parser ([doc](https://godoc.org/github.com/nareix/joy4/format/flv/flvio))
- H264 SPS/PPS/AVCDecoderConfigure parser ([doc](https://godoc.org/github.com/shawnfeng/joy4/codec/h264parser))
- AAC ADTSHeader/MPEG4AudioConfig parser ([doc](https://godoc.org/github.com/shawnfeng/joy4/codec/aacparser))
- MP4 Atoms parser ([doc](https://godoc.org/github.com/shawnfeng/joy4/format/mp4/mp4io))
- FLV AMF0 object parser ([doc](https://godoc.org/github.com/shawnfeng/joy4/format/flv/flvio))

# Requirements

Expand Down
8 changes: 4 additions & 4 deletions av/avconv/avconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"io"
"time"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/pktque"
"github.com/nareix/joy4/av/transcode"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/pktque"
"github.com/shawnfeng/joy4/av/transcode"
)

var Debug bool
Expand Down
2 changes: 1 addition & 1 deletion av/avutil/avutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"fmt"
"bytes"
"github.com/nareix/joy4/av"
"github.com/shawnfeng/joy4/av"
"net/url"
"os"
"path"
Expand Down
2 changes: 1 addition & 1 deletion av/pktque/buf.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pktque

import (
"github.com/nareix/joy4/av"
"github.com/shawnfeng/joy4/av"
)

type Buf struct {
Expand Down
2 changes: 1 addition & 1 deletion av/pktque/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package pktque

import (
"time"
"github.com/nareix/joy4/av"
"github.com/shawnfeng/joy4/av"
)

type Filter interface {
Expand Down
4 changes: 2 additions & 2 deletions av/pubsub/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
package pubsub

import (
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/pktque"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/pktque"
"io"
"sync"
"time"
Expand Down
4 changes: 2 additions & 2 deletions av/transcode/transcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package transcode
import (
"fmt"
"time"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/pktque"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/pktque"
)

var Debug bool
Expand Down
8 changes: 3 additions & 5 deletions cgo/ffmpeg/audio.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ffmpeg

/*
#cgo CFLAGS: -I /data/home/chenxl/ffmpeg_build/include
#cgo LDFLAGS: -L /data/home/chenxl/ffmpeg_build/lib -lm -lavformat -lavcodec -lswscale -lavutil -lavfilter -lswresample -lavdevice -lpostproc -lz -lx264 -lbz2 -lva -lrt -lfdk-aac
#include "ffmpeg.h"
int wrap_avcodec_decode_audio4(AVCodecContext *ctx, AVFrame *frame, void *data, int size, int *got) {
struct AVPacket pkt = {.data = data, .size = size};
Expand All @@ -15,9 +13,9 @@ int wrap_avresample_convert(AVAudioResampleContext *avr, int *out, int outsize,
import "C"
import (
"fmt"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/codec/aacparser"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/codec/aacparser"
"runtime"
"time"
"unsafe"
Expand Down
4 changes: 2 additions & 2 deletions cgo/ffmpeg/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"fmt"
"image"
"reflect"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/codec/h264parser"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/codec/h264parser"
)

type VideoDecoder struct {
Expand Down
4 changes: 2 additions & 2 deletions codec/aacparser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package aacparser
import (
"bytes"
"fmt"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/utils/bits"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/utils/bits"
"io"
"time"
)
Expand Down
4 changes: 2 additions & 2 deletions codec/codec.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package codec

import (
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/codec/fake"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/codec/fake"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion codec/fake/fake.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fake

import (
"github.com/nareix/joy4/av"
"github.com/shawnfeng/joy4/av"
)

type CodecData struct {
Expand Down
6 changes: 3 additions & 3 deletions codec/h264parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
package h264parser

import (
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/utils/bits"
"github.com/nareix/joy4/utils/bits/pio"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/utils/bits"
"github.com/shawnfeng/joy4/utils/bits/pio"
"fmt"
"bytes"
)
Expand Down
8 changes: 4 additions & 4 deletions examples/audio_decode/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
package main

import (
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/format"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/cgo/ffmpeg"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/format"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/cgo/ffmpeg"
)

// need ffmpeg installed
Expand Down
10 changes: 5 additions & 5 deletions examples/http_flv_and_rtmp_server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"sync"
"io"
"net/http"
"github.com/nareix/joy4/format"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/av/pubsub"
"github.com/nareix/joy4/format/rtmp"
"github.com/nareix/joy4/format/flv"
"github.com/shawnfeng/joy4/format"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/av/pubsub"
"github.com/shawnfeng/joy4/format/rtmp"
"github.com/shawnfeng/joy4/format/flv"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions examples/open_probe_file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package main

import (
"fmt"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/format"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/format"
)

func init() {
Expand Down
Binary file modified examples/open_probe_file/open_probe_file
Binary file not shown.
8 changes: 4 additions & 4 deletions examples/rtmp_publish/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"github.com/nareix/joy4/av/pktque"
"github.com/nareix/joy4/format"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/format/rtmp"
"github.com/shawnfeng/joy4/av/pktque"
"github.com/shawnfeng/joy4/format"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/format/rtmp"
)

func init() {
Expand Down
Binary file modified examples/rtmp_publish/rtmp_publish
Binary file not shown.
12 changes: 6 additions & 6 deletions examples/rtmp_server_channels/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package main

import (
"fmt"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/av/pktque"
"github.com/nareix/joy4/av/pubsub"
"github.com/nareix/joy4/format"
"github.com/nareix/joy4/format/rtmp"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/av/pktque"
"github.com/shawnfeng/joy4/av/pubsub"
"github.com/shawnfeng/joy4/format"
"github.com/shawnfeng/joy4/format/rtmp"
"sync"
"time"
)
Expand Down
Binary file modified examples/rtmp_server_channels/rtmp_server_channels
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/rtmp_server_proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import (
"fmt"
"strings"
"github.com/nareix/joy4/format"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/format/rtmp"
"github.com/shawnfeng/joy4/format"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/format/rtmp"
)

func init() {
Expand Down
12 changes: 6 additions & 6 deletions examples/rtmp_server_speex_to_aac/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/transcode"
"github.com/nareix/joy4/format"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/format/rtmp"
"github.com/nareix/joy4/cgo/ffmpeg"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/transcode"
"github.com/shawnfeng/joy4/format"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/format/rtmp"
"github.com/shawnfeng/joy4/cgo/ffmpeg"
)

// need ffmpeg with libspeex and libfdkaac installed
Expand Down
10 changes: 5 additions & 5 deletions examples/transcode/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/transcode"
"github.com/nareix/joy4/format"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/cgo/ffmpeg"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/transcode"
"github.com/shawnfeng/joy4/format"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/cgo/ffmpeg"
)

// need ffmpeg with libfdkaac installed
Expand Down
6 changes: 3 additions & 3 deletions format/aac/aac.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package aac
import (
"bufio"
"fmt"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/codec/aacparser"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/codec/aacparser"
"io"
"time"
)
Expand Down
16 changes: 8 additions & 8 deletions format/flv/flv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package flv
import (
"bufio"
"fmt"
"github.com/nareix/joy4/utils/bits/pio"
"github.com/nareix/joy4/av"
"github.com/nareix/joy4/av/avutil"
"github.com/nareix/joy4/codec"
"github.com/nareix/joy4/codec/aacparser"
"github.com/nareix/joy4/codec/fake"
"github.com/nareix/joy4/codec/h264parser"
"github.com/nareix/joy4/format/flv/flvio"
"github.com/shawnfeng/joy4/utils/bits/pio"
"github.com/shawnfeng/joy4/av"
"github.com/shawnfeng/joy4/av/avutil"
"github.com/shawnfeng/joy4/codec"
"github.com/shawnfeng/joy4/codec/aacparser"
"github.com/shawnfeng/joy4/codec/fake"
"github.com/shawnfeng/joy4/codec/h264parser"
"github.com/shawnfeng/joy4/format/flv/flvio"
"io"
)

Expand Down
2 changes: 1 addition & 1 deletion format/flv/flvio/amf0.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math"
"fmt"
"time"
"github.com/nareix/joy4/utils/bits/pio"
"github.com/shawnfeng/joy4/utils/bits/pio"
)

type AMF0ParseError struct {
Expand Down
4 changes: 2 additions & 2 deletions format/flv/flvio/flvio.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package flvio

import (
"fmt"
"github.com/nareix/joy4/utils/bits/pio"
"github.com/nareix/joy4/av"
"github.com/shawnfeng/joy4/utils/bits/pio"
"github.com/shawnfeng/joy4/av"
"io"
"time"
)
Expand Down
Loading

0 comments on commit 270f19d

Please sign in to comment.