Versions in this module Expand all Collapse all v1 v1.0.0 Jul 2, 2023 Changes in this version + const AudioFormatIDLpcm + const AudioStreamBasicDescriptionMagic + const BooleanValueMagic + const CMTimeLengthInBytes + const CodecAvc1 + const CodecMagic + const DataValueMagic + const DictionaryMagic + const ExtensionMagic + const FormatDescriptorMagic + const IntKey + const KCMTimeFlagsHasBeenRounded + const KCMTimeFlagsImpliedValueFlagsMask + const KCMTimeFlagsIndefinite + const KCMTimeFlagsNegativeInfinity + const KCMTimeFlagsPositiveInfinity + const KCMTimeFlagsValid + const KeyValuePairMagic + const MediaTypeMagic + const MediaTypeSound + const MediaTypeVideo + const NanoSecondScale + const StringKey + const StringValueMagic + const VideoDimensionMagic + func CalculateSkew(startTimeClock1 CMTime, endTimeClock1 CMTime, startTimeClock2 CMTime, ...) float64 + func GetNaluDetails(nalu []byte) string + func GetWavHeaderBytes(length int) ([]byte, error) + func SerializeStringKeyDict(stringKeyDict StringKeyDict) []byte + func Table() []string + func WriteWavHeader(length int, wavFile *os.File) error + type AVFileWriter struct + func NewAVFileWriter(h264FileWriter io.Writer, wavFileWriter io.Writer) AVFileWriter + func NewAVFileWriterAudioOnly(wavFileWriter io.Writer) AVFileWriter + func (avfw AVFileWriter) Consume(buf CMSampleBuffer) error + func (avfw AVFileWriter) Stop() + type AudioStreamBasicDescription struct + BitsPerChannel uint32 + BytesPerFrame uint32 + BytesPerPacket uint32 + ChannelsPerFrame uint32 + FormatFlags uint32 + FormatID uint32 + FramesPerPacket uint32 + Reserved uint32 + SampleRate float64 + func DefaultAudioStreamBasicDescription() AudioStreamBasicDescription + func NewAudioStreamBasicDescriptionFromBytes(data []byte) (AudioStreamBasicDescription, error) + func (adsb AudioStreamBasicDescription) SerializeAudioStreamBasicDescription(adsbBytes []byte) + func (adsb AudioStreamBasicDescription) String() string + type CMClock struct + ID uint64 + TimeScale uint32 + func NewCMClockWithHostTime(ID uint64) CMClock + func NewCMClockWithHostTimeAndScale(ID uint64, timeScale uint32) CMClock + func (c CMClock) GetTime() CMTime + type CMItemCount = int + type CMSampleBuffer struct + Attachments IndexKeyDict + FormatDescription FormatDescriptor + HasFormatDescription bool + MediaType uint32 + NumSamples CMItemCount + OutputPresentationTimestamp CMTime + SampleData []byte + SampleSizes []int + SampleTimingInfoArray []CMSampleTimingInfo + Sary IndexKeyDict + func NewCMSampleBufferFromBytes(data []byte, mediaType uint32) (CMSampleBuffer, error) + func NewCMSampleBufferFromBytesAudio(data []byte) (CMSampleBuffer, error) + func NewCMSampleBufferFromBytesVideo(data []byte) (CMSampleBuffer, error) + func (buffer CMSampleBuffer) HasSampleData() bool + func (buffer CMSampleBuffer) String() string + type CMSampleTimingInfo struct + DecodeTimeStamp CMTime + Duration CMTime + PresentationTimeStamp CMTime + func (info CMSampleTimingInfo) String() string + type CMTime struct + CMTimeEpoch uint64 + CMTimeFlags uint32 + CMTimeScale uint32 + CMTimeValue uint64 + func NewCMTimeFromBytes(data []byte) (CMTime, error) + func (time CMTime) GetTimeForScale(newScaleToUse CMTime) float64 + func (time CMTime) Seconds() uint64 + func (time CMTime) Serialize(target []byte) error + func (time CMTime) String() string + type FormatDescriptor struct + AudioStreamBasicDescription AudioStreamBasicDescription + Codec uint32 + Extensions IndexKeyDict + MediaType uint32 + PPS []byte + SPS []byte + VideoDimensionHeight uint32 + VideoDimensionWidth uint32 + func NewFormatDescriptorFromBytes(data []byte) (FormatDescriptor, error) + func (fdsc FormatDescriptor) String() string + type IndexKeyDict struct + Entries []IndexKeyEntry + func NewIndexDictFromBytes(data []byte) (IndexKeyDict, error) + func NewIndexDictFromBytesWithCustomMarker(data []byte, magic uint32) (IndexKeyDict, error) + func (dt IndexKeyDict) String() string + type IndexKeyEntry struct + Key uint16 + Value interface{} + type StringKeyDict struct + Entries []StringKeyEntry + func NewStringDictFromBytes(data []byte) (StringKeyDict, error) + func (dt StringKeyDict) String() string + type StringKeyEntry struct + Key string + Value interface{} + func ParseKeyValueEntry(data []byte) (StringKeyEntry, error)