Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rafal/debug-sigsegv' into rafal/…
Browse files Browse the repository at this point in the history
…debug-sigsegv
  • Loading branch information
leszko committed Jan 13, 2025
2 parents c61ee5c + 3e36bfe commit fd731d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 0 additions & 4 deletions server/ai_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ func aiHttpHandle[I any](h *lphttp, decoderFunc func(*I, *http.Request) error) h

func (h *lphttp) StartLiveVideoToVideo() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if monitor.Enabled {
monitor.AILiveVideoAttempt()
}

remoteAddr := getRemoteAddr(r)
ctx := clog.AddVal(r.Context(), clog.ClientIP, remoteAddr)
requestID := string(core.RandomManifestID())
Expand Down
7 changes: 7 additions & 0 deletions server/ai_mediaserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ func (ls *LivepeerServer) StartLiveVideo() http.Handler {
return
}
}

mediaMTXClient := media.NewMediaMTXClient(remoteHost, ls.mediaMTXApiPassword, sourceID, sourceType)

if LiveAIAuthWebhookURL != nil {
Expand Down Expand Up @@ -488,6 +489,12 @@ func (ls *LivepeerServer) StartLiveVideo() http.Handler {
ctx = clog.AddVal(ctx, "stream_id", streamID)
clog.Infof(ctx, "Received live video AI request for %s. pipelineParams=%v", streamName, pipelineParams)

// Count `ai_live_attempts` after successful parameters validation
clog.V(common.VERBOSE).Infof(ctx, "AI Live video attempt")
if monitor.Enabled {
monitor.AILiveVideoAttempt()
}

// Kick off the RTMP pull and segmentation as soon as possible
ssr := media.NewSwitchableSegmentReader()
go func() {
Expand Down

0 comments on commit fd731d9

Please sign in to comment.