link to mediacommon (#223)

* move codecs and bits to mediacommon

* add SafeSetParams() to H264 and H265

* update README
This commit is contained in:
Alessandro Ros
2023-04-01 16:38:08 +02:00
committed by GitHub
parent af3ed2bd83
commit f905598d2e
287 changed files with 329 additions and 6381 deletions

View File

@@ -8,21 +8,21 @@ import (
type MPEG2Audio struct{}
// String implements Format.
func (t *MPEG2Audio) String() string {
func (f *MPEG2Audio) String() string {
return "MPEG2-audio"
}
// ClockRate implements Format.
func (t *MPEG2Audio) ClockRate() int {
func (f *MPEG2Audio) ClockRate() int {
return 90000
}
// PayloadType implements Format.
func (t *MPEG2Audio) PayloadType() uint8 {
func (f *MPEG2Audio) PayloadType() uint8 {
return 14
}
func (t *MPEG2Audio) unmarshal(
func (f *MPEG2Audio) unmarshal(
payloadType uint8, clock string, codec string,
rtpmap string, fmtp map[string]string,
) error {
@@ -30,11 +30,11 @@ func (t *MPEG2Audio) unmarshal(
}
// Marshal implements Format.
func (t *MPEG2Audio) Marshal() (string, map[string]string) {
func (f *MPEG2Audio) Marshal() (string, map[string]string) {
return "", nil
}
// PTSEqualsDTS implements Format.
func (t *MPEG2Audio) PTSEqualsDTS(*rtp.Packet) bool {
func (f *MPEG2Audio) PTSEqualsDTS(*rtp.Packet) bool {
return true
}