@@ -81,19 +81,21 @@ public Response listDevice(String namespaceId, int offset, int line, String pref
8181 }
8282
8383 /*
84- * 启动设备
84+ * 启动设备拉流
8585 */
86- public Response startDevice (String namespaceId , String gbId ) throws QiniuException {
86+ public Response startDevice (String namespaceId , String gbId , String channels ) throws QiniuException {
8787 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 );
8990 }
9091
9192 /*
92- * 停止设备
93+ * 停止设备拉流
9394 */
94- public Response stopDevice (String namespaceId , String gbId ) throws QiniuException {
95+ public Response stopDevice (String namespaceId , String gbId , String channels ) throws QiniuException {
9596 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 );
9799 }
98100
99101}
0 commit comments