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
|
.await
|
||||||
.context("failed to create moq-transport publisher")?;
|
.context("failed to create moq-transport publisher")?;
|
||||||
|
|
||||||
tracing::info!("announcing track(s)");
|
// Run the relay session pump in the background; announcing and publishing require the
|
||||||
publisher
|
// session driver to be polled.
|
||||||
.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.
|
|
||||||
let session_task = tokio::spawn(async move { session.run().await });
|
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.
|
// Spawn ffmpeg to generate fMP4 suitable for hang/moq-mux.
|
||||||
// We keep this conservative and deterministic-ish by default:
|
// We keep this conservative and deterministic-ish by default:
|
||||||
// - single threaded x264
|
// - single threaded x264
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue