Skip to content

Commit

Permalink
Added Push state (Connecting)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keukhan committed Aug 20, 2024
1 parent 7daf7c9 commit 8cd6814
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/projects/base/info/push.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ namespace info
{
case PushState::Ready:
return "ready";
case PushState::Connecting:
return "connecting";
case PushState::Pushing:
return "pushing";
case PushState::Stopping:
Expand Down
1 change: 1 addition & 0 deletions src/projects/base/info/push.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace info
enum class PushState : int8_t
{
Ready,
Connecting,
Pushing,
Stopping,
Stopped,
Expand Down
5 changes: 4 additions & 1 deletion src/projects/publishers/push/push_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ namespace pub
bool PushSession::Start()
{
GetPush()->UpdatePushStartTime();
GetPush()->SetState(info::Push::PushState::Pushing);
GetPush()->SetState(info::Push::PushState::Connecting);


ov::String rtmp_url;
if (GetPush()->GetStreamKey().IsEmpty())
Expand Down Expand Up @@ -120,6 +121,8 @@ namespace pub
return false;
}

GetPush()->SetState(info::Push::PushState::Pushing);

logtd("PushSession(%d) has started.", GetId());

return Session::Start();
Expand Down

0 comments on commit 8cd6814

Please sign in to comment.