implement clearSessions methods on FFmpegKitConfig
This commit is contained in:
parent
caa53bedd8
commit
64d380290a
|
@ -1020,6 +1020,16 @@ public class FFmpegKitConfig {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Clears all, including ongoing, sessions in the session history.
|
||||
* <p>Note that callbacks cannot be triggered for deleted sessions.
|
||||
*/
|
||||
public static void clearSessions() {
|
||||
synchronized (sessionHistoryLock) {
|
||||
sessionHistoryList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Returns all FFmpeg sessions in the session history.
|
||||
*
|
||||
|
|
|
@ -329,6 +329,12 @@ typedef NS_ENUM(NSUInteger, Signal) {
|
|||
*/
|
||||
+ (NSArray*)getSessions;
|
||||
|
||||
/**
|
||||
* <p>Clears all, including ongoing, sessions in the session history.
|
||||
* <p>Note that callbacks cannot be triggered for deleted sessions.
|
||||
*/
|
||||
+ (void)clearSessions;
|
||||
|
||||
/**
|
||||
* <p>Returns all FFmpeg sessions in the session history.
|
||||
*
|
||||
|
|
|
@ -1072,6 +1072,14 @@ int executeFFprobe(long sessionId, NSArray* arguments) {
|
|||
return sessionsCopy;
|
||||
}
|
||||
|
||||
+ (void)clearSessions {
|
||||
[sessionHistoryLock lock];
|
||||
|
||||
[sessionHistoryList removeAllObjects];
|
||||
|
||||
[sessionHistoryLock unlock];
|
||||
}
|
||||
|
||||
+ (NSArray*)getFFmpegSessions {
|
||||
NSMutableArray* ffmpegSessions = [[NSMutableArray alloc] init];
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user