完成了数据上报socket
This commit is contained in:
@@ -4,6 +4,8 @@ import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.cloud.live.manager.CameraFrameManager;
|
||||
import com.mogo.cloud.live.manager.LiveStreamManager;
|
||||
import com.mogo.cloud.live.manager.LiveStreamManagerImpl;
|
||||
import com.mogo.cloud.live.server.PushService;
|
||||
import com.mogo.cloud.util.Devices;
|
||||
|
||||
@@ -20,6 +22,9 @@ public class LivePushActivity extends BaseLiveActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// 初始化直播流管理
|
||||
LiveStreamManager liveStreamManager = LiveStreamManagerImpl.getInstance(this, Devices.getSn());
|
||||
liveStreamManager.uploadCamStatus(1, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -35,11 +40,11 @@ public class LivePushActivity extends BaseLiveActivity {
|
||||
public void toggleLive(boolean isLive) {
|
||||
Log.i(TAG, "toggleLive : " + isLive);
|
||||
this.isLive = isLive;
|
||||
if (isLive) {
|
||||
PushService.startService(this, PushService.ACTION_START_RTMP_PUSH, Devices.getSn());
|
||||
} else {
|
||||
PushService.startService(this, PushService.ACTION_STOP_RTMP_PUSH, null);
|
||||
}
|
||||
// if (isLive) {
|
||||
// PushService.startService(this, PushService.ACTION_START_RTMP_PUSH, Devices.getSn());
|
||||
// } else {
|
||||
// PushService.startService(this, PushService.ACTION_STOP_RTMP_PUSH, null);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user