胡斌

copy meta to consumers and forwarders,

this feature is missed when merge the modification about "implement save meta,need more test"
... ... @@ -1603,7 +1603,32 @@ int SrsSource::on_data(SrsCommonMessage* shared_data)
}
#endif
return ret;
// copy to all consumer
if (1) {
for (int i = 0; i < (int)consumers.size(); i++) {
SrsConsumer* consumer = consumers.at(i);
if ((ret = consumer->enqueue(&msg, atc, jitter_algorithm)) != ERROR_SUCCESS) {
srs_error("dispatch the video failed. ret=%d", ret);
return ret;
}
}
srs_info("dispatch video success.");
}
// copy to all forwarders.
if (!forwarders.empty()) {
std::vector<SrsForwarder*>::iterator it;
for (it = forwarders.begin(); it != forwarders.end(); ++it) {
SrsForwarder* forwarder = *it;
if ((ret = forwarder->on_meta_data(&msg)) != ERROR_SUCCESS) {
srs_error("forwarder process video message failed. ret=%d", ret);
return ret;
}
}
}
return ret;
}
int SrsSource::on_audio(SrsCommonMessage* shared_audio)
... ...