mirror of
https://github.com/aler9/gortsplib
synced 2025-09-30 04:52:12 +08:00

* remove Medias.Clone(), Media.Clone(), Format.Clone() * server: use random UUIDs as media IDs * client: use random UUIDs as media IDs
38 lines
667 B
Go
38 lines
667 B
Go
package format
|
|
|
|
import (
|
|
"github.com/pion/rtp"
|
|
)
|
|
|
|
// JPEG is a JPEG format.
|
|
type JPEG struct{}
|
|
|
|
// String implements Format.
|
|
func (t *JPEG) String() string {
|
|
return "JPEG"
|
|
}
|
|
|
|
// ClockRate implements Format.
|
|
func (t *JPEG) ClockRate() int {
|
|
return 90000
|
|
}
|
|
|
|
// PayloadType implements Format.
|
|
func (t *JPEG) PayloadType() uint8 {
|
|
return 26
|
|
}
|
|
|
|
func (t *JPEG) unmarshal(payloadType uint8, clock string, codec string, rtpmap string, fmtp string) error {
|
|
return nil
|
|
}
|
|
|
|
// Marshal implements Format.
|
|
func (t *JPEG) Marshal() (string, string) {
|
|
return "JPEG/90000", ""
|
|
}
|
|
|
|
// PTSEqualsDTS implements Format.
|
|
func (t *JPEG) PTSEqualsDTS(*rtp.Packet) bool {
|
|
return true
|
|
}
|