linking problem
sukirti kaw
sukirtikaw at gmail.com
Thu Sep 15 07:16:31 PDT 2011
Hello,
I am trying to mix video streams on new ssrc signal. But I thing there is
some problem with the linking part. Do I have to request a new sink pad for
videomixer and where do I request it and how do I do it? Please provide with
an example.
This is the part of my code. Please reply as early as possible as I am
running out of time and have to submit my Master Thesis next month.
def on_new_ssrc(rtpbin, session,ssrc):
global counter
struct = gst.Structure('on_new_ssrc')
#rtpbin.post_message(gst.message_new_application(rtpbin, struct))
print "new ssrc"
print " session", session
print " ssrc", ssrc
a = []
a.append(ssrc)
for i in range(0,len(a)):
print a[i]
print "counter starts"
if counter == 0:
print "count = 0"
videosrc1.set_property("pattern", 1)
videobox1.set_property("border-alpha", 0)
videobox1.set_property("alpha", 0.5)
videobox1.set_property("left", 0)
videobox1.set_property("top", 0)
gst.element_link_many(videosrc1, capsfilter1, videobox1, mixer)
print "Linked video1"
counter +=1
elif counter == 1:
print "count = 1"
videosrc2.set_property("pattern", 15)
videobox2.set_property("border-alpha", 0)
videobox2.set_property("alpha", 0.5)
videobox2.set_property("left", -320)
videobox2.set_property("top", 0)
gst.element_link_many(videosrc2, capsfilter2, videobox2, mixer)
print "Linked video2"
counter +=1
elif counter == 2:
print "count = 2"
videosrc3.set_property("pattern", 13)
videobox3.set_property("border-alpha", 0)
videobox3.set_property("alpha", 0.5)
videobox3.set_property("left", -320)
videobox3.set_property("top", -180)
gst.element_link_many(videosrc3, capsfilter3, videobox3, mixer)
print "Linked video3"
counter +=1
elif counter == 3:
print "count = 3"
videosrc4.set_property("pattern", 5)
videobox4.set_property("border-alpha", 0)
videobox4.set_property("alpha", 0.5)
videobox4.set_property("left", -320)
videobox4.set_property("top", -180)
gst.element_link_many(videosrc4, capsfilter4, videobox4, mixer)
print "Linked video4"
counter +=1
#pipeline.set_state(gst.STATE_PLAYING)
rtpbin = pipeline.get_by_name('rtpbin')
rtpbin.connect('on_new_ssrc', on_new_ssrc)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110915/3d926dfb/attachment.html>
More information about the gstreamer-devel
mailing list