mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2026-04-22 15:47:06 +08:00
Merge pull request #2159 from ludufre/fix/mpegts-pcma-pcmu-probe
Add support PCMATapo for MPEG-TS source
This commit is contained in:
+13
-1
@@ -91,7 +91,7 @@ func (c *Producer) probe() error {
|
|||||||
case StreamTypeMetadata:
|
case StreamTypeMetadata:
|
||||||
for _, streamType := range pkt.Payload {
|
for _, streamType := range pkt.Payload {
|
||||||
switch streamType {
|
switch streamType {
|
||||||
case StreamTypeH264, StreamTypeH265, StreamTypeAAC, StreamTypePrivateOPUS:
|
case StreamTypeH264, StreamTypeH265, StreamTypeAAC, StreamTypePrivateOPUS, StreamTypePCMATapo:
|
||||||
waitType = append(waitType, streamType)
|
waitType = append(waitType, streamType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,6 +135,18 @@ func (c *Producer) probe() error {
|
|||||||
Codecs: []*core.Codec{codec},
|
Codecs: []*core.Codec{codec},
|
||||||
}
|
}
|
||||||
c.Medias = append(c.Medias, media)
|
c.Medias = append(c.Medias, media)
|
||||||
|
|
||||||
|
case StreamTypePCMATapo:
|
||||||
|
codec := &core.Codec{
|
||||||
|
Name: core.CodecPCMA,
|
||||||
|
ClockRate: 8000,
|
||||||
|
}
|
||||||
|
media := &core.Media{
|
||||||
|
Kind: core.KindAudio,
|
||||||
|
Direction: core.DirectionRecvonly,
|
||||||
|
Codecs: []*core.Codec{codec},
|
||||||
|
}
|
||||||
|
c.Medias = append(c.Medias, media)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user