2
# PiTiVi , Non-linear video editor
6
# Copyright (c) 2005, Edward Hervey <edward@fluendo.com>
8
# This program is free software; you can redistribute it and/or
9
# modify it under the terms of the GNU Lesser General Public
10
# License as published by the Free Software Foundation; either
11
# version 2.1 of the License, or (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
# Lesser General Public License for more details.
18
# You should have received a copy of the GNU Lesser General Public
19
# License along with this program; if not, write to the
20
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
# Boston, MA 02111-1307, USA.
24
Convenience functions for creating the output media sinks
28
# The plumber takes care of the sinks
30
# This is a required level of abstraction for the many different sinks that
39
""" Returns a video sink bin that can be used in the Discoverer """
41
gconfsink = gst.element_factory_make("gconfvideosink")
43
gconfsink = gst.element_factory_make("autovideosink")
44
gconfsink.realsink = None
46
gconfsink.set_state(gst.STATE_READY)
48
if not gconfsink.implements_interface(gst.interfaces.XOverlay):
49
gconfsink.info("doesn't implement XOverlay interface")
50
realsink = gconfsink.get_by_interface(gst.interfaces.XOverlay)
52
gst.info("%s" % list(gconfsink.elements()))
53
gconfsink.warning("couldn't even find an XOverlay within!!!")
55
realsink.info("implements XOverlay interface")
56
gconfsink.set_xwindow_id = realsink.set_xwindow_id
57
gconfsink.expose = realsink.expose
58
gconfsink.realsink = realsink
60
gconfsink.realsink = gconfsink
61
if gconfsink.realsink:
62
if "force-aspect-ratio"in [prop.name for prop in gobject.list_properties(gconfsink.realsink)]:
63
gconfsink.realsink.set_property("force-aspect-ratio", True)
64
if "qos"in [prop.name for prop in gobject.list_properties(gconfsink.realsink)]:
65
gconfsink.realsink.set_property("qos", False)
66
if "max-lateness"in [prop.name for prop in gobject.list_properties(gconfsink.realsink)]:
67
gconfsink.realsink.set_property("max-lateness", -1)
71
""" Returns an audio sink bin that can be used in the Discoverer """
73
gconfsink = gst.element_factory_make("gconfaudiosink")
75
gconfsink = gst.element_factory_make("autoaudiosink")