Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/moxygen
5 changes: 5 additions & 0 deletions src/MoqxCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

#include "MoqxCache.h"
#include "relay/NullConsumers.h"
#include <folly/logging/xlog.h>
#include <moxygen/MoQTrackProperties.h>

Expand Down Expand Up @@ -1293,6 +1294,10 @@ class MoqxCache::FetchWriteback : public FetchConsumer {
}
};

std::shared_ptr<TrackConsumer> MoqxCache::makePassiveConsumer(const FullTrackName& ftn) {
return getSubscribeWriteback(ftn, std::make_shared<moxygen::NullTrackConsumer>());
}

std::shared_ptr<TrackConsumer> MoqxCache::getSubscribeWriteback(
const FullTrackName& ftn,
std::shared_ptr<TrackConsumer> consumer
Expand Down
5 changes: 5 additions & 0 deletions src/MoqxCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class MoqxCache {
std::shared_ptr<moxygen::TrackConsumer> consumer
);

// Returns a TrackConsumer suitable for use as a passive forwarder subscriber.
// Objects delivered to it are written to the cache; nothing is forwarded
// downstream (the inner consumer is a NullTrackConsumer).
std::shared_ptr<moxygen::TrackConsumer> makePassiveConsumer(const moxygen::FullTrackName& ftn);

// Serves objects from the cache to the consumer. If objects in the range are
// not in cache, issue one-or-more FETCH'es upstream. Objects fetched from
// upstream are written back to the cache and passed to the consumer.
Expand Down
Loading
Loading