胡斌

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) @@ -1603,7 +1603,32 @@ int SrsSource::on_data(SrsCommonMessage* shared_data)
1603 } 1603 }
1604 #endif 1604 #endif
1605 1605
1606 - return ret; 1606 +
  1607 + // copy to all consumer
  1608 + if (1) {
  1609 + for (int i = 0; i < (int)consumers.size(); i++) {
  1610 + SrsConsumer* consumer = consumers.at(i);
  1611 + if ((ret = consumer->enqueue(&msg, atc, jitter_algorithm)) != ERROR_SUCCESS) {
  1612 + srs_error("dispatch the video failed. ret=%d", ret);
  1613 + return ret;
  1614 + }
  1615 + }
  1616 + srs_info("dispatch video success.");
  1617 + }
  1618 +
  1619 + // copy to all forwarders.
  1620 + if (!forwarders.empty()) {
  1621 + std::vector<SrsForwarder*>::iterator it;
  1622 + for (it = forwarders.begin(); it != forwarders.end(); ++it) {
  1623 + SrsForwarder* forwarder = *it;
  1624 + if ((ret = forwarder->on_meta_data(&msg)) != ERROR_SUCCESS) {
  1625 + srs_error("forwarder process video message failed. ret=%d", ret);
  1626 + return ret;
  1627 + }
  1628 + }
  1629 + }
  1630 +
  1631 + return ret;
1607 } 1632 }
1608 1633
1609 int SrsSource::on_audio(SrsCommonMessage* shared_audio) 1634 int SrsSource::on_audio(SrsCommonMessage* shared_audio)