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
# The plumber takes care of the sinks
26
# This is a required level of abstraction for the many different sinks that
34
def get_video_sink(pitivi):
35
""" Returns a video sink bin that can be used in the Discoverer """
37
gconfsink = gst.element_factory_make("gconfvideosink")
39
gconfsink = gst.element_factory_make("autovideosink")
40
gconfsink.realsink = None
42
gconfsink.set_state(gst.STATE_READY)
44
if not gconfsink.implements_interface(gst.interfaces.XOverlay):
45
gconfsink.info("doesn't implement XOverlay interface")
46
realsink = gconfsink.get_by_interface(gst.interfaces.XOverlay)
48
gst.info("%s" % list(gconfsink.elements()))
49
gconfsink.warning("couldn't even find an XOverlay within!!!")
51
realsink.info("implements XOverlay interface")
52
gconfsink.set_xwindow_id = realsink.set_xwindow_id
53
gconfsink.expose = realsink.expose
54
gconfsink.realsink = realsink
56
gconfsink.realsink = gconfsink
57
if gconfsink.realsink:
58
if "force-aspect-ratio"in [prop.name for prop in gobject.list_properties(gconfsink.realsink)]:
59
gconfsink.realsink.set_property("force-aspect-ratio", True)
62
def get_audio_sink(pitivi):
63
""" Returns an audio sink bin that can be used in the Discoverer """
65
gconfsink = gst.element_factory_make("gconfaudiosink")
67
gconfsink = gst.element_factory_make("autoaudiosink")