@@ -81,19 +81,21 @@ public Response listDevice(String namespaceId, int offset, int line, String pref
81
81
}
82
82
83
83
/*
84
- * 启动设备
84
+ * 启动设备拉流
85
85
*/
86
- public Response startDevice (String namespaceId , String gbId ) throws QiniuException {
86
+ public Response startDevice (String namespaceId , String gbId , String channels ) throws QiniuException {
87
87
String url = String .format ("%s/v1/namespaces/%s/devices/%s/start" , apiServer , namespaceId , gbId );
88
- return QvsResponse .post (url , new StringMap (), client , auth );
88
+ StringMap params = new StringMap ().put ("channels" , channels );
89
+ return QvsResponse .post (url , params , client , auth );
89
90
}
90
91
91
92
/*
92
- * 停止设备
93
+ * 停止设备拉流
93
94
*/
94
- public Response stopDevice (String namespaceId , String gbId ) throws QiniuException {
95
+ public Response stopDevice (String namespaceId , String gbId , String channels ) throws QiniuException {
95
96
String url = String .format ("%s/v1/namespaces/%s/devices/%s/stop" , apiServer , namespaceId , gbId );
96
- return QvsResponse .post (url , new StringMap (), client , auth );
97
+ StringMap params = new StringMap ().put ("channels" , channels );
98
+ return QvsResponse .post (url , params , client , auth );
97
99
}
98
100
99
101
}
0 commit comments