Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeoFlyApi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GeoFly
GeoFlyApi
Commits
81a735d3
Commit
81a735d3
authored
Aug 02, 2025
by
gdj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放行取流关流接口
parent
605e1caf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
0 deletions
+66
-0
sample/src/main/java/com/dji/sample/configuration/mvc/GlobalMVCConfigurer.java
+3
-0
sample/src/main/java/com/dji/sample/manage/controller/LiveStreamController.java
+34
-0
sample/src/main/java/com/dji/sample/manage/service/ILiveStreamService.java
+7
-0
sample/src/main/java/com/dji/sample/manage/service/impl/LiveStreamServiceImpl.java
+22
-0
No files found.
sample/src/main/java/com/dji/sample/configuration/mvc/GlobalMVCConfigurer.java
View file @
81a735d3
...
@@ -35,6 +35,9 @@ public class GlobalMVCConfigurer implements WebMvcConfigurer {
...
@@ -35,6 +35,9 @@ public class GlobalMVCConfigurer implements WebMvcConfigurer {
excludePaths
.
add
(
"/v3/**"
);
excludePaths
.
add
(
"/v3/**"
);
excludePaths
.
add
(
"/ui/**"
);
excludePaths
.
add
(
"/ui/**"
);
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/devices/**/deviceInfo"
);
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/devices/**/deviceInfo"
);
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/live/streams/start2"
);
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/live/streams/stop2"
);
excludePaths
.
add
(
"/"
+
managePrefix
+
manageVersion
+
"/live/oneCapacity2"
);
// Intercept for all request interfaces.
// Intercept for all request interfaces.
registry
.
addInterceptor
(
authInterceptor
).
addPathPatterns
(
"/**"
).
excludePathPatterns
(
excludePaths
);
registry
.
addInterceptor
(
authInterceptor
).
addPathPatterns
(
"/**"
).
excludePathPatterns
(
excludePaths
);
}
}
...
...
sample/src/main/java/com/dji/sample/manage/controller/LiveStreamController.java
View file @
81a735d3
...
@@ -64,6 +64,20 @@ public class LiveStreamController {
...
@@ -64,6 +64,20 @@ public class LiveStreamController {
}
}
/**
/**
* Get live capability data of all drones in the current user's workspace from the database.
* @param request
* @return live capability
*/
@GetMapping
(
"/oneCapacity2"
)
public
HttpResultResponse
<
CapacityDeviceDTO
>
getLiveCapacityByDeviceSn2
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"device_sn"
)
String
deviceSn
)
{
CapacityDeviceDTO
liveCapacity
=
liveStreamService
.
getLiveCapacity2
(
deviceSn
);
return
HttpResultResponse
.
success
(
liveCapacity
);
}
/**
* Live streaming according to the parameters passed in from the web side.
* Live streaming according to the parameters passed in from the web side.
* @param liveParam Live streaming parameters.
* @param liveParam Live streaming parameters.
* @return
* @return
...
@@ -74,6 +88,16 @@ public class LiveStreamController {
...
@@ -74,6 +88,16 @@ public class LiveStreamController {
}
}
/**
/**
* 不需要权限 Live streaming according to the parameters passed in from the web side.
* @param liveParam Live streaming parameters.
* @return
*/
@PostMapping
(
"/streams/start2"
)
public
HttpResultResponse
liveStart2
(
@RequestBody
LiveTypeDTO
liveParam
)
{
return
liveStreamService
.
liveStart
(
liveParam
);
}
/**
* Stop live streaming according to the parameters passed in from the web side.
* Stop live streaming according to the parameters passed in from the web side.
* @param liveParam Live streaming parameters.
* @param liveParam Live streaming parameters.
* @return
* @return
...
@@ -84,6 +108,16 @@ public class LiveStreamController {
...
@@ -84,6 +108,16 @@ public class LiveStreamController {
}
}
/**
/**
* 不需要权限 Stop live streaming according to the parameters passed in from the web side.
* @param liveParam Live streaming parameters.
* @return
*/
@PostMapping
(
"/streams/stop2"
)
public
HttpResultResponse
liveStop2
(
@RequestBody
LiveTypeDTO
liveParam
)
{
return
liveStreamService
.
liveStop
(
liveParam
.
getVideoId
());
}
/**
* Set the quality of the live streaming according to the parameters passed in from the web side.
* Set the quality of the live streaming according to the parameters passed in from the web side.
* @param liveParam Live streaming parameters.
* @param liveParam Live streaming parameters.
* @return
* @return
...
...
sample/src/main/java/com/dji/sample/manage/service/ILiveStreamService.java
View file @
81a735d3
...
@@ -23,6 +23,13 @@ public interface ILiveStreamService {
...
@@ -23,6 +23,13 @@ public interface ILiveStreamService {
CapacityDeviceDTO
getLiveCapacity
(
String
workspaceId
,
String
deviceSn
);
CapacityDeviceDTO
getLiveCapacity
(
String
workspaceId
,
String
deviceSn
);
/**
/**
* Get the drone data that can be broadcast live in this workspace.
* @param deviceSn 设备sn
* @return
*/
CapacityDeviceDTO
getLiveCapacity2
(
String
deviceSn
);
/**
* Get all the drone data that can be broadcast live in this workspace.
* Get all the drone data that can be broadcast live in this workspace.
* @param workspaceId
* @param workspaceId
* @return
* @return
...
...
sample/src/main/java/com/dji/sample/manage/service/impl/LiveStreamServiceImpl.java
View file @
81a735d3
...
@@ -69,6 +69,28 @@ public class LiveStreamServiceImpl implements ILiveStreamService {
...
@@ -69,6 +69,28 @@ public class LiveStreamServiceImpl implements ILiveStreamService {
}
}
@Override
@Override
public
CapacityDeviceDTO
getLiveCapacity2
(
String
deviceSn
)
{
// Query the devices in this workspace.
List
<
DeviceDTO
>
devicesList
=
deviceService
.
getDevicesByParams
(
DeviceQueryParam
.
builder
()
.
domains
(
List
.
of
(
DeviceDomainEnum
.
DRONE
.
getDomain
(),
DeviceDomainEnum
.
DOCK
.
getDomain
()))
.
deviceSn
(
deviceSn
)
.
build
());
CapacityDeviceDTO
capacityDeviceDTO
=
new
CapacityDeviceDTO
();
if
(
CollectionUtils
.
isEmpty
(
devicesList
))
{
return
capacityDeviceDTO
;
}
DeviceDTO
device
=
devicesList
.
get
(
0
);
capacityDeviceDTO
.
setName
(
Objects
.
requireNonNullElse
(
device
.
getNickname
(),
device
.
getDeviceName
()));
capacityDeviceDTO
.
setSn
(
device
.
getDeviceSn
());
capacityDeviceDTO
.
setCamerasList
(
capacityCameraService
.
getCapacityCameraByDeviceSn
(
device
.
getDeviceSn
()));
return
capacityDeviceDTO
;
}
@Override
public
List
<
CapacityDeviceDTO
>
getLiveCapacity
(
String
workspaceId
)
{
public
List
<
CapacityDeviceDTO
>
getLiveCapacity
(
String
workspaceId
)
{
// Query all devices in this workspace.
// Query all devices in this workspace.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment