sean.zhou
2023-02-24 a7aaeabc7873a0eafb4a7ecad7f65b018b7a9bc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.dji.sample.media.service;
 
import com.dji.sample.component.mqtt.model.CommonTopicReceiver;
import com.dji.sample.media.model.FileUploadDTO;
import org.springframework.messaging.MessageHeaders;
 
import java.util.List;
 
/**
 * @author sean
 * @version 0.2
 * @date 2021/12/9
 */
public interface IMediaService {
 
    /**
     * Check if the file has been uploaded by the fingerprint.
     * @param workspaceId
     * @param fingerprint
     * @return
     */
    Boolean fastUpload(String workspaceId, String fingerprint);
 
    /**
     * Save the basic information of the file to the database.
     * @param workspaceId
     * @param file
     * @return
     */
    Integer saveMediaFile(String workspaceId, FileUploadDTO file);
 
    /**
     * Query tiny fingerprints about all files in this workspace based on the workspace id.
     * @param workspaceId
     * @return
     */
    List<String> getAllTinyFingerprintsByWorkspaceId(String workspaceId);
 
    /**
     * Query the fingerprints that already exist in it based on the incoming tiny fingerprints data.
     * @param workspaceId
     * @param tinyFingerprints
     * @return
     */
    List<String> getExistTinyFingerprints(String workspaceId, List<String> tinyFingerprints);
 
    /**
     * Handle media files messages reported by dock.
     * @param receiver
     * @return
     */
    void handleFileUploadCallBack(CommonTopicReceiver receiver);
 
    /**
     * Handles the highest priority message about media uploads.
     * @param receiver
     * @param headers
     */
    void handleHighestPriorityUploadFlightTaskMedia(CommonTopicReceiver receiver, MessageHeaders headers);
}