Add basic support MPEG TS source

This commit is contained in:
Alexey Khit
2023-02-14 11:17:05 +03:00
parent 665545903c
commit 9fd783793e
8 changed files with 377 additions and 106 deletions
+26
View File
@@ -0,0 +1,26 @@
package mpegts
import (
"github.com/AlexxIT/go2rtc/pkg/streamer"
)
func (c *Client) GetMedias() []*streamer.Media {
return c.medias
}
func (c *Client) GetTrack(media *streamer.Media, codec *streamer.Codec) *streamer.Track {
for _, track := range c.tracks {
if track.Codec == codec {
return track
}
}
return nil
}
func (c *Client) Start() error {
return c.Handle()
}
func (c *Client) Stop() error {
return c.Close()
}