go fmt
This commit is contained in:
parent
7098ea1efd
commit
01b5cd703f
14
av/av.go
14
av/av.go
@ -1,4 +1,3 @@
|
||||
|
||||
// Package av defines basic interfaces and data structures of container demux/mux and audio encode/decode.
|
||||
package av
|
||||
|
||||
@ -294,12 +293,12 @@ type AudioEncoder interface {
|
||||
CodecData() (AudioCodecData, error) // encoder's codec data can put into container
|
||||
Encode(AudioFrame) ([][]byte, error) // encode raw audio frame into compressed pakcet(s)
|
||||
Close() // close encoder, free cgo contexts
|
||||
SetSampleRate(int) (error) // set encoder sample rate
|
||||
SetChannelLayout(ChannelLayout) (error) // set encoder channel layout
|
||||
SetSampleFormat(SampleFormat) (error) // set encoder sample format
|
||||
SetBitrate(int) (error) // set encoder bitrate
|
||||
SetOption(string,interface{}) (error) // encoder setopt, in ffmpeg is av_opt_set_dict()
|
||||
GetOption(string,interface{}) (error) // encoder getopt
|
||||
SetSampleRate(int) error // set encoder sample rate
|
||||
SetChannelLayout(ChannelLayout) error // set encoder channel layout
|
||||
SetSampleFormat(SampleFormat) error // set encoder sample format
|
||||
SetBitrate(int) error // set encoder bitrate
|
||||
SetOption(string, interface{}) error // encoder setopt, in ffmpeg is av_opt_set_dict()
|
||||
GetOption(string, interface{}) error // encoder getopt
|
||||
}
|
||||
|
||||
// AudioDecoder can decode compressed audio packets into raw audio frame.
|
||||
@ -313,4 +312,3 @@ type AudioDecoder interface {
|
||||
type AudioResampler interface {
|
||||
Resample(AudioFrame) (AudioFrame, error) // convert raw audio frames
|
||||
}
|
||||
|
||||
|
@ -2,12 +2,12 @@ package avconv
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"time"
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"github.com/datarhei/joy4/av/pktque"
|
||||
"github.com/datarhei/joy4/av/transcode"
|
||||
"io"
|
||||
"time"
|
||||
)
|
||||
|
||||
var Debug bool
|
||||
@ -252,4 +252,3 @@ func ConvertCmdline(args []string) (err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
package avutil
|
||||
|
||||
import (
|
||||
"io"
|
||||
"strings"
|
||||
"fmt"
|
||||
"bytes"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/datarhei/joy4/av"
|
||||
)
|
||||
|
||||
type HandlerDemuxer struct {
|
||||
@ -108,7 +109,7 @@ func (self *Handlers) NewAudioEncoder(typ av.CodecType) (enc av.AudioEncoder, er
|
||||
}
|
||||
}
|
||||
}
|
||||
err = fmt.Errorf("avutil: encoder", typ, "not found")
|
||||
err = fmt.Errorf("avutil: encoder %s not found", typ)
|
||||
return
|
||||
}
|
||||
|
||||
@ -120,7 +121,7 @@ func (self *Handlers) NewAudioDecoder(codec av.AudioCodecData) (dec av.AudioDeco
|
||||
}
|
||||
}
|
||||
}
|
||||
err = fmt.Errorf("avutil: decoder", codec.Type(), "not found")
|
||||
err = fmt.Errorf("avutil: decoder %s not found", codec.Type())
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
|
||||
// Package pktque provides packet Filter interface and structures used by other components.
|
||||
package pktque
|
||||
|
||||
import (
|
||||
"time"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Filter interface {
|
||||
@ -188,4 +187,3 @@ func (self *Walltime) ModifyPacket(pkt *av.Packet, streams []av.CodecData, video
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -58,4 +58,3 @@ func (self *Timeline) Pop(dur time.Duration) (tm time.Duration) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -2,11 +2,12 @@
|
||||
package pubsub
|
||||
|
||||
import (
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/pktque"
|
||||
"io"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/pktque"
|
||||
)
|
||||
|
||||
// time
|
||||
@ -97,7 +98,6 @@ func (self *Queue) WritePacket(pkt av.Packet) (err error) {
|
||||
break
|
||||
}
|
||||
}
|
||||
//println("shrink", self.curgopcount, self.maxgopcount, self.buf.Head, self.buf.Tail, "count", self.buf.Count, "size", self.buf.Size)
|
||||
|
||||
self.cond.Broadcast()
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
|
||||
// Package transcoder implements Transcoder based on Muxer/Demuxer and AudioEncoder/AudioDecoder interface.
|
||||
package transcode
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/pktque"
|
||||
"time"
|
||||
)
|
||||
|
||||
var Debug bool
|
||||
|
@ -1,12 +1,12 @@
|
||||
package aacparser
|
||||
|
||||
import (
|
||||
"github.com/datarhei/joy4/utils/bits"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"time"
|
||||
"fmt"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/utils/bits"
|
||||
"io"
|
||||
"time"
|
||||
)
|
||||
|
||||
// copied from libavcodec/mpeg4audio.h
|
||||
@ -308,4 +308,3 @@ func NewCodecDataFromMPEG4AudioConfigBytes(config []byte) (self CodecData, err e
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -61,4 +61,3 @@ func NewSpeexCodecData(sr int, cl av.ChannelLayout) SpeexCodecData {
|
||||
codec.ChannelLayout_ = cl
|
||||
return codec
|
||||
}
|
||||
|
||||
|
@ -26,4 +26,3 @@ func (self CodecData) ChannelLayout() av.ChannelLayout {
|
||||
func (self CodecData) SampleRate() int {
|
||||
return self.SampleRate_
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
|
||||
package h264parser
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/utils/bits"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"fmt"
|
||||
"bytes"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -740,4 +739,3 @@ func ParseSliceHeaderFromNALU(packet []byte) (sliceType SliceType, err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
|
||||
package h264parser
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"encoding/hex"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestParser(t *testing.T) {
|
||||
@ -20,4 +19,3 @@ func TestParser(t *testing.T) {
|
||||
nalus, ok = SplitNALUs(avccFrame)
|
||||
t.Log(ok, len(nalus))
|
||||
}
|
||||
|
||||
|
1
doc.go
1
doc.go
@ -1,4 +1,3 @@
|
||||
|
||||
// Package joy4 is a Golang audio/video library and streaming server.
|
||||
// JOY4 is powerful library written in golang, well-designed interface makes a few lines
|
||||
// of code can do a lot of things such as reading, writing, transcoding among
|
||||
|
@ -1,14 +1,13 @@
|
||||
|
||||
package aac
|
||||
|
||||
import (
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/codec/aacparser"
|
||||
"time"
|
||||
"fmt"
|
||||
"io"
|
||||
"bufio"
|
||||
"fmt"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"github.com/datarhei/joy4/codec/aacparser"
|
||||
"io"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Muxer struct {
|
||||
|
@ -3,7 +3,6 @@ package flv
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"github.com/datarhei/joy4/codec"
|
||||
@ -11,6 +10,7 @@ import (
|
||||
"github.com/datarhei/joy4/codec/fake"
|
||||
"github.com/datarhei/joy4/codec/h264parser"
|
||||
"github.com/datarhei/joy4/format/flv/flvio"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"io"
|
||||
)
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
package flvio
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"math"
|
||||
"fmt"
|
||||
"time"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"math"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type AMF0ParseError struct {
|
||||
@ -278,7 +278,6 @@ func FillAMF0Val(b []byte, _val interface{}) (n int) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
func ParseAMF0Val(b []byte) (val interface{}, n int, err error) {
|
||||
return parseAMF0Val(b, 0)
|
||||
}
|
||||
@ -465,4 +464,3 @@ func parseAMF0Val(b []byte, offset int) (val interface{}, n int, err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,8 @@ package flvio
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"io"
|
||||
"time"
|
||||
)
|
||||
|
@ -1,13 +1,13 @@
|
||||
package format
|
||||
|
||||
import (
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"github.com/datarhei/joy4/format/aac"
|
||||
"github.com/datarhei/joy4/format/flv"
|
||||
"github.com/datarhei/joy4/format/mp4"
|
||||
"github.com/datarhei/joy4/format/ts"
|
||||
"github.com/datarhei/joy4/format/rtmp"
|
||||
"github.com/datarhei/joy4/format/rtsp"
|
||||
"github.com/datarhei/joy4/format/flv"
|
||||
"github.com/datarhei/joy4/format/aac"
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"github.com/datarhei/joy4/format/ts"
|
||||
)
|
||||
|
||||
func RegisterAll() {
|
||||
@ -18,4 +18,3 @@ func RegisterAll() {
|
||||
avutil.DefaultHandlers.Add(flv.Handler)
|
||||
avutil.DefaultHandlers.Add(aac.Handler)
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package mp4
|
||||
|
||||
import (
|
||||
"io"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"io"
|
||||
)
|
||||
|
||||
var CodecTypes = []av.CodecType{av.H264, av.AAC}
|
||||
@ -29,4 +29,3 @@ func Handler(h *avutil.RegisterHandler) {
|
||||
|
||||
h.CodecTypes = CodecTypes
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"fmt"
|
||||
"os"
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"go/printer"
|
||||
"go/token"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func getexprs(e ast.Expr) string {
|
||||
@ -1054,4 +1053,3 @@ func main() {
|
||||
genatoms(os.Args[2], os.Args[3])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,4 +434,3 @@ func tfdt_TrackFragDecodeTime() {
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
|
||||
package mp4io
|
||||
|
||||
import (
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"os"
|
||||
"io"
|
||||
"fmt"
|
||||
"time"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"io"
|
||||
"math"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ParseError struct {
|
||||
@ -500,4 +499,3 @@ func (self *Track) GetElemStreamDesc() (esds *ElemStreamDesc) {
|
||||
esds, _ = atom.(*ElemStreamDesc)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
package mp4
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"time"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/codec/aacparser"
|
||||
"github.com/datarhei/joy4/codec/h264parser"
|
||||
"github.com/datarhei/joy4/format/mp4/mp4io"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"io"
|
||||
"bufio"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Muxer struct {
|
||||
|
@ -8,13 +8,13 @@ import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"github.com/datarhei/joy4/codec"
|
||||
"github.com/datarhei/joy4/codec/aacparser"
|
||||
"github.com/datarhei/joy4/codec/h264parser"
|
||||
"github.com/datarhei/joy4/format/rtsp/sdp"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"io"
|
||||
"net"
|
||||
"net/textproto"
|
||||
@ -1236,4 +1236,3 @@ func Handler(h *avutil.RegisterHandler) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,4 +26,3 @@ type Stream struct {
|
||||
|
||||
lasttime time.Duration
|
||||
}
|
||||
|
||||
|
@ -3,13 +3,13 @@ package ts
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"time"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/format/ts/tsio"
|
||||
"github.com/datarhei/joy4/codec/aacparser"
|
||||
"github.com/datarhei/joy4/codec/h264parser"
|
||||
"github.com/datarhei/joy4/format/ts/tsio"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"io"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Demuxer struct {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package ts
|
||||
|
||||
import (
|
||||
"io"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/av/avutil"
|
||||
"io"
|
||||
)
|
||||
|
||||
func Handler(h *avutil.RegisterHandler) {
|
||||
@ -23,4 +23,3 @@ func Handler(h *avutil.RegisterHandler) {
|
||||
|
||||
h.CodecTypes = CodecTypes
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package ts
|
||||
|
||||
import (
|
||||
"time"
|
||||
"github.com/datarhei/joy4/av"
|
||||
"github.com/datarhei/joy4/format/ts/tsio"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Stream struct {
|
||||
@ -24,4 +24,3 @@ type Stream struct {
|
||||
data []byte
|
||||
datalen int
|
||||
}
|
||||
|
||||
|
@ -52,4 +52,3 @@ func calcCRC32(crc uint32, data []byte) uint32 {
|
||||
}
|
||||
return crc
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
|
||||
package tsio
|
||||
|
||||
import (
|
||||
"io"
|
||||
"time"
|
||||
"fmt"
|
||||
"github.com/datarhei/joy4/utils/bits/pio"
|
||||
"io"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -587,4 +586,3 @@ func ParseTSHeader(tshdr []byte) (pid uint16, start bool, iskeyframe bool, hdrle
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -20,4 +20,3 @@ func NewReaderSize(r io.ReadSeeker, size int) *Reader {
|
||||
func (self *Reader) ReadAt(b []byte, off int64) (n int, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
package pio
|
||||
|
||||
var RecommendBufioSize = 1024 * 64
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
package pio
|
||||
|
||||
func U8(b []byte) (i uint8) {
|
||||
@ -7,85 +6,116 @@ func U8(b []byte) (i uint8) {
|
||||
|
||||
func U16BE(b []byte) (i uint16) {
|
||||
i = uint16(b[0])
|
||||
i <<= 8; i |= uint16(b[1])
|
||||
i <<= 8
|
||||
i |= uint16(b[1])
|
||||
return
|
||||
}
|
||||
|
||||
func I16BE(b []byte) (i int16) {
|
||||
i = int16(b[0])
|
||||
i <<= 8; i |= int16(b[1])
|
||||
i <<= 8
|
||||
i |= int16(b[1])
|
||||
return
|
||||
}
|
||||
|
||||
func I24BE(b []byte) (i int32) {
|
||||
i = int32(int8(b[0]))
|
||||
i <<= 8; i |= int32(b[1])
|
||||
i <<= 8; i |= int32(b[2])
|
||||
i <<= 8
|
||||
i |= int32(b[1])
|
||||
i <<= 8
|
||||
i |= int32(b[2])
|
||||
return
|
||||
}
|
||||
|
||||
func U24BE(b []byte) (i uint32) {
|
||||
i = uint32(b[0])
|
||||
i <<= 8; i |= uint32(b[1])
|
||||
i <<= 8; i |= uint32(b[2])
|
||||
i <<= 8
|
||||
i |= uint32(b[1])
|
||||
i <<= 8
|
||||
i |= uint32(b[2])
|
||||
return
|
||||
}
|
||||
|
||||
func I32BE(b []byte) (i int32) {
|
||||
i = int32(int8(b[0]))
|
||||
i <<= 8; i |= int32(b[1])
|
||||
i <<= 8; i |= int32(b[2])
|
||||
i <<= 8; i |= int32(b[3])
|
||||
i <<= 8
|
||||
i |= int32(b[1])
|
||||
i <<= 8
|
||||
i |= int32(b[2])
|
||||
i <<= 8
|
||||
i |= int32(b[3])
|
||||
return
|
||||
}
|
||||
|
||||
func U32LE(b []byte) (i uint32) {
|
||||
i = uint32(b[3])
|
||||
i <<= 8; i |= uint32(b[2])
|
||||
i <<= 8; i |= uint32(b[1])
|
||||
i <<= 8; i |= uint32(b[0])
|
||||
i <<= 8
|
||||
i |= uint32(b[2])
|
||||
i <<= 8
|
||||
i |= uint32(b[1])
|
||||
i <<= 8
|
||||
i |= uint32(b[0])
|
||||
return
|
||||
}
|
||||
|
||||
func U32BE(b []byte) (i uint32) {
|
||||
i = uint32(b[0])
|
||||
i <<= 8; i |= uint32(b[1])
|
||||
i <<= 8; i |= uint32(b[2])
|
||||
i <<= 8; i |= uint32(b[3])
|
||||
i <<= 8
|
||||
i |= uint32(b[1])
|
||||
i <<= 8
|
||||
i |= uint32(b[2])
|
||||
i <<= 8
|
||||
i |= uint32(b[3])
|
||||
return
|
||||
}
|
||||
|
||||
func U40BE(b []byte) (i uint64) {
|
||||
i = uint64(b[0])
|
||||
i <<= 8; i |= uint64(b[1])
|
||||
i <<= 8; i |= uint64(b[2])
|
||||
i <<= 8; i |= uint64(b[3])
|
||||
i <<= 8; i |= uint64(b[4])
|
||||
i <<= 8
|
||||
i |= uint64(b[1])
|
||||
i <<= 8
|
||||
i |= uint64(b[2])
|
||||
i <<= 8
|
||||
i |= uint64(b[3])
|
||||
i <<= 8
|
||||
i |= uint64(b[4])
|
||||
return
|
||||
}
|
||||
|
||||
func U64BE(b []byte) (i uint64) {
|
||||
i = uint64(b[0])
|
||||
i <<= 8; i |= uint64(b[1])
|
||||
i <<= 8; i |= uint64(b[2])
|
||||
i <<= 8; i |= uint64(b[3])
|
||||
i <<= 8; i |= uint64(b[4])
|
||||
i <<= 8; i |= uint64(b[5])
|
||||
i <<= 8; i |= uint64(b[6])
|
||||
i <<= 8; i |= uint64(b[7])
|
||||
i <<= 8
|
||||
i |= uint64(b[1])
|
||||
i <<= 8
|
||||
i |= uint64(b[2])
|
||||
i <<= 8
|
||||
i |= uint64(b[3])
|
||||
i <<= 8
|
||||
i |= uint64(b[4])
|
||||
i <<= 8
|
||||
i |= uint64(b[5])
|
||||
i <<= 8
|
||||
i |= uint64(b[6])
|
||||
i <<= 8
|
||||
i |= uint64(b[7])
|
||||
return
|
||||
}
|
||||
|
||||
func I64BE(b []byte) (i int64) {
|
||||
i = int64(int8(b[0]))
|
||||
i <<= 8; i |= int64(b[1])
|
||||
i <<= 8; i |= int64(b[2])
|
||||
i <<= 8; i |= int64(b[3])
|
||||
i <<= 8; i |= int64(b[4])
|
||||
i <<= 8; i |= int64(b[5])
|
||||
i <<= 8; i |= int64(b[6])
|
||||
i <<= 8; i |= int64(b[7])
|
||||
i <<= 8
|
||||
i |= int64(b[1])
|
||||
i <<= 8
|
||||
i |= int64(b[2])
|
||||
i <<= 8
|
||||
i |= int64(b[3])
|
||||
i <<= 8
|
||||
i |= int64(b[4])
|
||||
i <<= 8
|
||||
i |= int64(b[5])
|
||||
i <<= 8
|
||||
i |= int64(b[6])
|
||||
i <<= 8
|
||||
i |= int64(b[7])
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,4 +66,3 @@ func VecSlice(in [][]byte, s int, e int) (out [][]byte) {
|
||||
out = out[:n]
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
package pio
|
||||
|
||||
import (
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
package pio
|
||||
|
||||
func PutU8(b []byte, v uint8) {
|
||||
@ -86,4 +85,3 @@ func PutI64BE(b []byte, v int64) {
|
||||
b[6] = byte(v >> 8)
|
||||
b[7] = byte(v)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user