mirror of
				https://github.com/aler9/gortsplib
				synced 2025-10-31 18:42:40 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			791 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			791 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package format //nolint:dupl
 | |
| 
 | |
| import (
 | |
| 	"github.com/pion/rtp"
 | |
| )
 | |
| 
 | |
| // MPEGTS is the RTP format for MPEG-TS.
 | |
| // Specification: https://datatracker.ietf.org/doc/html/rfc2250
 | |
| type MPEGTS struct{}
 | |
| 
 | |
| func (f *MPEGTS) unmarshal(_ *unmarshalContext) error {
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| // Codec implements Format.
 | |
| func (f *MPEGTS) Codec() string {
 | |
| 	return "MPEG-TS"
 | |
| }
 | |
| 
 | |
| // ClockRate implements Format.
 | |
| func (f *MPEGTS) ClockRate() int {
 | |
| 	return 90000
 | |
| }
 | |
| 
 | |
| // PayloadType implements Format.
 | |
| func (f *MPEGTS) PayloadType() uint8 {
 | |
| 	return 33
 | |
| }
 | |
| 
 | |
| // RTPMap implements Format.
 | |
| func (f *MPEGTS) RTPMap() string {
 | |
| 	return "MP2T/90000"
 | |
| }
 | |
| 
 | |
| // FMTP implements Format.
 | |
| func (f *MPEGTS) FMTP() map[string]string {
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| // PTSEqualsDTS implements Format.
 | |
| func (f *MPEGTS) PTSEqualsDTS(*rtp.Packet) bool {
 | |
| 	return true
 | |
| }
 | 
