Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: timvideos/gst-switch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9a135ae8a7c7
Choose a base ref
...
head repository: timvideos/gst-switch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1fce46ddae4a
Choose a head ref

Commits on Sep 25, 2013

  1. Update .travis-setup.sh

    hyades committed Sep 25, 2013

    Verified

    This commit was signed with the committer’s verified signature.
    eramongodb Ezra Chung
    Copy the full SHA
    18caf85 View commit details
  2. Update README.md [ci skip]

    hyades committed Sep 25, 2013
    Copy the full SHA
    bdf23c6 View commit details

Commits on Sep 30, 2013

  1. Merge remote-tracking branch 'upstream/master'

    Conflicts:
    	README.md
    hyades committed Sep 30, 2013
    Copy the full SHA
    a7a707d View commit details
  2. Modified Coveralls Directory

    hyades committed Sep 30, 2013
    Copy the full SHA
    69f6bbf View commit details

Commits on Oct 6, 2013

  1. final saving

    Duzy Chan committed Oct 6, 2013
    Copy the full SHA
    c4f8fe3 View commit details

Commits on Oct 8, 2013

  1. accepting custom source segment for gst-switch-cap

    Duzy Chan committed Oct 8, 2013
    Copy the full SHA
    f41c341 View commit details
  2. concate all arguments for source segment

    Duzy Chan committed Oct 8, 2013
    Copy the full SHA
    d8d6b7a View commit details
  3. ptz-ui: add some paddings

    Duzy Chan committed Oct 8, 2013
    Copy the full SHA
    5e35e66 View commit details

Commits on Oct 10, 2013

  1. ptz: adjust padding/spacing/bolding

    Duzy Chan committed Oct 10, 2013
    Copy the full SHA
    6cb84d1 View commit details
  2. ptz: updates more spacing/padding

    Duzy Chan committed Oct 10, 2013
    Copy the full SHA
    7e699c2 View commit details

Commits on Oct 15, 2013

  1. bug fixes, fixed zooming feature

    Duzy Chan committed Oct 15, 2013
    Copy the full SHA
    2009f02 View commit details
  2. Copy the full SHA
    f8b0da2 View commit details
  3. Update gitignore

    hyades committed Oct 15, 2013
    Copy the full SHA
    47ec618 View commit details
  4. Copy the full SHA
    7e7e751 View commit details
  5. Remove upgrading

    hyades committed Oct 15, 2013
    Copy the full SHA
    3dd480b View commit details

Commits on Jan 11, 2014

  1. Copy the full SHA
    c35e738 View commit details
  2. Copy the full SHA
    d9be0a0 View commit details

Commits on Jan 12, 2014

  1. Copy the full SHA
    eba90e9 View commit details
  2. Removing extra whitespace

    hyades committed Jan 12, 2014
    Copy the full SHA
    b95336f View commit details

Commits on Mar 29, 2014

  1. Copy the full SHA
    414fc98 View commit details

Commits on Nov 2, 2014

  1. running hyades/ instead of timvideos/

    Aayush Ahuja committed Nov 2, 2014
    Copy the full SHA
    a918da0 View commit details

Commits on Nov 5, 2014

  1. changing master to use timvideos/

    Aayush Ahuja committed Nov 5, 2014
    Copy the full SHA
    684d771 View commit details
  2. adding upgrade to travis

    Aayush Ahuja committed Nov 5, 2014
    Copy the full SHA
    d46eea9 View commit details
  3. newline at python-api/scripts/switch_infinite_test.py

    Aayush Ahuja committed Nov 5, 2014
    Copy the full SHA
    d5b26fa View commit details
  4. Copy the full SHA
    574955a View commit details
  5. Merge pull request #26 from hyades/master

    Updated Readme, fixes
    mithro committed Nov 5, 2014
    Copy the full SHA
    1fce46d View commit details
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -24,6 +24,12 @@ imgurbash.sh.*
/configure
/depcomp
/docs/_build
/gstreamer
/gst-plugins-base
/gst-plugins-good
/gst-plugins-bad
/gst-plugins-base
/libvpx
/html
/htmlcov
/install-sh
3 changes: 1 addition & 2 deletions .travis-run.sh
Original file line number Diff line number Diff line change
@@ -45,8 +45,7 @@ case $TEST in
printf "Tests failed!\n"
exit -1
}
cd ../tools
coveralls -r .
coveralls -n -r $HOME/gst-switch-coverage
esac
esac || {
printf "Failed!\n!\n"
12 changes: 7 additions & 5 deletions .travis-setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#! /bin/bash -ex

sudo apt-get update
sudo apt-get -y upgrade
sudo pip install mock
sudo pip install pytest-cov
sudo pip install pytest-pep8
@@ -12,6 +11,8 @@ sudo apt-get -y install python-scipy ffmpeg
sudo apt-get -y install autoconf automake autopoint libbz2-dev libdv4-dev libfaac-dev libfaad-dev libgtk-3-dev libmjpegtools-dev libtag1-dev libasound2-dev libtool libvpx-dev libxv-dev libx11-dev libogg-dev libvorbis-dev libopencv-dev libcv-dev libhighgui-dev libv4l-dev pkg-config zlib1g-dev gtk-doc-tools yasm bison flex
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
export LD_LIBRARY_PATH=/usr/lib/
export GCOV_PREFIX=$HOME/gst-switch-coverage
cd ..
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
git checkout v1.2.0
@@ -28,7 +29,7 @@ sudo make install || {
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gstreamer
cd gstreamer
# git checkout 6c11da1
git checkout 6c11da1
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
@@ -49,7 +50,7 @@ sudo make install || {
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-base
cd gst-plugins-base
# git checkout a8df760
git checkout a8df760
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
@@ -70,7 +71,7 @@ sudo make install || {
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-good
cd gst-plugins-good
# git checkout d14d4c4
git checkout d14d4c4
./autogen.sh --enable-experimental --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
@@ -91,7 +92,7 @@ sudo make install || {
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly
cd gst-plugins-ugly
# git checkout 68985ba
git checkout 68985ba
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
@@ -130,6 +131,7 @@ sudo make install || {
exit -1
}
cd ..
cd gst-switch
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
6 changes: 3 additions & 3 deletions docs/FORKING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
##Forking Gst-Switch

To fork this project, click the "Fork" button at [Gst-Switch Github Page](https://github.com/hyades/gst-switch "").
To fork this project, click the "Fork" button at [Gst-Switch Github Page](https://github.com/timvideos/gst-switch "").
![forking](https://github-images.s3.amazonaws.com/help/Bootcamp-Fork.png "forking")

Refer to the [Github Documentation](https://help.github.com/articles/fork-a-repo "") for further details.

##Running Tests

* Install gst-switch using instructions at [README.md](https://github.com/hyades/gst-switch/blob/master/README.md "").
* Install gst-switch using instructions at [README.md](https://github.com/timvideos/gst-switch/blob/master/README.md "").
* `cd python-api`
* make test
* For specific tests refer to [Python-API Readme](https://github.com/hyades/gst-switch/blob/master/python-api/README.md "").
* For specific tests refer to [Python-API Readme](https://github.com/timvideos/gst-switch/blob/master/python-api/README.md "").

##Sending Pull Requests for Changes

2 changes: 1 addition & 1 deletion python-api/.pylintrc_gstswitch
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ load-plugins=
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
disable=E0611,E0202,R0801,E1101,E1002
disable=E0611,E0202,R0801,E1101,E1002,R0904


[REPORTS]
2 changes: 1 addition & 1 deletion python-api/.pylintrc_integrationtests
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ load-plugins=
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
disable=E0611,E0202,R0801,E1101,E1002,R0201,F0401,W0141
disable=E0611,E0202,R0801,E1101,E1002,R0201,F0401,W0141,R0904


[REPORTS]
2 changes: 1 addition & 1 deletion python-api/.pylintrc_unittests
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ load-plugins=
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
disable=E0611,E0202,R0801,E1101,E1002,R0201,W0613,W0212,R0923
disable=E0611,E0202,R0801,E1101,E1002,R0201,W0613,W0212,R0923,R0904


[REPORTS]
103 changes: 103 additions & 0 deletions python-api/scripts/switch_infinite_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#!/usr/bin/env python

import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(__file__, "../..")))
# should be in PYTHONPATH
from gstswitch.server import Server
from gstswitch.testsource import BasePipeline
from gstswitch.helpers import *
from gstswitch.controller import Controller
import gi
import subprocess
import time
import psutil
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst
GObject.threads_init()
Gst.init(None)





PATH = '/usr/bin/'
INTERVAL = 1.0




s = Server(path=PATH)
v_port = s.video_port
a_port = s.audio_port
try:
s.run()

cmd_vid1 = PATH
cmd_vid2 = PATH
cmd_vid1 += """gst-launch-1.0 videotestsrc pattern=1 ! \
video/x-raw, width=300, height=200 !\
gdppay !
tcpclientsink port={0}
""".format(v_port)
print cmd_vid1

cmd_vid2 += """gst-launch-1.0 videotestsrc ! \
video/x-raw, width=300, height=200 !\
gdppay !
tcpclientsink port={0}
""".format(v_port)
print cmd_vid2

vid1 = subprocess.Popen(
cmd_vid1.split(),
bufsize=-1,
shell=False)
vid2 = subprocess.Popen(
cmd_vid2.split(),
bufsize=-1,
shell=False)
time.sleep(1)
sources = TestSources(audio_port=a_port)
sources.new_test_audio()
sources.new_test_audio()

controller = Controller()
controller.establish_connection()

cmd = PATH
cmd += """gst-switch-ui"""
cmd = " ".join(cmd.split())
with open('ui.log', 'w') as tempf:
ui_process = subprocess.Popen(
cmd.split(),
stdout=tempf,
stderr=tempf,
bufsize=-1,
shell=False)

params = [(65,3004), (65, 3003)]
i = 0
p = psutil.Process(s.pid)
cpu_usage_file = open("cpu.log", "w")
while 1:
# print i
cpu = p.get_cpu_percent(interval=INTERVAL)
mem = p.get_memory_percent()
print cpu
print mem
cpu_usage_file.write(str(cpu) + '\n' + str(mem) + '\n')
controller.switch(params[i][0], params[i][1])
# time.sleep(1)
i+=1
i%=2

#end all
sources.terminate_audio()
vid1.terminate()
vid2.terminate()
s.terminate()
finally:
if s.proc:
s.kill()

4 changes: 2 additions & 2 deletions python-api/tests/unittests/test_testsource_unit.py
Original file line number Diff line number Diff line change
@@ -395,7 +395,7 @@ def test_blank(self):

def test_range(self):
"""Test when frequency is not in range (negative)"""
tests = [-100, -1]
tests = [-100, -1]
port = 4000
for test in tests:
with pytest.raises(RangeError):
@@ -423,7 +423,7 @@ class TestAudioSrcWave(object):

def test_range(self):
"""Test when wave is not in range"""
tests = [-100, -1, 13, 1e2, '1e10']
tests = [-100, -1, 13, 1e2, '1e10']
port = 4000
for test in tests:
with pytest.raises(RangeError):
2 changes: 1 addition & 1 deletion scripts/apps/app_stage.sh
Original file line number Diff line number Diff line change
@@ -122,7 +122,7 @@ function clone-project()

function clone-duzy-project()
{
clone-project https://github.com/hyades $1 .git
clone-project https://github.com/timvideos $1 .git
}

function clone-gst-project()
4 changes: 2 additions & 2 deletions scripts/install2.sh
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
mkdir build
cd build
sudo apt-get install git python-pip
git clone https://github.com/hyades/gst-switch.git
git clone https://github.com/timvideos/gst-switch.git
cd gst-switch
chmod +x .travis-setup.sh
./.travis-setup.sh
./.travis-setup.sh
17 changes: 16 additions & 1 deletion tools/gstswitchcapture.c
Original file line number Diff line number Diff line change
@@ -71,6 +71,8 @@ G_DEFINE_TYPE (GstSwitchCaptureWorker, gst_switch_capture_worker,
gboolean verbose = FALSE;
const char *device = "/dev/ttyUSB0";
const char *protocol = "visca";
const char **srcsegments = NULL;
int srcsegmentc = 0;

static GOptionEntry options[] = {
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL},
@@ -119,7 +121,15 @@ gst_switch_capture_pipeline (GstWorker * worker, GstSwitchCapture * capture)
"filesrc location=\"/home/duzy/Downloads/locked-mode-7010.dv\" ");
g_string_append_printf (desc, "! dvdemux ! dvdec ");
} else {
g_string_append_printf (desc, "v4l2src ! tee name=video ");
if (0 < srcsegmentc && srcsegments) {
int n = 0;
for (; n < srcsegmentc; ++n) {
g_string_append_printf (desc, "%s ", srcsegments[n]);
}
} else {
g_string_append_printf (desc, "v4l2src ");
}
g_string_append_printf (desc, "! tee name=video ");
}

g_string_append_printf (desc, "video. ! queue2 ");
@@ -459,6 +469,11 @@ main (int argc, char **argv)
gst_switch_capture_parse_args (&argc, &argv);
gst_init (&argc, &argv);

if (1 < argc) {
srcsegments = (const char **) (argv + 1);
srcsegmentc = argc - 1;
}

capture = GST_SWITCH_CAPTURE (g_object_new (GST_TYPE_SWITCH_CAPTURE, NULL));

gst_switch_capture_run (capture);
Loading