Compare commits

..

19 Commits

@ -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://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av#Demuxer) [example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/open_probe_file/main.go))
- Audio Decoder ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av#AudioDecoder) [example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/audio_decode/main.go))
- Transcoding ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av/transcode) [example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/transcode/main.go))
- Streaming server ([example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/http_flv_and_rtmp_server/main.go))
- Muxer / Demuxer ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/av#Demuxer) [example](https://git.icomsys.co.kr/ljhwan026/joy4/blob/master/examples/open_probe_file/main.go))
- Audio Decoder ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/av#AudioDecoder) [example](https://git.icomsys.co.kr/ljhwan026/joy4/blob/master/examples/audio_decode/main.go))
- Transcoding ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/av/transcode) [example](https://git.icomsys.co.kr/ljhwan026/joy4/blob/master/examples/transcode/main.go))
- Streaming server ([example](https://git.icomsys.co.kr/ljhwan026/joy4/blob/master/examples/http_flv_and_rtmp_server/main.go))
Support container formats:
@ -34,31 +34,31 @@ RTMP / HTTP-FLV Server
- High performance
Publisher-subscriber packet buffer queue ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av/pubsub))
Publisher-subscriber packet buffer queue ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/av/pubsub))
- Customize publisher buffer time and subscriber read position
- Multiple channels live streaming ([example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/rtmp_server_channels/main.go))
- Multiple channels live streaming ([example](https://git.icomsys.co.kr/ljhwan026/joy4/blob/master/examples/rtmp_server_channels/main.go))
Packet filters ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/av/pktque))
Packet filters ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/av/pktque))
- Wait first keyframe
- Fix timestamp
- Make A/V sync
- Customize ([example](https://gitlab.com/ics_cinnamon/joy4/blob/master/examples/rtmp_server_channels/main.go#L19))
- Customize ([example](https://git.icomsys.co.kr/ljhwan026/joy4/blob/master/examples/rtmp_server_channels/main.go#L19))
FFMPEG Golang-style binding ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/cgo/ffmpeg))
FFMPEG Golang-style binding ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/cgo/ffmpeg))
- Audio Encoder / Decoder
- Video Decoder
- Audio Resampler
Support codec and container parsers:
- H264 SPS/PPS/AVCDecoderConfigure parser ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/codec/h264parser))
- AAC ADTSHeader/MPEG4AudioConfig parser ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/codec/aacparser))
- MP4 Atoms parser ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io))
- FLV AMF0 object parser ([doc](https://pkg.go.dev/gitlab.com/ics_cinnamon/joy4/format/flv/flvio))
- H264 SPS/PPS/AVCDecoderConfigure parser ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser))
- AAC ADTSHeader/MPEG4AudioConfig parser ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser))
- MP4 Atoms parser ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io))
- FLV AMF0 object parser ([doc](https://pkg.go.dev/git.icomsys.co.kr/ljhwan026/joy4/format/flv/flvio))
# Requirements

@ -5,10 +5,10 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/av/pktque"
"gitlab.com/ics_cinnamon/joy4/av/transcode"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av/pktque"
"git.icomsys.co.kr/ljhwan026/joy4/av/transcode"
)
var Debug bool

@ -9,8 +9,8 @@ import (
"path"
"strings"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/util"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/util"
)
type HandlerDemuxer struct {

@ -1,7 +1,7 @@
package pktque
import (
"gitlab.com/ics_cinnamon/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av"
)
type Buf struct {

@ -4,7 +4,7 @@ package pktque
import (
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av"
)
type Filter interface {

@ -6,8 +6,8 @@ import (
"sync"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/pktque"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/pktque"
)
// time

@ -5,8 +5,8 @@ import (
"fmt"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/pktque"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/pktque"
)
var Debug bool

@ -12,9 +12,9 @@ import (
"time"
"unsafe"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
)
const debug = false
@ -78,12 +78,34 @@ func (self *Resampler) Resample(in av.AudioFrame) (out av.AudioFrame, err error)
self.inSampleRate = in.SampleRate
self.inChannelLayout = in.ChannelLayout
avr := C.swr_alloc()
cs1 := C.CString("in_channel_layout")
cs2 := C.CString("out_channel_layout")
cs3 := C.CString("in_sample_rate")
cs4 := C.CString("out_sample_rate")
cs5 := C.CString("in_sample_fmt")
cs6 := C.CString("out_sample_fmt")
defer C.free(unsafe.Pointer(cs1))
defer C.free(unsafe.Pointer(cs2))
defer C.free(unsafe.Pointer(cs3))
defer C.free(unsafe.Pointer(cs4))
defer C.free(unsafe.Pointer(cs5))
defer C.free(unsafe.Pointer(cs6))
C.av_opt_set_int(unsafe.Pointer(avr), cs1, C.int64_t(channelLayoutAV2FF(self.inChannelLayout)), 0)
C.av_opt_set_int(unsafe.Pointer(avr), cs2, C.int64_t(channelLayoutAV2FF(self.OutChannelLayout)), 0)
C.av_opt_set_int(unsafe.Pointer(avr), cs3, C.int64_t(self.inSampleRate), 0)
C.av_opt_set_int(unsafe.Pointer(avr), cs4, C.int64_t(self.OutSampleRate), 0)
C.av_opt_set_int(unsafe.Pointer(avr), cs5, C.int64_t(sampleFormatAV2FF(self.inSampleFormat)), 0)
C.av_opt_set_int(unsafe.Pointer(avr), cs6, C.int64_t(sampleFormatAV2FF(self.OutSampleFormat)), 0)
/*
C.av_opt_set_int(unsafe.Pointer(avr), C.CString("in_channel_layout"), C.int64_t(channelLayoutAV2FF(self.inChannelLayout)), 0)
C.av_opt_set_int(unsafe.Pointer(avr), C.CString("out_channel_layout"), C.int64_t(channelLayoutAV2FF(self.OutChannelLayout)), 0)
C.av_opt_set_int(unsafe.Pointer(avr), C.CString("in_sample_rate"), C.int64_t(self.inSampleRate), 0)
C.av_opt_set_int(unsafe.Pointer(avr), C.CString("out_sample_rate"), C.int64_t(self.OutSampleRate), 0)
C.av_opt_set_int(unsafe.Pointer(avr), C.CString("in_sample_fmt"), C.int64_t(sampleFormatAV2FF(self.inSampleFormat)), 0)
C.av_opt_set_int(unsafe.Pointer(avr), C.CString("out_sample_fmt"), C.int64_t(sampleFormatAV2FF(self.OutSampleFormat)), 0)
*/
C.swr_init(avr)
self.avr = avr
}
@ -238,7 +260,10 @@ func (self *AudioEncoder) SetOption(key string, val interface{}) (err error) {
sval := fmt.Sprint(val)
if key == "profile" {
ff.profile = C.avcodec_profile_name_to_int(ff.codec, C.CString(sval))
cs1 := C.CString(sval)
defer C.free(unsafe.Pointer(cs1))
ff.profile = C.avcodec_profile_name_to_int(ff.codec, cs1)
//ff.profile = C.avcodec_profile_name_to_int(ff.codec, C.CString(sval))
if ff.profile == C.FF_PROFILE_UNKNOWN {
err = fmt.Errorf("ffmpeg: profile `%s` invalid", sval)
return
@ -246,13 +271,19 @@ func (self *AudioEncoder) SetOption(key string, val interface{}) (err error) {
return
}
C.av_dict_set(&ff.options, C.CString(key), C.CString(sval), 0)
cs2 := C.CString(sval)
defer C.free(unsafe.Pointer(cs2))
C.av_dict_set(&ff.options, C.CString(key), cs2, 0)
//C.av_dict_set(&ff.options, C.CString(key), C.CString(sval), 0)
return
}
func (self *AudioEncoder) GetOption(key string, val interface{}) (err error) {
ff := &self.ff.ff
entry := C.av_dict_get(ff.options, C.CString(key), nil, 0)
cs1 := C.CString(key)
defer C.free(unsafe.Pointer(cs1))
entry := C.av_dict_get(ff.options, cs1, nil, 0)
//entry := C.av_dict_get(ff.options, C.CString(key), nil, 0)
if entry == nil {
err = fmt.Errorf("ffmpeg: GetOption failed: `%s` not exists", key)
return
@ -401,6 +432,7 @@ func (self *AudioEncoder) Encode(frame av.AudioFrame) (pkts [][]byte, err error)
var pkt []byte
if frame.SampleFormat != self.SampleFormat || frame.ChannelLayout != self.ChannelLayout || frame.SampleRate != self.SampleRate {
//fmt.Printf("%+v\n", self)
if frame, err = self.resample(frame); err != nil {
return
}
@ -585,6 +617,11 @@ func (self *AudioDecoder) Decode(pkt []byte) (gotframe bool, frame av.AudioFrame
cgotframe := C.int(0)
if ff.codecCtx == nil || &pkt[0] == nil {
err = fmt.Errorf("ffmpeg: Decode ff.codecCtx NULL or pkg NULL")
return
}
cerr := C.decode(ff.codecCtx, ff.frame, (*C.uchar)(unsafe.Pointer(&pkt[0])), C.int(len(pkt)), &cgotframe)
if cerr < C.int(0) {
@ -615,6 +652,12 @@ func NewAudioEncoderByCodecType(typ av.CodecType) (enc *AudioEncoder, err error)
switch typ {
case av.AAC:
id = C.AV_CODEC_ID_AAC
case av.PCM_ALAW:
id = C.AV_CODEC_ID_PCM_ALAW
case av.PCM_MULAW:
id = C.AV_CODEC_ID_PCM_MULAW
case av.G729:
id = C.AV_CODEC_ID_G729
default:
err = fmt.Errorf("ffmpeg: cannot find encoder codecType=%d", typ)
@ -638,7 +681,10 @@ func NewAudioEncoderByCodecType(typ av.CodecType) (enc *AudioEncoder, err error)
func NewAudioEncoderByName(name string) (enc *AudioEncoder, err error) {
_enc := &AudioEncoder{}
codec := C.avcodec_find_encoder_by_name(C.CString(name))
cs1 := C.CString(name)
defer C.free(unsafe.Pointer(cs1))
codec := C.avcodec_find_encoder_by_name(cs1)
//codec := C.avcodec_find_encoder_by_name(C.CString(name))
if codec == nil || C.avcodec_get_type(codec.id) != C.AVMEDIA_TYPE_AUDIO {
err = fmt.Errorf("ffmpeg: cannot find audio encoder name=%s", name)
return

@ -5,6 +5,7 @@
#include <libswresample/swresample.h>
#include <libavutil/opt.h>
#include <string.h>
#include <stdio.h>
#include <libswscale/swscale.h>
#include "ffmpeg.h"
@ -15,6 +16,9 @@ int decode(AVCodecContext *avctx, AVFrame *frame, uint8_t *data, int size, int *
*got_frame = 0;
//printf("avctx: %p, data: %p, size: %d\n", avctx, data, size);
//printf("avctx->internal: %p->%p\n", avctx, avctx->internal);
ret = avcodec_send_packet(avctx, &pkt);
av_packet_unref(&pkt);

@ -1,7 +1,7 @@
package ffmpeg
/*
#cgo LDFLAGS: /usr/local/lib/libavcodec.a /usr/local/lib/libavformat.a /usr/local/lib/libavutil.a /usr/local/lib/libswscale.a /usr/local/lib/libswresample.a
#cgo LDFLAGS: /usr/local/lib/libavcodec.a /usr/local/lib/libavformat.a /usr/local/lib/libavutil.a /usr/local/lib/libswscale.a /usr/local/lib/libswresample.a -lm -lz -llzma
#include "ffmpeg.h"
void ffinit() {
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
@ -28,11 +28,17 @@ const (
)
func HasEncoder(name string) bool {
return C.avcodec_find_encoder_by_name(C.CString(name)) != nil
cs1 := C.CString(name)
defer C.free(unsafe.Pointer(cs1))
return C.avcodec_find_encoder_by_name(cs1) != nil
//return C.avcodec_find_encoder_by_name(C.CString(name)) != nil
}
func HasDecoder(name string) bool {
return C.avcodec_find_decoder_by_name(C.CString(name)) != nil
cs1 := C.CString(name)
defer C.free(unsafe.Pointer(cs1))
return C.avcodec_find_decoder_by_name(cs1) != nil
//return C.avcodec_find_decoder_by_name(C.CString(name)) != nil
}
//func EncodersList() []string

@ -3,7 +3,7 @@
package ffmpeg
// #cgo !windows pkg-config: opencv4
//#cgo LDFLAGS: -lavformat -lavutil -lavcodec -lavresample -lswscale
// #cgo LDFLAGS: /usr/local/lib/libavcodec.a /usr/local/lib/libavformat.a /usr/local/lib/libavutil.a /usr/local/lib/libswscale.a /usr/local/lib/libswresample.a -lm -lz -llzma
// #cgo CXXFLAGS: --std=c++1z
// #cgo windows CPPFLAGS: -IC:/opencv/build/install/include
// #cgo windows LDFLAGS: -LC:/opencv/build/install/x64/mingw/lib -lopencv_core420 -lopencv_face420 -lopencv_videoio420 -lopencv_imgproc420 -lopencv_highgui420 -lopencv_imgcodecs420 -lopencv_objdetect420 -lopencv_features2d420 -lopencv_video420 -lopencv_dnn420 -lopencv_xfeatures2d420 -lopencv_plot420 -lopencv_tracking420 -lopencv_img_hash420 -lopencv_calib3d420

@ -1,6 +1,6 @@
package ffmpeg
//#cgo LDFLAGS: -lavformat -lavutil -lavcodec -lavresample -lswscale
// #cgo LDFLAGS: /usr/local/lib/libavcodec.a /usr/local/lib/libavformat.a /usr/local/lib/libavutil.a /usr/local/lib/libswscale.a /usr/local/lib/libswresample.a -lm -lz -llzma
// #include "ffmpeg.h"
import "C"
import (
@ -10,8 +10,8 @@ import (
"runtime"
"unsafe"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
)
type VideoDecoder struct {
@ -183,7 +183,10 @@ func NewVideoDecoder(stream av.CodecData) (dec *VideoDecoder, err error) {
return
}
c := C.avcodec_find_decoder_by_name(C.CString("h264_cuvid"))
cs1 := C.CString("h264_cuvid")
defer C.free(unsafe.Pointer(cs1))
c := C.avcodec_find_decoder_by_name(cs1)
//c := C.avcodec_find_decoder_by_name(C.CString("h264_cuvid"))
if c == nil || C.avcodec_get_type(id) != C.AVMEDIA_TYPE_VIDEO {
c = C.avcodec_find_decoder(id)
if c == nil || C.avcodec_get_type(id) != C.AVMEDIA_TYPE_VIDEO {

@ -6,8 +6,8 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/utils/bits"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits"
)
// copied from libavcodec/mpeg4audio.h

@ -3,8 +3,8 @@ package codec
import (
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/fake"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/fake"
)
type PCMUCodecData struct {

@ -1,7 +1,7 @@
package fake
import (
"gitlab.com/ics_cinnamon/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av"
)
type CodecData struct {

@ -4,9 +4,9 @@ import (
"bytes"
"fmt"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/utils/bits"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
const (

@ -1,10 +1,10 @@
package main
import (
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/cgo/ffmpeg"
"gitlab.com/ics_cinnamon/joy4/format"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/cgo/ffmpeg"
"git.icomsys.co.kr/ljhwan026/joy4/format"
)
// need ffmpeg installed

@ -5,11 +5,11 @@ import (
"net/http"
"sync"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/av/pubsub"
"gitlab.com/ics_cinnamon/joy4/format"
"gitlab.com/ics_cinnamon/joy4/format/flv"
"gitlab.com/ics_cinnamon/joy4/format/rtmp"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av/pubsub"
"git.icomsys.co.kr/ljhwan026/joy4/format"
"git.icomsys.co.kr/ljhwan026/joy4/format/flv"
"git.icomsys.co.kr/ljhwan026/joy4/format/rtmp"
)
func init() {

@ -3,9 +3,9 @@ package main
import (
"fmt"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/format"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/format"
)
func init() {

@ -1,10 +1,10 @@
package main
import (
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/av/pktque"
"gitlab.com/ics_cinnamon/joy4/format"
"gitlab.com/ics_cinnamon/joy4/format/rtmp"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av/pktque"
"git.icomsys.co.kr/ljhwan026/joy4/format"
"git.icomsys.co.kr/ljhwan026/joy4/format/rtmp"
)
func init() {

@ -5,12 +5,12 @@ import (
"sync"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/av/pktque"
"gitlab.com/ics_cinnamon/joy4/av/pubsub"
"gitlab.com/ics_cinnamon/joy4/format"
"gitlab.com/ics_cinnamon/joy4/format/rtmp"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av/pktque"
"git.icomsys.co.kr/ljhwan026/joy4/av/pubsub"
"git.icomsys.co.kr/ljhwan026/joy4/format"
"git.icomsys.co.kr/ljhwan026/joy4/format/rtmp"
)
func init() {

@ -4,9 +4,9 @@ import (
"fmt"
"strings"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/format"
"gitlab.com/ics_cinnamon/joy4/format/rtmp"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/format"
"git.icomsys.co.kr/ljhwan026/joy4/format/rtmp"
)
func init() {

@ -1,12 +1,12 @@
package main
import (
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/av/transcode"
"gitlab.com/ics_cinnamon/joy4/cgo/ffmpeg"
"gitlab.com/ics_cinnamon/joy4/format"
"gitlab.com/ics_cinnamon/joy4/format/rtmp"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av/transcode"
"git.icomsys.co.kr/ljhwan026/joy4/cgo/ffmpeg"
"git.icomsys.co.kr/ljhwan026/joy4/format"
"git.icomsys.co.kr/ljhwan026/joy4/format/rtmp"
)
// need ffmpeg with libspeex and libfdkaac installed

@ -1,11 +1,11 @@
package main
import (
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/av/transcode"
"gitlab.com/ics_cinnamon/joy4/cgo/ffmpeg"
"gitlab.com/ics_cinnamon/joy4/format"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av/transcode"
"git.icomsys.co.kr/ljhwan026/joy4/cgo/ffmpeg"
"git.icomsys.co.kr/ljhwan026/joy4/format"
)
// need ffmpeg with libfdkaac installed

@ -6,9 +6,9 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
)
type Muxer struct {

@ -5,14 +5,14 @@ import (
"fmt"
"io"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/codec"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"gitlab.com/ics_cinnamon/joy4/codec/fake"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/format/flv/flvio"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/codec"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/codec/fake"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/format/flv/flvio"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
var MaxProbePacketCount = 20

@ -6,7 +6,7 @@ import (
"strings"
"time"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
type AMF0ParseError struct {

@ -5,8 +5,8 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
func TsToTime(ts int32) time.Duration {

@ -1,9 +1,9 @@
package format
import (
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/format/aac"
"gitlab.com/ics_cinnamon/joy4/format/raw"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/format/aac"
"git.icomsys.co.kr/ljhwan026/joy4/format/raw"
)
func RegisterAll() {

@ -16,13 +16,13 @@ import (
"strings"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/codec"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/format/rtsp/sdp"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/codec"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/format/rtsp/sdp"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
var ErrCodecDataChange = fmt.Errorf("rtsp: codec data change, please call HandleCodecDataChange()")

@ -6,10 +6,10 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io"
)
type Demuxer struct {

@ -3,8 +3,8 @@ package mp4
import (
"io"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
)
var CodecTypes = []av.CodecType{av.H264, av.AAC}

@ -3,7 +3,7 @@ package mp4io
import (
"time"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
const MOOF = Tag(0x6d6f6f66)

@ -966,7 +966,7 @@ func genatoms(filename, outfilename string) {
&ast.GenDecl{
Tok: token.IMPORT,
Specs: []ast.Spec{
&ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"`}},
&ast.ImportSpec{Path: &ast.BasicLit{Kind: token.STRING, Value: `"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"`}},
},
},
&ast.GenDecl{

@ -8,7 +8,7 @@ import (
"strings"
"time"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
type ParseError struct {

@ -6,11 +6,11 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
type Muxer struct {

@ -3,8 +3,8 @@ package mp4
import (
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io"
)
type Stream struct {

@ -1,6 +1,6 @@
package mp4f
import "gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io"
import "git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io"
type FDummy struct {
Data []byte

@ -1,8 +1,8 @@
package mp4fio
import (
"gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
func (self MovieFrag) Tag() mp4io.Tag {

@ -1,8 +1,8 @@
package mp4fio
import (
"gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
type ElemStreamDesc struct {

@ -6,12 +6,12 @@ import (
"os"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io"
"gitlab.com/ics_cinnamon/joy4/format/mp4f/mp4fio"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4f/mp4fio"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
type Muxer struct {

@ -3,10 +3,10 @@ package mp4f
import (
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/format/mp4"
"gitlab.com/ics_cinnamon/joy4/format/mp4/mp4io"
"gitlab.com/ics_cinnamon/joy4/format/mp4f/mp4fio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4/mp4io"
"git.icomsys.co.kr/ljhwan026/joy4/format/mp4f/mp4fio"
)
type Stream struct {

@ -5,9 +5,9 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
type Demuxer struct {

@ -3,8 +3,8 @@ package raw
import (
"io"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
)
var CodecTypes = []av.CodecType{av.H264, av.AAC}

@ -5,9 +5,9 @@ import (
"fmt"
"io"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
type Muxer struct {

@ -4,7 +4,7 @@ import (
"fmt"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av"
)
type Stream struct {

@ -14,11 +14,11 @@ import (
"strings"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/format/flv"
"gitlab.com/ics_cinnamon/joy4/format/flv/flvio"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/format/flv"
"git.icomsys.co.kr/ljhwan026/joy4/format/flv/flvio"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
var Debug bool

@ -18,13 +18,13 @@ import (
"strings"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"gitlab.com/ics_cinnamon/joy4/codec"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/format/rtsp/sdp"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/codec"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/format/rtsp/sdp"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
var ErrCodecDataChange = fmt.Errorf("rtsp: codec data change, please call HandleCodecDataChange()")

@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"gitlab.com/ics_cinnamon/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av"
)
type Session struct {

@ -3,8 +3,8 @@ package rtsp
import (
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/format/rtsp/sdp"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/format/rtsp/sdp"
)
type Stream struct {

@ -6,11 +6,11 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/format/ts/tsio"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/format/ts/tsio"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
type Demuxer struct {

@ -3,8 +3,8 @@ package ts
import (
"io"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/av/avutil"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/av/avutil"
)
func Handler(h *avutil.RegisterHandler) {

@ -5,10 +5,10 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/codec/aacparser"
"gitlab.com/ics_cinnamon/joy4/codec/h264parser"
"gitlab.com/ics_cinnamon/joy4/format/ts/tsio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/codec/aacparser"
"git.icomsys.co.kr/ljhwan026/joy4/codec/h264parser"
"git.icomsys.co.kr/ljhwan026/joy4/format/ts/tsio"
)
var CodecTypes = []av.CodecType{av.H264, av.AAC}

@ -3,8 +3,8 @@ package ts
import (
"time"
"gitlab.com/ics_cinnamon/joy4/av"
"gitlab.com/ics_cinnamon/joy4/format/ts/tsio"
"git.icomsys.co.kr/ljhwan026/joy4/av"
"git.icomsys.co.kr/ljhwan026/joy4/format/ts/tsio"
)
type Stream struct {

@ -5,7 +5,7 @@ import (
"io"
"time"
"gitlab.com/ics_cinnamon/joy4/utils/bits/pio"
"git.icomsys.co.kr/ljhwan026/joy4/utils/bits/pio"
)
const (

@ -1,4 +1,4 @@
module gitlab.com/ics_cinnamon/joy4
module git.icomsys.co.kr/ljhwan026/joy4
go 1.16

Loading…
Cancel
Save