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: 02c1a548969f
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: 21b1d45122ce
Choose a head ref
  • 8 commits
  • 7 files changed
  • 2 contributors

Commits on Nov 24, 2014

  1. Copy the full SHA
    026dca1 View commit details
  2. Adding environment variables to make things cleaner.

     * Adding PYTHONPATH, allows linting without having to install the package.
    
     * Adding PYTHONWARNINGS=ignore, suppresses the following warnings;
    ```
    /usr/lib/python2.7/inspect.py:65: Warning: g_param_spec_boxed: assertion 'G_TYPE_IS_BOXED (boxed_type)' failed
      return isinstance(object, (type, types.ClassType))
    /usr/lib/python2.7/inspect.py:65: Warning: g_object_class_install_property: assertion 'G_IS_PARAM_SPEC (pspec)' failed
      return isinstance(object, (type, types.ClassType))
    ```
    mithro committed Nov 24, 2014
    Copy the full SHA
    6c03cfc View commit details
  3. Removing deprecated include-ids option.

    Fixed `Warning: option include-ids is deprecated and ignored.`
    mithro committed Nov 24, 2014

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    8374abc View commit details
  4. Fixing lint errors.

    mithro committed Nov 24, 2014
    Copy the full SHA
    79f4e3f View commit details
  5. Copy the full SHA
    0787bc7 View commit details
  6. PEP8 fixes.

    mithro committed Nov 24, 2014
    Copy the full SHA
    825b1cd View commit details

Commits on Nov 27, 2014

  1. Copy the full SHA
    9d5faf0 View commit details
  2. Merge pull request #41 from mithro/pylint-fixes

    Pylint fixes
    hyades committed Nov 27, 2014
    Copy the full SHA
    21b1d45 View commit details
9 changes: 4 additions & 5 deletions python-api/.pylintrc_gstswitch
Original file line number Diff line number Diff line change
@@ -33,7 +33,9 @@ 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,R0904
# * E0712(raising-non-exception) - pylint is unable to see glib.GError
# inherits from Exception.
disable=E0611,E0202,R0801,E1101,E1002,R0904,E0712,raising-non-exception


[REPORTS]
@@ -42,16 +44,13 @@ disable=E0611,E0202,R0801,E1101,E1002,R0904
# (visual studio) and html
output-format=text

# Include message's id in output
include-ids=no

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no

# Tells whether to display a full report or only the messages
reports=yes
reports=no

# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
7 changes: 2 additions & 5 deletions 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,R0904
disable=E0611,E0202,R0801,E1101,E1002,R0201,F0401,W0141,R0904,too-few-public-methods


[REPORTS]
@@ -42,16 +42,13 @@ disable=E0611,E0202,R0801,E1101,E1002,R0201,F0401,W0141,R0904
# (visual studio) and html
output-format=text

# Include message's id in output
include-ids=no

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no

# Tells whether to display a full report or only the messages
reports=yes
reports=no

# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
9 changes: 4 additions & 5 deletions python-api/.pylintrc_unittests
Original file line number Diff line number Diff line change
@@ -33,7 +33,9 @@ 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,R0904
# * E0712(raising-non-exception) - pylint is unable to see glib.GError
# inherits from Exception.
disable=E0611,E0202,R0801,E1101,E1002,R0201,W0613,W0212,R0923,R0904,raising-non-exception


[REPORTS]
@@ -42,16 +44,13 @@ disable=E0611,E0202,R0801,E1101,E1002,R0201,W0613,W0212,R0923,R0904
# (visual studio) and html
output-format=text

# Include message's id in output
include-ids=no

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no

# Tells whether to display a full report or only the messages
reports=yes
reports=no

# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
4 changes: 4 additions & 0 deletions python-api/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
.PHONY: lint unittests pytest integration test clean all

lint: export PYTHONWARNINGS := ignore
lint: export PYTHONPATH := ${PYTHONPATH}:${PWD}
lint:
@rm -rf tests/unittests/__pycache__
@rm -rf tests/integrationtests/__pycache__
@rm -rf reports
@echo PYTHONWARNINGS=$$PYTHONWARNINGS
@echo PYTHONPATH=$$PYTHONPATH
pylint --rcfile=.pylintrc_gstswitch gstswitch
pylint --rcfile=.pylintrc_unittests tests/unittests/*
pylint --rcfile=.pylintrc_integrationtests tests/integrationtests/*.py
11 changes: 6 additions & 5 deletions python-api/tests/integrationtests/compare.py
Original file line number Diff line number Diff line change
@@ -18,14 +18,15 @@
]


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


class BaseCompareVideo(object):

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

cmd1 = conv + " -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 = conv + " -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(
Original file line number Diff line number Diff line change
@@ -3,8 +3,9 @@
Usually should be run just once
"""

from compare import GenerateReferenceFrames
from test_controller import TestSetCompositeMode, TestAdjustPIP
from integrationtests.compare import GenerateReferenceFrames
from integrationtests.test_controller import TestSetCompositeMode
from integrationtests.test_controller import TestAdjustPIP


def set_composite_mode_ref_frames(mode):
2 changes: 1 addition & 1 deletion python-api/tests/integrationtests/test_controller.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
import time
import datetime

from compare import CompareVideo
from integrationtests.compare import CompareVideo

import subprocess