blob: 3c29bba7872200362af3cf08cae8a487b263119e [file] [log] [blame]
#include <source/StreamingSource.h>
namespace android {
StreamingSource::StreamingSource()
: mCallbackFn(nullptr) {
}
void StreamingSource::setCallback(std::function<void(const std::shared_ptr<SBuffer> &)> cb) {
CHECK(cb);
mCallbackFn = cb;
}
void StreamingSource::onAccessUnit(const std::shared_ptr<SBuffer> &accessUnit) {
if (mCallbackFn) {
mCallbackFn(accessUnit);
}
}
} // namespace android