@@ -571,11 +571,11 @@ srs_error_t SrsRtmpConn::stream_service_cycle()
571
571
rtmp->set_send_timeout (SRS_CONSTS_RTMP_TIMEOUT);
572
572
573
573
// find a source to serve.
574
- SrsLiveSource* live_source = NULL ;
575
- if ((err = _srs_sources->fetch_or_create (req, server, & live_source)) != srs_success) {
574
+ SrsSharedPtr< SrsLiveSource> live_source;
575
+ if ((err = _srs_sources->fetch_or_create (req, server, live_source)) != srs_success) {
576
576
return srs_error_wrap (err, " rtmp: fetch source" );
577
577
}
578
- srs_assert (live_source != NULL );
578
+ srs_assert (live_source. get () != NULL );
579
579
580
580
bool enabled_cache = _srs_config->get_gop_cache (req->vhost );
581
581
int gcmf = _srs_config->get_gop_cache_max_frames (req->vhost );
@@ -699,7 +699,7 @@ srs_error_t SrsRtmpConn::check_vhost(bool try_default_vhost)
699
699
return err;
700
700
}
701
701
702
- srs_error_t SrsRtmpConn::playing (SrsLiveSource* source)
702
+ srs_error_t SrsRtmpConn::playing (SrsSharedPtr< SrsLiveSource> source)
703
703
{
704
704
srs_error_t err = srs_success;
705
705
@@ -786,7 +786,7 @@ srs_error_t SrsRtmpConn::playing(SrsLiveSource* source)
786
786
return err;
787
787
}
788
788
789
- srs_error_t SrsRtmpConn::do_playing (SrsLiveSource* source, SrsLiveConsumer* consumer, SrsQueueRecvThread* rtrd)
789
+ srs_error_t SrsRtmpConn::do_playing (SrsSharedPtr< SrsLiveSource> source, SrsLiveConsumer* consumer, SrsQueueRecvThread* rtrd)
790
790
{
791
791
srs_error_t err = srs_success;
792
792
@@ -923,7 +923,7 @@ srs_error_t SrsRtmpConn::do_playing(SrsLiveSource* source, SrsLiveConsumer* cons
923
923
return err;
924
924
}
925
925
926
- srs_error_t SrsRtmpConn::publishing (SrsLiveSource* source)
926
+ srs_error_t SrsRtmpConn::publishing (SrsSharedPtr< SrsLiveSource> source)
927
927
{
928
928
srs_error_t err = srs_success;
929
929
@@ -969,7 +969,7 @@ srs_error_t SrsRtmpConn::publishing(SrsLiveSource* source)
969
969
return err;
970
970
}
971
971
972
- srs_error_t SrsRtmpConn::do_publishing (SrsLiveSource* source, SrsPublishRecvThread* rtrd)
972
+ srs_error_t SrsRtmpConn::do_publishing (SrsSharedPtr< SrsLiveSource> source, SrsPublishRecvThread* rtrd)
973
973
{
974
974
srs_error_t err = srs_success;
975
975
@@ -1073,7 +1073,7 @@ srs_error_t SrsRtmpConn::do_publishing(SrsLiveSource* source, SrsPublishRecvThre
1073
1073
return err;
1074
1074
}
1075
1075
1076
- srs_error_t SrsRtmpConn::acquire_publish (SrsLiveSource* source)
1076
+ srs_error_t SrsRtmpConn::acquire_publish (SrsSharedPtr< SrsLiveSource> source)
1077
1077
{
1078
1078
srs_error_t err = srs_success;
1079
1079
@@ -1141,7 +1141,7 @@ srs_error_t SrsRtmpConn::acquire_publish(SrsLiveSource* source)
1141
1141
return err;
1142
1142
}
1143
1143
1144
- void SrsRtmpConn::release_publish (SrsLiveSource* source)
1144
+ void SrsRtmpConn::release_publish (SrsSharedPtr< SrsLiveSource> source)
1145
1145
{
1146
1146
// when edge, notice edge to change state.
1147
1147
// when origin, notice all service to unpublish.
@@ -1152,7 +1152,7 @@ void SrsRtmpConn::release_publish(SrsLiveSource* source)
1152
1152
}
1153
1153
}
1154
1154
1155
- srs_error_t SrsRtmpConn::handle_publish_message (SrsLiveSource* source, SrsCommonMessage* msg)
1155
+ srs_error_t SrsRtmpConn::handle_publish_message (SrsSharedPtr< SrsLiveSource>& source, SrsCommonMessage* msg)
1156
1156
{
1157
1157
srs_error_t err = srs_success;
1158
1158
@@ -1193,7 +1193,7 @@ srs_error_t SrsRtmpConn::handle_publish_message(SrsLiveSource* source, SrsCommon
1193
1193
return err;
1194
1194
}
1195
1195
1196
- srs_error_t SrsRtmpConn::process_publish_message (SrsLiveSource* source, SrsCommonMessage* msg)
1196
+ srs_error_t SrsRtmpConn::process_publish_message (SrsSharedPtr< SrsLiveSource>& source, SrsCommonMessage* msg)
1197
1197
{
1198
1198
srs_error_t err = srs_success;
1199
1199
0 commit comments