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: abce192f9944
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: 3832e83fe2c2
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Nov 10, 2014

  1. Copy the full SHA
    1711be4 View commit details

Commits on Nov 13, 2014

  1. Merge pull request #35 from mithro/avconv

    Newer versions of ubuntu have avconv.
    hyades committed Nov 13, 2014
    Copy the full SHA
    3832e83 View commit details
Showing with 14 additions and 4 deletions.
  1. +2 −1 .travis-setup.sh
  2. +10 −2 python-api/tests/integrationtests/compare.py
  3. +2 −1 scripts/install.sh
3 changes: 2 additions & 1 deletion .travis-setup.sh
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ sudo pip install pytest-pep8
sudo pip install pylint
sudo apt-get -y install libglib2.0-dev gir1.2-glib-2.0 libgirepository1.0-dev libglib2.0-0 python-gi
sudo apt-get -y install gstreamer0.10-plugins-good
sudo apt-get -y install python-scipy ffmpeg
sudo apt-get -y install python-scipy
sudo apt-get -y install ffmpeg || sudo apt-get -y install libav-tools
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/
12 changes: 10 additions & 2 deletions python-api/tests/integrationtests/compare.py
Original file line number Diff line number Diff line change
@@ -18,6 +18,14 @@
]


conv = None
if os.system('which ffmpeg > /dev/null') == 0:
conv = 'ffmpeg'
elif os.system('which avconv > /dev/null') == 0:
conv = 'avconv'
else:
raise SystemError("Need ffmpeg or avcon tools.")

class BaseCompareVideo(object):

"""Base class containing image operations"""
@@ -70,9 +78,9 @@ def generate_frames(self, directory=REF_FRAME_DIR):
if not os.path.exists(directory):
os.mkdir(directory)

cmd1 = "ffmpeg -i {0} -ss 00:00:02.000 -f image2 -vframes 1 \
cmd1 = conv + " -i {0} -ss 00:00:02.000 -f image2 -vframes 1 \
{1}/out{2}_1.png".format(self.video, directory, self.TESTS[self.test])
cmd2 = "ffmpeg -i {0} -ss 00:00:05.000 -f image2 -vframes 1 \
cmd2 = conv + " -i {0} -ss 00:00:05.000 -f image2 -vframes 1 \
{1}/out{2}_2.png".format(self.video, directory, self.TESTS[self.test])
# print cmd
proc = subprocess.Popen(
3 changes: 2 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
@@ -6,7 +6,8 @@ sudo pip install pytest-cov
sudo pip install pytest-pep8
sudo pip install pylint
sudo apt-get -y install libglib2.0-dev gir1.2-glib-2.0 libgirepository1.0-dev libglib2.0-0 python-gi
sudo apt-get -y install python-scipy ffmpeg
sudo apt-get -y install python-scipy
sudo apt-get -y install ffmpeg || sudo apt-get -y install libav-tools
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/