mediainfo: create a binary to preparse files
2 unresolved threads
2 unresolved threads
The vlc-mediainfo binary take path from stdin separated by '\n' and return a preparsed input_item_t along side a list of input_attachment in a JSON format.
Merge request reports
Activity
Filter activity
- Resolved by Gabriel Lafond-Thenaille
- Resolved by Gabriel Lafond-Thenaille
- Resolved by Gabriel Lafond-Thenaille
- Resolved by Gabriel Lafond-Thenaille
- Resolved by Gabriel Lafond-Thenaille
- Resolved by Gabriel Lafond-Thenaille
- Resolved by Gabriel Lafond-Thenaille
- Resolved by Gabriel Lafond-Thenaille
- bin/mediainfo.c 0 → 100644
50 struct mediainfo { 51 libvlc_instance_t *vlc; 52 vlc_preparser_t *preparser; 53 vlc_queue_t queue; 54 uint32_t counter; 55 int wakeup_fd; 56 int wait_fd; 57 }; 58 59 static int mediainfo_Init(mediainfo_t *mi); 60 static void mediainfo_Clean(mediainfo_t *mi); 61 static int mediainfo_Preparse(mediainfo_t *mi, const char *path); 62 63 /* mi_media_t */ 64 struct mi_media { 65 mi_media_t *next; - Resolved by Gabriel Lafond-Thenaille
- Resolved by Gabriel Lafond-Thenaille
- bin/mediainfo.c 0 → 100644
441 } 442 break; 443 } 444 } 445 } 446 } 447 448 /**************************************************************************** 449 * main 450 *****************************************************************************/ 451 452 int main(int argc, char **argv) 453 { 454 VLC_UNUSED(argc); 455 VLC_UNUSED(argv); 456 read/write on stdin/stdout is blocking by default.
On posix, you might need to do the following:
#if O_NONBLOCK fcntl(STDIN_FILENO, F_SETFL, fcntl(STDIN_FILENO, F_GETFL) | O_NONBLOCK); fcntl(STDOUT_FILENO, F_SETFL, fcntl(STDOUT_FILENO, F_GETFL) | O_NONBLOCK); #endif
On Windows, you might need to use a specific API for async read/write https://learn.microsoft.com/fr-fr/windows/win32/fileio/synchronous-and-asynchronous-i-o?redirectedfrom=MSDN
But we should discuss that with people that already work on that kind of stuff on Windows.
added 1 commit
- 93e9df9f - mediainfo: create a binary to preparse files