mirror of
https://bitbucket.org/ohhara/ohmulticastvideoscanner.git
synced 2025-06-07 07:56:20 +00:00
Change output filename to output directory name.
This commit is contained in:
parent
b0d6263589
commit
7ad2c4b910
10
omvs_main.c
10
omvs_main.c
@ -1,11 +1,13 @@
|
||||
#include <string.h>
|
||||
#include <pcap.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
static gint _omvs_net_dev_idx;
|
||||
static gboolean _omvs_list_devs;
|
||||
static gchar *_omvs_output = "omvs_out.txt";
|
||||
static gchar *_omvs_outdir = "omvs_out";
|
||||
static gint _omvs_jobs = 1;
|
||||
static gint _omvs_sleep = 1000;
|
||||
static gint _omvs_timeout = 10000;
|
||||
@ -23,8 +25,8 @@ static GOptionEntry _omvs_entries[] =
|
||||
"List network device interfaces", NULL },
|
||||
{ "jobs", 'j', 0, G_OPTION_ARG_INT, &_omvs_jobs,
|
||||
"Number of jobs", "jobs" },
|
||||
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &_omvs_output,
|
||||
"Output filename", "filename" },
|
||||
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &_omvs_outdir,
|
||||
"Output directory name", "dirname" },
|
||||
{ "sleep", 's', 0, G_OPTION_ARG_INT, &_omvs_sleep,
|
||||
"Sleep time(milliseconds) between scans", "ms" },
|
||||
{ "timeout", 't', 0, G_OPTION_ARG_INT, &_omvs_timeout,
|
||||
@ -224,6 +226,8 @@ int main(int argc, char *argv[]) {
|
||||
gint idx_ipaddr;
|
||||
OMVSScanner omvs_scanner;
|
||||
|
||||
g_mkdir(_omvs_outdir, 0755);
|
||||
|
||||
if (_omvs_init_net_devs_info() != 0) {
|
||||
ret = -5;
|
||||
goto finish_return2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user