mirror of
https://bitbucket.org/ohhara/ohmulticastvideoscanner.git
synced 2025-06-08 16:36:26 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f445979318 | ||
|
9f477e32d2 | ||
|
ad95a4c05f | ||
|
20fcf95852 | ||
|
7181e74c46 | ||
|
ffc2d1c497 | ||
|
db12c70938 |
13
INSTALL.macos
Normal file
13
INSTALL.macos
Normal file
@ -0,0 +1,13 @@
|
||||
1) Install Mac OS X El Capitan Version 10.11.6
|
||||
|
||||
2) Install Homebrew from http://brew.sh
|
||||
|
||||
3) Run as follows.
|
||||
-------------------------------------------------------------------------------
|
||||
$ brew install gstreamer gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav
|
||||
$ git clone https://bitbucket.org/ohhara/ohmulticastvideoscanner.git
|
||||
$ cd ohmulticastvideoscanner
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo ./omvs 233.19.187.192/30 233.19.187.244 233.19.187.1
|
||||
-------------------------------------------------------------------------------
|
@ -23,11 +23,12 @@ $ pacman -S VCS base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-gstreamer
|
||||
|
||||
9) Start "MinGW-w64 Win64 Shell".
|
||||
|
||||
10) Run as follows. Set CFLAGS and LDFLAGS properly when you run ./configure.
|
||||
10) Run as follows. Set CFLAGS and LDFLAGS properly to find WinPcap Developer's
|
||||
Pack when you run ./configure.
|
||||
-------------------------------------------------------------------------------
|
||||
$ git clone https://bitbucket.org/ohhara/ohmulticastvideoscanner.git
|
||||
$ cd ohmultivideoscanner
|
||||
$ CFLAGS="-IWpdPack/Include" LDFLAGS="-LWpdPack/Lib/x64" ./configure
|
||||
$ CFLAGS="-I../WpdPack/Include" LDFLAGS="-L../WpdPack/Lib/x64" ./configure
|
||||
$ make
|
||||
$ ./omvs 233.19.187.192/30 233.19.187.244 233.19.187.1
|
||||
-------------------------------------------------------------------------------
|
||||
|
5
NEWS
5
NEWS
@ -1,3 +1,8 @@
|
||||
Oh! Multicast Video Scanner 0.4 2016-07-27
|
||||
===============================================================================
|
||||
* Support udp protocol.
|
||||
* Fix m3u filename collision.
|
||||
|
||||
Oh! Multicast Video Scanner 0.3 2016-02-23
|
||||
===============================================================================
|
||||
* Add waiting for multicast packet mode.
|
||||
|
202
README
202
README
@ -8,42 +8,186 @@ something, omvs tries to decode it with gstreamer and saves it as png file in
|
||||
the output directory. There are many cases omvs finds something but png file is
|
||||
not stored. Such as, the video is scrambled(encrypted, not free), multicasting
|
||||
data doesn't contain video(audio only, data only), gstreamer doesn't recognize
|
||||
it(unknown codec), etc. If you increase the number of jobs with "-j" command
|
||||
line option, you can scan faster. However, You need take caution, because it
|
||||
can cause network congestion.
|
||||
it(unknown codec), etc. If png file is successfully stored, the multicast ip
|
||||
address is stored in an m3u file in the output directory.
|
||||
|
||||
As omvs uses libpcap to capture raw packet, root privilege is required to run
|
||||
omvs.
|
||||
Disable all network device interfaces except for one network device interface
|
||||
is recommended, which means disabling all wifi network device interfaces and
|
||||
disabling all unused ethernet network device interfaces.
|
||||
|
||||
With "-i" option, you can decide which network device interface is used. Use the
|
||||
dev_idx from "-l" option output.
|
||||
With "-l" option, you can see the available network device interface list.
|
||||
With "-j" option, you can change the number of jobs. If you increase the number
|
||||
of jobs, you can scan faster. However, You need take caution, because it can
|
||||
cause network congestion.
|
||||
With "-o" option, you can change the output directory. The default directory is
|
||||
"omvs_out".
|
||||
With "-s" option, you can change how long you sleep after finishing scanning an
|
||||
multicast ip address before starting scanning the next ip address. The default
|
||||
is 1000ms(1 second).
|
||||
With "-t" option, you can change the scan timeout. The default scan timeout is
|
||||
10000ms(10 seconds). It tries to get png image file while scanning. If it can't
|
||||
get the png image file for the timeout, it gives up and tries the next
|
||||
multicast ip address.
|
||||
With "-u" option, you can scan with udp protocol instead of rtp protocol. The
|
||||
default is scanning with rtp protocol.
|
||||
With "-q" option, you can disable the log printing.
|
||||
With "-w" option, you can wait for the multicast packet without specifying the
|
||||
scanning ip addresses. When it detects multicast packet from the specified
|
||||
network device, it tries to scan the ip address from multicast packet and save
|
||||
the png file from the multicast ip address. In order to use "-w" option,
|
||||
the network device interface need to be connected where it can sniff multicast
|
||||
packet. The environment such as connection to switch hub without igmp-snooping
|
||||
function is necessary. Press Ctrl-C if you want to stop waiting.
|
||||
|
||||
As omvs uses libpcap(or WinPcap on MS Windows) to capture raw packet, root
|
||||
privilege is required to run omvs.
|
||||
|
||||
Run "./configure ; make" to build omvs. Run "./omvs" with scanning multicast ip
|
||||
addresses.
|
||||
addresses. For the detailed build information, consult INSTALL, INSTALL.ubuntu,
|
||||
or INSTALL.windows.
|
||||
|
||||
e.g.)
|
||||
Scanning multicast ip addresses.
|
||||
-------------------------------------------------------------------------------
|
||||
$ sudo ./omvs 233.19.187.192/30 233.19.187.244 233.19.187.1
|
||||
[0x21be1e0] start scanning 233.19.187.192
|
||||
[0x21be1e0] trying to save udp://233.19.187.192:5000 to omvs_out/233.19.187.192-5000.png
|
||||
[0x21be1e0] finish scanning 233.19.187.192
|
||||
[0x21be1e0] start scanning 233.19.187.193
|
||||
[0x21be1e0] trying to save udp://233.19.187.193:5000 to omvs_out/233.19.187.193-5000.png
|
||||
[0x21be1e0] finish scanning 233.19.187.193
|
||||
[0x21be1e0] start scanning 233.19.187.194
|
||||
[0x21be1e0] trying to save udp://233.19.187.194:5000 to omvs_out/233.19.187.194-5000.png
|
||||
[0x21be1e0] finish scanning 233.19.187.194
|
||||
[0x21be1e0] start scanning 233.19.187.195
|
||||
[0x21be1e0] trying to save udp://233.19.187.195:5000 to omvs_out/233.19.187.195-5000.png
|
||||
[0x21be1e0] finish scanning 233.19.187.195
|
||||
[0x21be1e0] start scanning 233.19.187.244
|
||||
[0x21be1e0] trying to save udp://233.19.187.244:5000 to omvs_out/233.19.187.244-5000.png
|
||||
[0x21be1e0] finish scanning 233.19.187.244
|
||||
[0x21be1e0] start scanning 233.19.187.1
|
||||
[0x21be1e0] finish scanning 233.19.187.1
|
||||
$ ifconfig
|
||||
eth0 Link encap:Ethernet HWaddr 80:ee:73:a2:58:4b
|
||||
inet addr:172.30.1.201 Bcast:172.30.1.255 Mask:255.255.255.0
|
||||
inet6 addr: fe80::82ee:73ff:fea2:584b/64 Scope:Link
|
||||
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
|
||||
RX packets:41357508 errors:0 dropped:5 overruns:0 frame:0
|
||||
TX packets:827665 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:1000
|
||||
RX bytes:56530625218 (56.5 GB) TX bytes:99250131 (99.2 MB)
|
||||
|
||||
eth1 Link encap:Ethernet HWaddr 80:ee:73:a2:58:4a
|
||||
UP BROADCAST MULTICAST MTU:1500 Metric:1
|
||||
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
|
||||
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:1000
|
||||
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
|
||||
|
||||
lo Link encap:Local Loopback
|
||||
inet addr:127.0.0.1 Mask:255.0.0.0
|
||||
inet6 addr: ::1/128 Scope:Host
|
||||
UP LOOPBACK RUNNING MTU:65536 Metric:1
|
||||
RX packets:38983 errors:0 dropped:0 overruns:0 frame:0
|
||||
TX packets:38983 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:0
|
||||
RX bytes:15278201 (15.2 MB) TX bytes:15278201 (15.2 MB)
|
||||
|
||||
$ sudo ./omvs -l
|
||||
dev_idx(0) dev_name(eth0) dev_desc((null))
|
||||
dev_idx(1) dev_name(bluetooth0) dev_desc(Bluetooth adapter number 0)
|
||||
dev_idx(2) dev_name(nflog) dev_desc(Linux netfilter log (NFLOG) interface)
|
||||
dev_idx(3) dev_name(nfqueue) dev_desc(Linux netfilter queue (NFQUEUE) interface)
|
||||
dev_idx(4) dev_name(eth1) dev_desc((null))
|
||||
dev_idx(5) dev_name(any) dev_desc(Pseudo-device that captures on all interfaces)
|
||||
dev_idx(6) dev_name(lo) dev_desc((null))
|
||||
$ sudo ./omvs -i 0 233.19.187.192/30 233.19.187.244 233.19.187.1
|
||||
openning omvs_out/omvs_67883420797.m3u
|
||||
[0x18c6230] start scanning 233.19.187.192
|
||||
[0x18c6230] trying to save rtp://233.19.187.192:5000 to omvs_out/233.19.187.192-5000.png
|
||||
[0x18c6230] finish scanning 233.19.187.192
|
||||
[0x18c6230] start scanning 233.19.187.193
|
||||
[0x18c6230] trying to save rtp://233.19.187.193:5000 to omvs_out/233.19.187.193-5000.png
|
||||
[0x18c6230] finish scanning 233.19.187.193
|
||||
[0x18c6230] start scanning 233.19.187.194
|
||||
[0x18c6230] trying to save rtp://233.19.187.194:5000 to omvs_out/233.19.187.194-5000.png
|
||||
[0x18c6230] finish scanning 233.19.187.194
|
||||
[0x18c6230] start scanning 233.19.187.195
|
||||
[0x18c6230] trying to save rtp://233.19.187.195:5000 to omvs_out/233.19.187.195-5000.png
|
||||
[0x18c6230] finish scanning 233.19.187.195
|
||||
[0x18c6230] start scanning 233.19.187.244
|
||||
[0x18c6230] trying to save rtp://233.19.187.244:5000 to omvs_out/233.19.187.244-5000.png
|
||||
[0x18c6230] finish scanning 233.19.187.244
|
||||
[0x18c6230] start scanning 233.19.187.1
|
||||
[0x18c6230] finish scanning 233.19.187.1
|
||||
$ ls -l omvs_out
|
||||
total 1960
|
||||
-rw-r--r-- 1 root root 545742 Jan 23 21:55 233.19.187.193-5000.png
|
||||
-rw-r--r-- 1 root root 477971 Jan 23 21:55 233.19.187.194-5000.png
|
||||
-rw-r--r-- 1 root root 398304 Jan 23 21:55 233.19.187.195-5000.png
|
||||
-rw-r--r-- 1 root root 574233 Jan 23 21:55 233.19.187.244-5000.png
|
||||
total 1692
|
||||
-rw-r--r-- 1 root root 442585 Mar 3 01:54 233.19.187.193-5000.png
|
||||
-rw-r--r-- 1 root root 600331 Mar 3 01:54 233.19.187.194-5000.png
|
||||
-rw-r--r-- 1 root root 217721 Mar 3 01:54 233.19.187.195-5000.png
|
||||
-rw-r--r-- 1 root root 458283 Mar 3 01:54 233.19.187.244-5000.png
|
||||
-rw-r--r-- 1 root root 160 Mar 3 01:54 omvs_67883420797.m3u
|
||||
$ cat omvs_out/omvs_67883420797.m3u
|
||||
#EXTM3U
|
||||
#EXTINF:1,1
|
||||
rtp://233.19.187.193:5000
|
||||
#EXTINF:2,2
|
||||
rtp://233.19.187.194:5000
|
||||
#EXTINF:3,3
|
||||
rtp://233.19.187.195:5000
|
||||
#EXTINF:4,4
|
||||
rtp://233.19.187.244:5000
|
||||
$
|
||||
-------------------------------------------------------------------------------
|
||||
Waiting for the multicast packet.
|
||||
-------------------------------------------------------------------------------
|
||||
$ ifconfig
|
||||
eth0 Link encap:Ethernet HWaddr 80:ee:73:a2:58:4b
|
||||
inet6 addr: fe80::82ee:73ff:fea2:584b/64 Scope:Link
|
||||
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
|
||||
RX packets:41357843 errors:0 dropped:5 overruns:0 frame:0
|
||||
TX packets:828004 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:1000
|
||||
RX bytes:56530695954 (56.5 GB) TX bytes:99292621 (99.2 MB)
|
||||
|
||||
eth1 Link encap:Ethernet HWaddr 80:ee:73:a2:58:4a
|
||||
inet addr:183.101.193.195 Bcast:183.101.193.255 Mask:255.255.255.0
|
||||
inet6 addr: fe80::82ee:73ff:fea2:584a/64 Scope:Link
|
||||
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
|
||||
RX packets:408 errors:0 dropped:0 overruns:0 frame:0
|
||||
TX packets:149 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:1000
|
||||
RX bytes:44532 (44.5 KB) TX bytes:23688 (23.6 KB)
|
||||
|
||||
lo Link encap:Local Loopback
|
||||
inet addr:127.0.0.1 Mask:255.0.0.0
|
||||
inet6 addr: ::1/128 Scope:Host
|
||||
UP LOOPBACK RUNNING MTU:65536 Metric:1
|
||||
RX packets:39301 errors:0 dropped:0 overruns:0 frame:0
|
||||
TX packets:39301 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:0
|
||||
RX bytes:15311882 (15.3 MB) TX bytes:15311882 (15.3 MB)
|
||||
|
||||
$ sudo ./omvs -l
|
||||
dev_idx(0) dev_name(eth0) dev_desc((null))
|
||||
dev_idx(1) dev_name(bluetooth0) dev_desc(Bluetooth adapter number 0)
|
||||
dev_idx(2) dev_name(nflog) dev_desc(Linux netfilter log (NFLOG) interface)
|
||||
dev_idx(3) dev_name(nfqueue) dev_desc(Linux netfilter queue (NFQUEUE) interface)
|
||||
dev_idx(4) dev_name(eth1) dev_desc((null))
|
||||
dev_idx(5) dev_name(any) dev_desc(Pseudo-device that captures on all interfaces)
|
||||
dev_idx(6) dev_name(lo) dev_desc((null))
|
||||
$ sudo ./omvs -i 4 -w
|
||||
openning omvs_out/omvs_68456824735.m3u
|
||||
[0x1029840] start scanning 233.18.158.252
|
||||
[0x1029840] trying to save rtp://233.18.158.252:1901 to omvs_out/233.18.158.252-1901.png
|
||||
[0x1029840] finish scanning 233.18.158.252
|
||||
[0x1029840] start scanning 233.14.173.241
|
||||
[0x1029840] trying to save rtp://233.14.173.241:5000 to omvs_out/233.14.173.241-5000.png
|
||||
[0x1029840] finish scanning 233.14.173.241
|
||||
[0x1029840] start scanning 233.18.158.250
|
||||
[0x1029840] trying to save rtp://233.18.158.250:1902 to omvs_out/233.18.158.250-1902.png
|
||||
[0x1029840] finish scanning 233.18.158.250
|
||||
[0x1029840] start scanning 233.18.158.206
|
||||
[0x1029840] trying to save rtp://233.18.158.206:5000 to omvs_out/233.18.158.206-5000.png
|
||||
[0x1029840] finish scanning 233.18.158.206
|
||||
[0x1029840] start scanning 233.18.158.75
|
||||
[0x1029840] trying to save rtp://233.18.158.75:5000 to omvs_out/233.18.158.75-5000.png
|
||||
[0x1029840] finish scanning 233.18.158.75
|
||||
^C$ ls -l omvs_out
|
||||
total 3876
|
||||
-rw-r--r-- 1 root root 1917823 Mar 3 02:05 233.18.158.206-5000.png
|
||||
-rw-r--r-- 1 root root 2040917 Mar 3 02:07 233.18.158.75-5000.png
|
||||
-rw-r--r-- 1 root root 83 Mar 3 02:07 omvs_68456824735.m3u
|
||||
$ cat omvs_out/omvs_68456824735.m3u
|
||||
#EXTM3U
|
||||
#EXTINF:1,1
|
||||
rtp://233.18.158.206:5000
|
||||
#EXTINF:2,2
|
||||
rtp://233.18.158.75:5000
|
||||
$
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
20
configure
vendored
20
configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for Oh! Multicast Video Scanner 0.3.
|
||||
# Generated by GNU Autoconf 2.69 for Oh! Multicast Video Scanner 0.4.
|
||||
#
|
||||
# Report bugs to <ohhara@postech.edu>.
|
||||
#
|
||||
@ -590,8 +590,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='Oh! Multicast Video Scanner'
|
||||
PACKAGE_TARNAME='omvs'
|
||||
PACKAGE_VERSION='0.3'
|
||||
PACKAGE_STRING='Oh! Multicast Video Scanner 0.3'
|
||||
PACKAGE_VERSION='0.4'
|
||||
PACKAGE_STRING='Oh! Multicast Video Scanner 0.4'
|
||||
PACKAGE_BUGREPORT='ohhara@postech.edu'
|
||||
PACKAGE_URL='http://ohhara.sarang.net/omvs'
|
||||
|
||||
@ -1332,7 +1332,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures Oh! Multicast Video Scanner 0.3 to adapt to many kinds of systems.
|
||||
\`configure' configures Oh! Multicast Video Scanner 0.4 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1402,7 +1402,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of Oh! Multicast Video Scanner 0.3:";;
|
||||
short | recursive ) echo "Configuration of Oh! Multicast Video Scanner 0.4:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1524,7 +1524,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
Oh! Multicast Video Scanner configure 0.3
|
||||
Oh! Multicast Video Scanner configure 0.4
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@ -1893,7 +1893,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by Oh! Multicast Video Scanner $as_me 0.3, which was
|
||||
It was created by Oh! Multicast Video Scanner $as_me 0.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -2757,7 +2757,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='omvs'
|
||||
VERSION='0.3'
|
||||
VERSION='0.4'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@ -13266,7 +13266,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by Oh! Multicast Video Scanner $as_me 0.3, which was
|
||||
This file was extended by Oh! Multicast Video Scanner $as_me 0.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -13333,7 +13333,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
Oh! Multicast Video Scanner config.status 0.3
|
||||
Oh! Multicast Video Scanner config.status 0.4
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([Oh! Multicast Video Scanner], [0.3], [ohhara@postech.edu], [omvs],
|
||||
AC_INIT([Oh! Multicast Video Scanner], [0.4], [ohhara@postech.edu], [omvs],
|
||||
[http://ohhara.sarang.net/omvs])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([-Wall])
|
||||
|
23
omvs_main.c
23
omvs_main.c
@ -37,6 +37,7 @@ static gchar *_omvs_outdir = "omvs_out";
|
||||
static gint _omvs_jobs = 1;
|
||||
static gint _omvs_sleep = 1000;
|
||||
static gint _omvs_timeout = 10000;
|
||||
static gboolean _omvs_udp_scan;
|
||||
static gboolean _omvs_quiet;
|
||||
static gboolean _omvs_wait;
|
||||
|
||||
@ -61,6 +62,8 @@ static GOptionEntry _omvs_entries[] =
|
||||
"Sleep time(milliseconds) between scans", "ms" },
|
||||
{ "timeout", 't', 0, G_OPTION_ARG_INT, &_omvs_timeout,
|
||||
"Timeout time(milliseconds) in each scan", "ms" },
|
||||
{ "udp", 'u', 0, G_OPTION_ARG_NONE, &_omvs_udp_scan,
|
||||
"Use udp protocol instead of rtp", NULL },
|
||||
{ "quiet", 'q', 0, G_OPTION_ARG_NONE, &_omvs_quiet,
|
||||
"Print no log except for errors", NULL },
|
||||
{ "wait", 'w', 0, G_OPTION_ARG_NONE, &_omvs_wait,
|
||||
@ -312,7 +315,11 @@ static gpointer _omvs_start_scan_job(gpointer data) {
|
||||
if (!is_udp_port_found) {
|
||||
gchar *uri;
|
||||
gchar *filename;
|
||||
uri = g_strdup_printf("rtp://%s:%d", addr_str, udp_port);
|
||||
if (_omvs_udp_scan) {
|
||||
uri = g_strdup_printf("udp://%s:%d", addr_str, udp_port);
|
||||
} else {
|
||||
uri = g_strdup_printf("rtp://%s:%d", addr_str, udp_port);
|
||||
}
|
||||
filename =
|
||||
g_strdup_printf("%s/%s-%d.png", _omvs_outdir, addr_str, udp_port);
|
||||
if (!_omvs_quiet) {
|
||||
@ -369,7 +376,11 @@ static gpointer _omvs_start_scan_job(gpointer data) {
|
||||
_omvs_m3u_idx++;
|
||||
g_mutex_lock(&_omvs_mutex);
|
||||
fprintf(_omvs_m3u_fp, "#EXTINF:%u,%u\n", _omvs_m3u_idx, _omvs_m3u_idx);
|
||||
fprintf(_omvs_m3u_fp, "rtp://%s:%u\n", addr_str, o_ipaddr->ports[j]);
|
||||
if (_omvs_udp_scan) {
|
||||
fprintf(_omvs_m3u_fp, "udp://%s:%u\n", addr_str, o_ipaddr->ports[j]);
|
||||
} else {
|
||||
fprintf(_omvs_m3u_fp, "rtp://%s:%u\n", addr_str, o_ipaddr->ports[j]);
|
||||
}
|
||||
fflush(_omvs_m3u_fp);
|
||||
g_mutex_unlock(&_omvs_mutex);
|
||||
}
|
||||
@ -566,7 +577,11 @@ static gint _omvs_wait_for_multicast_packet(void) {
|
||||
(haddr >> 16) & 0xff,
|
||||
(haddr >> 8) & 0xff,
|
||||
(haddr >> 0) & 0xff);
|
||||
uri = g_strdup_printf("rtp://%s:%u", addr_str, udp_port);
|
||||
if (_omvs_udp_scan) {
|
||||
uri = g_strdup_printf("udp://%s:%u", addr_str, udp_port);
|
||||
} else {
|
||||
uri = g_strdup_printf("rtp://%s:%u", addr_str, udp_port);
|
||||
}
|
||||
|
||||
if (!g_hash_table_replace(urihashtable, uri, addr_str)) {
|
||||
continue;
|
||||
@ -650,7 +665,7 @@ int main(int argc, char *argv[]) {
|
||||
omvs_gst_plugin_register();
|
||||
|
||||
g_mkdir(_omvs_outdir, 0755);
|
||||
time = g_get_monotonic_time();
|
||||
time = g_get_real_time();
|
||||
m3u_path = g_strdup_printf("%s/omvs_%" G_GUINT64_FORMAT ".m3u", _omvs_outdir,
|
||||
time);
|
||||
if (!_omvs_quiet) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user