mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-23 11:44:14 +00:00
FS-7656 fix various edge cases with video and non video files mixed into a source, fix a typo bug in file_read_video and fix same bug in mod_vlc, add a new flag to file_read_video to check if the handle is has active video, make mod_conference move the video in and out of a layer when the stream has video or not
This commit is contained in:
1 parent
434d39d450
commit
385a3b545c
7 files changed
+175
-65
No files matched your search
@@ -559,6 +559,34 @@ SWITCH_DECLARE(switch_status_t) switch_dir_close(switch_dir_t *thedir)
|
||||
return status;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(uint32_t) switch_dir_count(switch_dir_t *thedir)
|
||||
{
|
||||
const char *name;
|
||||
apr_int32_t finfo_flags = APR_FINFO_DIRENT | APR_FINFO_TYPE | APR_FINFO_NAME;
|
||||
uint32_t count = 0;
|
||||
|
||||
apr_dir_rewind(thedir->dir_handle);
|
||||
|
||||
while (apr_dir_read(&(thedir->finfo), finfo_flags, thedir->dir_handle) == SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
if (thedir->finfo.filetype != APR_REG && thedir->finfo.filetype != APR_LNK) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(name = thedir->finfo.fname)) {
|
||||
name = thedir->finfo.name;
|
||||
}
|
||||
|
||||
if (name) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
apr_dir_rewind(thedir->dir_handle);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_dir_next_file(switch_dir_t *thedir, char *buf, switch_size_t len)
|
||||
{
|
||||
const char *fname = NULL;
|
||||
|
||||
Reference in new issue
Block a user