Skip to content

Commit 8cd6814

Browse files
committed
Added Push state (Connecting)
1 parent 7daf7c9 commit 8cd6814

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/projects/base/info/push.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ namespace info
266266
{
267267
case PushState::Ready:
268268
return "ready";
269+
case PushState::Connecting:
270+
return "connecting";
269271
case PushState::Pushing:
270272
return "pushing";
271273
case PushState::Stopping:

src/projects/base/info/push.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace info
1717
enum class PushState : int8_t
1818
{
1919
Ready,
20+
Connecting,
2021
Pushing,
2122
Stopping,
2223
Stopped,

src/projects/publishers/push/push_session.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ namespace pub
4545
bool PushSession::Start()
4646
{
4747
GetPush()->UpdatePushStartTime();
48-
GetPush()->SetState(info::Push::PushState::Pushing);
48+
GetPush()->SetState(info::Push::PushState::Connecting);
49+
4950

5051
ov::String rtmp_url;
5152
if (GetPush()->GetStreamKey().IsEmpty())
@@ -120,6 +121,8 @@ namespace pub
120121
return false;
121122
}
122123

124+
GetPush()->SetState(info::Push::PushState::Pushing);
125+
123126
logtd("PushSession(%d) has started.", GetId());
124127

125128
return Session::Start();

0 commit comments

Comments
 (0)