gb28181

package
v0.0.0-...-6e8600b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 26 Imported by: 1

Documentation

Overview

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Package gb28181 provides GB28181 protocol support

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const (
	NaluTypeSliceTrailN = h265reader.NalUnitTypeTrailN
	NaluTypeSliceTrailR = h265reader.NalUnitTypeTrailR
	NaluTypeSliceTsaN   = h265reader.NalUnitTypeTsaN
	NaluTypeSliceTsaR   = h265reader.NalUnitTypeTsaR
	NaluTypeSliceStsaN  = h265reader.NalUnitTypeStsaN
	NaluTypeSliceStsaR  = h265reader.NalUnitTypeStsaR
	NaluTypeSliceRadlN  = h265reader.NalUnitTypeRadlN
	NaluTypeSliceRadlR  = h265reader.NalUnitTypeRadlR
	NaluTypeSliceRaslN  = h265reader.NalUnitTypeRaslN
	NaluTypeSliceRaslR  = h265reader.NalUnitTypeRaslR

	NaluTypeSliceBlaWlp       = h265reader.NalUnitTypeBlaWLp
	NaluTypeSliceBlaWradl     = h265reader.NalUnitTypeBlaWRadl
	NaluTypeSliceBlaNlp       = h265reader.NalUnitTypeBlaNLp
	NaluTypeSliceIdr          = h265reader.NalUnitTypeIdrWRadl
	NaluTypeSliceIdrNlp       = h265reader.NalUnitTypeIdrNLp
	NaluTypeSliceCranut       = h265reader.NalUnitTypeCraNut
	NaluTypeSliceRsvIrapVcl22 = h265reader.NalUnitTypeReserved41 // Approximate mapping
	NaluTypeSliceRsvIrapVcl23 = h265reader.NalUnitTypeReserved47 // Approximate mapping

	NaluTypeVps       = h265reader.NalUnitTypeVps
	NaluTypeSps       = h265reader.NalUnitTypeSps
	NaluTypePps       = h265reader.NalUnitTypePps
	NaluTypeAud       = h265reader.NalUnitTypeAud
	NaluTypeSei       = h265reader.NalUnitTypePrefixSei
	NaluTypeSeiSuffix = h265reader.NalUnitTypeSuffixSei

	NaluTypeUnspecified = h265reader.NalUnitTypeUnspec48
)

NAL unit type constants for compatibility with existing code

Variables

This section is empty.

Functions

func Parse

func Parse(ctx context.Context) interface{}

func Run

func Run(ctx context.Context, r0 interface{}) (err error)

Types

type AACReader

type AACReader struct {
	// contains filtered or unexported fields
}

func NewAACReader

func NewAACReader(f io.Reader) (*AACReader, error)

func (*AACReader) NextADTSFrame

func (v *AACReader) NextADTSFrame() ([]byte, error)

type GBSession

type GBSession struct {
	// contains filtered or unexported fields
}

func NewGBSession

func NewGBSession(c *GBSessionConfig, sc *SIPConfig) *GBSession

func (*GBSession) Bye

func (v *GBSession) Bye(ctx context.Context) error

func (*GBSession) Close

func (v *GBSession) Close() error

func (*GBSession) Connect

func (v *GBSession) Connect(ctx context.Context) error

func (*GBSession) Invite

func (v *GBSession) Invite(ctx context.Context) error

func (*GBSession) Register

func (v *GBSession) Register(ctx context.Context) error

func (*GBSession) UnRegister

func (v *GBSession) UnRegister(ctx context.Context) error

type GBSessionConfig

type GBSessionConfig struct {
	// contains filtered or unexported fields
}

type GBSessionOutput

type GBSessionOutput struct {
	// contains filtered or unexported fields
}

type GBTestPublisher

type GBTestPublisher struct {
	// contains filtered or unexported fields
}

func NewGBTestPublisher

func NewGBTestPublisher() *GBTestPublisher

func (*GBTestPublisher) Close

func (v *GBTestPublisher) Close() error

func (*GBTestPublisher) Run

func (v *GBTestPublisher) Run(ctx context.Context) (err error)

type GBTestSession

type GBTestSession struct {
	// contains filtered or unexported fields
}

func NewGBTestSession

func NewGBTestSession() *GBTestSession

func (*GBTestSession) Close

func (v *GBTestSession) Close() error

func (*GBTestSession) Run

func (v *GBTestSession) Run(ctx context.Context) (err error)

type H265Reader

type H265Reader = h265reader.H265Reader

Type aliases for compatibility with existing code

func NewReader

func NewReader(in io.Reader) (*H265Reader, error)

NewReader creates new H265Reader using Pion's implementation

type IngesterConfig

type IngesterConfig struct {
	// contains filtered or unexported fields
}

type NAL

type NAL = h265reader.NAL

type NalUnitType

type NalUnitType = h265reader.NalUnitType

type PSClient

type PSClient struct {
	// contains filtered or unexported fields
}

func NewPSClient

func NewPSClient(ssrc uint32, serverAddr string) *PSClient

func (*PSClient) Close

func (v *PSClient) Close() error

func (*PSClient) Connect

func (v *PSClient) Connect(ctx context.Context) error

func (*PSClient) WritePacksOverRTP

func (v *PSClient) WritePacksOverRTP(packs []*PSPacket) error

type PSConfig

type PSConfig struct {
	// contains filtered or unexported fields
}

func (*PSConfig) String

func (v *PSConfig) String() string

type PSIngester

type PSIngester struct {
	// contains filtered or unexported fields
}

func NewPSIngester

func NewPSIngester(c *IngesterConfig) *PSIngester

func (*PSIngester) Close

func (v *PSIngester) Close() error

func (*PSIngester) Ingest

func (v *PSIngester) Ingest(ctx context.Context) error

type PSPackStream

type PSPackStream struct {
	// contains filtered or unexported fields
}

func NewPSPackStream

func NewPSPackStream(pt uint8) *PSPackStream

func (*PSPackStream) WriteAudio

func (v *PSPackStream) WriteAudio(adts []byte, dts uint64) error

Write AAC ADTS frame.

func (*PSPackStream) WriteHeader

func (v *PSPackStream) WriteHeader(videoCodec mpeg2.PS_STREAM_TYPE, dts uint64) error

func (*PSPackStream) WritePackHeader

func (v *PSPackStream) WritePackHeader(dts uint64) error

func (*PSPackStream) WriteProgramStreamMap

func (v *PSPackStream) WriteProgramStreamMap(videoCodec mpeg2.PS_STREAM_TYPE, dts uint64) error

func (*PSPackStream) WriteSystemHeader

func (v *PSPackStream) WriteSystemHeader(dts uint64) error

func (*PSPackStream) WriteVideo

func (v *PSPackStream) WriteVideo(nalu []byte, dts uint64) error

The nalu is raw data without ANNEXB header.

type PSPacket

type PSPacket struct {
	// contains filtered or unexported fields
}

func NewPSPacket

func NewPSPacket(t PSPacketType, p []byte, ts uint64, pt uint8) *PSPacket

func (*PSPacket) Append

func (v *PSPacket) Append(p []byte) *PSPacket

type PSPacketType

type PSPacketType int
const (
	PSPacketTypePackHeader PSPacketType = iota
	PSPacketTypeSystemHeader
	PSPacketTypeProgramStramMap
	PSPacketTypeVideo
	PSPacketTypeAudio
)

type SIPClient

type SIPClient struct {
	// contains filtered or unexported fields
}

func NewSIPClient

func NewSIPClient() *SIPClient

func (*SIPClient) Close

func (v *SIPClient) Close() error

func (*SIPClient) Connect

func (v *SIPClient) Connect(ctx context.Context, addr string) error

func (*SIPClient) Send

func (v *SIPClient) Send(msg sip.Message) error

type SIPConfig

type SIPConfig struct {
	// contains filtered or unexported fields
}

func (*SIPConfig) DeviceID

func (v *SIPConfig) DeviceID() string

func (*SIPConfig) String

func (v *SIPConfig) String() string

type SIPSession

type SIPSession struct {
	// contains filtered or unexported fields
}

func NewSIPSession

func NewSIPSession(c *SIPConfig) *SIPSession

func (*SIPSession) Bye

func (*SIPSession) Close

func (v *SIPSession) Close() error

func (*SIPSession) Connect

func (v *SIPSession) Connect(ctx context.Context) error

func (*SIPSession) InviteResponse

func (v *SIPSession) InviteResponse(ctx context.Context, invite sip.Message) (sip.Message, error)

func (*SIPSession) Message

func (v *SIPSession) Message(ctx context.Context) (sip.Message, sip.Message, error)

func (*SIPSession) Register

func (v *SIPSession) Register(ctx context.Context) (sip.Message, sip.Message, error)

func (*SIPSession) Trying

func (v *SIPSession) Trying(ctx context.Context, invite sip.Message) error

func (*SIPSession) UnRegister

func (v *SIPSession) UnRegister(ctx context.Context) (sip.Message, sip.Message, error)

func (*SIPSession) Wait

func (v *SIPSession) Wait(ctx context.Context, method sip.RequestMethod) (sip.Message, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL