ec-node: drive session during announce
This commit is contained in:
parent
806d8ed84d
commit
becd56b42f
1 changed files with 8 additions and 8 deletions
|
|
@ -4259,16 +4259,16 @@ async fn wt_publish(args: WtPublishArgs) -> Result<()> {
|
|||
.await
|
||||
.context("failed to create moq-transport publisher")?;
|
||||
|
||||
tracing::info!("announcing track(s)");
|
||||
publisher
|
||||
.announce(reader)
|
||||
.await
|
||||
.context("publisher announce failed")?;
|
||||
|
||||
// Run the relay session pump in the background; publishing happens by writing objects to
|
||||
// the track writer via moq-pub's fMP4 parser.
|
||||
// Run the relay session pump in the background; announcing and publishing require the
|
||||
// session driver to be polled.
|
||||
let session_task = tokio::spawn(async move { session.run().await });
|
||||
|
||||
tracing::info!("announcing track(s)");
|
||||
match tokio::time::timeout(Duration::from_secs(5), publisher.announce(reader)).await {
|
||||
Ok(res) => res.context("publisher announce failed")?,
|
||||
Err(_) => anyhow::bail!("publisher announce timed out"),
|
||||
}
|
||||
|
||||
// Spawn ffmpeg to generate fMP4 suitable for hang/moq-mux.
|
||||
// We keep this conservative and deterministic-ish by default:
|
||||
// - single threaded x264
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue