mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
7b27608a71
Original commit message from CVS: * configure.ac: * gst/Makefile.am: * gst/base.defs: * gst/gst-0.10.15.ignore: * gst/gst-0.10.16.ignore: * gst/gst-pb-0.10.15.ignore: * gst/gst-pb-0.10.16.ignore: * gst/gst.defs: * gst/gstversion.override.in: * gst/pbutils.override: * testsuite/test_pbutils.py: Series of update for new API added to 0.10.16. Remove wrong ignore file for 0.10.15 -base.
63 lines
2.7 KiB
Python
63 lines
2.7 KiB
Python
# -*- Mode: Python -*-
|
|
# vi:si:et:sw=4:sts=4:ts=4
|
|
#
|
|
# gst-python - Python bindings for GStreamer
|
|
# Copyright (C) 2008 Edward Hervey <edward.hervey@collabora.co.uk>
|
|
#
|
|
# This library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
#
|
|
# This library is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with this library; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
from common import gobject, gst, unittest, TestCase
|
|
|
|
class Descriptions(TestCase):
|
|
|
|
def testSourceDescription(self):
|
|
assert hasattr(gst.pbutils, 'get_source_description')
|
|
self.assertEquals(gst.pbutils.get_source_description("file"),
|
|
"FILE protocol source")
|
|
|
|
def testSinkDescription(self):
|
|
assert hasattr(gst.pbutils, 'get_sink_description')
|
|
self.assertEquals(gst.pbutils.get_sink_description("file"),
|
|
"FILE protocol sink")
|
|
|
|
def testDecoderDescription(self):
|
|
assert hasattr(gst.pbutils, 'get_decoder_description')
|
|
self.assertEquals(gst.pbutils.get_decoder_description(gst.caps_from_string("audio/mpeg,mpegversion=1,layer=3")),
|
|
'MPEG-1 Layer 3 (MP3) decoder')
|
|
|
|
def testCodecDescription(self):
|
|
assert hasattr(gst.pbutils, 'get_codec_description')
|
|
self.assertEquals(gst.pbutils.get_codec_description(gst.caps_from_string("audio/mpeg,mpegversion=1,layer=3")),
|
|
'MPEG-1 Layer 3 (MP3)')
|
|
|
|
def testEncoderDescription(self):
|
|
assert hasattr(gst.pbutils, 'get_encoder_description')
|
|
self.assertEquals(gst.pbutils.get_encoder_description(gst.caps_from_string("audio/mpeg,mpegversion=1,layer=3")),
|
|
'MPEG-1 Layer 3 (MP3) encoder')
|
|
|
|
def testElementDescription(self):
|
|
assert hasattr(gst.pbutils, 'get_element_description')
|
|
self.assertEquals(gst.pbutils.get_element_description("something"),
|
|
"GStreamer element something")
|
|
|
|
def testAddCodecDescription(self):
|
|
assert hasattr(gst.pbutils, 'add_codec_description_to_tag_list')
|
|
|
|
# TODO
|
|
# Add tests for the other parts of pbutils:
|
|
# * missing-plugins
|
|
# * install-plugins (and detect if there weren't compiled because of a version
|
|
# of plugins-base too low)
|
|
|