Re: [Farsight-devel] Can't send a video with Farsight/Telepathy (1/2)

2010-04-19 Thread Fabien LOUIS
Hi,

Thanks for your response.

For my test, I send camera in SLAVE console and a video file (with
uridecodebin) in MASTER console.
So, MASTER receive the slave's cam, but SLAVE receive nothing (no
'src_pad_added' signal)

The latest lines in MASTER were:
  === <__main__.TfListener object at 0x948354c> __src_pad_added ===
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
set_remote_codecs: called
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
set_remote_codecs: adding remote codec H264 [97]
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
set_remote_codecs: adding remote codec THEORA [96]
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
set_remote_codecs: adding remote codec H263 [34]
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
set_remote_codecs: adding remote codec JPEG [26]
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
set_remote_codecs: adding remote codec MPV [32]
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
set_remote_codecs: adding remote codec H263-1998 [98]
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
_tf_stream_try_sending_codecs: called (send_local:0 send_supported:1)
  (test_farsight.py:4914): tp-fs-DEBUG: stream 1 0x92e79f0 (video)
_tf_stream_try_sending_codecs: Ignoring new codecs because we're
sending, but we're not ready

I test also with a queue at the end of my source pipeline, no changes.
For my pipeline's creation, I use "gst.parse_bin_from_description".
I lookup your example for aMSN's farsight, but I don't quite understand it.

If you have any ideas,
Fabien


2010/4/15 Youness Alaoui :
> Hi,
>
> In your email (and the log), it doesn't say anything about why or *how* it
> doesn't work ? Can you explain in more details what exactly happens ? do you 
> get
> a gstreamer error ? or does the pipeline freeze? or the other side doesn't see
> anything? or the other side only sees noise.. etc...
>
> Also, although it probably doesn't matter, I usually put a queue at the end of
> the source pipeline when I use a decodebin, but I can't remember why I used to
> do that, maybe it helps prevent some issues like yours...
> Also, if you create the bin using that pipeline string and gst_parse_launch,
> then you should do this :
>    GST_OBJECT_FLAG_UNSET (bin, GST_ELEMENT_IS_SINK);
> otherwise it won't work. Because gst_parse_launch thinks the pipeline will be
> self sustained and will set the flags SRC and SINK on it, which will cause
> issues with the other elements in your farsight pipeline..
>
> See the aMSN's farsight code for how I did it (and tested it to work with
> scenarios like yours).
>
> http://amsn.svn.sourceforge.net/viewvc/amsn/trunk/amsn/utils/farsight/src/tcl_farsight.c?revision=11846&view=markup
> see from line 799 to 835.
>
> Youness.
>
>
> Fabien LOUIS wrote:
>> Hi all,
>>
>> Currently I have a test program which works with Telepathy and
>> Farsight. Its goal is to connect two clients (slave who listen and
>> master who initiate the call) and exchange video stream.
>> I can send "videotestsrc", the user's webcam with "gconfvideosrc" and
>> sound with "audiotestsrc".
>>
>> However, I am not able to send a video file with "uridecodebin". Why
>> do I need to do more changes in my code than changing the gstreamer
>> source line? Sending a video file or "videotestsrc" should be similar,
>> no ?
>> Here is the bin description I use: "uridecodebin
>> uri=file:///home/fabien/Bureau/Video/test.avi ! identity sync=True !
>> ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=320,height=240
>> ! ffmpegcolorspace ! timeoverlay"
>>
>> If anyone could explain me why it doesn't works and how can I fix my
>> problem, I would be very happy.
>> I attach my test file and the logs generated by the console.
>>
>> I run the first client (slave) with "reset ; killall telepathy-gabble
>> ; python ./test_farsight.py slave --autoconnect"
>> and then the second client (master) with "reset && python
>> test_farsight.py master --video".
>>
>> If you need more details, please ask me.
>>
>> Thank you very much,
>> Fabien
>>
>> PS: I will send debug files in a second mail.
>>
>>
>> 
>>
>> --
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>>
>>
>> 
>>
>> ___
>> Farsight-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/farsight-devel
>
>
>

--

Re: [Farsight-devel] Can't send a video with Farsight/Telepathy (1/2)

2010-04-15 Thread Youness Alaoui
Hi,

In your email (and the log), it doesn't say anything about why or *how* it
doesn't work ? Can you explain in more details what exactly happens ? do you get
a gstreamer error ? or does the pipeline freeze? or the other side doesn't see
anything? or the other side only sees noise.. etc...

Also, although it probably doesn't matter, I usually put a queue at the end of
the source pipeline when I use a decodebin, but I can't remember why I used to
do that, maybe it helps prevent some issues like yours...
Also, if you create the bin using that pipeline string and gst_parse_launch,
then you should do this :
GST_OBJECT_FLAG_UNSET (bin, GST_ELEMENT_IS_SINK);
otherwise it won't work. Because gst_parse_launch thinks the pipeline will be
self sustained and will set the flags SRC and SINK on it, which will cause
issues with the other elements in your farsight pipeline..

See the aMSN's farsight code for how I did it (and tested it to work with
scenarios like yours).

http://amsn.svn.sourceforge.net/viewvc/amsn/trunk/amsn/utils/farsight/src/tcl_farsight.c?revision=11846&view=markup
see from line 799 to 835.

Youness.


Fabien LOUIS wrote:
> Hi all,
> 
> Currently I have a test program which works with Telepathy and
> Farsight. Its goal is to connect two clients (slave who listen and
> master who initiate the call) and exchange video stream.
> I can send "videotestsrc", the user's webcam with "gconfvideosrc" and
> sound with "audiotestsrc".
> 
> However, I am not able to send a video file with "uridecodebin". Why
> do I need to do more changes in my code than changing the gstreamer
> source line? Sending a video file or "videotestsrc" should be similar,
> no ?
> Here is the bin description I use: "uridecodebin
> uri=file:///home/fabien/Bureau/Video/test.avi ! identity sync=True !
> ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=320,height=240
> ! ffmpegcolorspace ! timeoverlay"
> 
> If anyone could explain me why it doesn't works and how can I fix my
> problem, I would be very happy.
> I attach my test file and the logs generated by the console.
> 
> I run the first client (slave) with "reset ; killall telepathy-gabble
> ; python ./test_farsight.py slave --autoconnect"
> and then the second client (master) with "reset && python
> test_farsight.py master --video".
> 
> If you need more details, please ask me.
> 
> Thank you very much,
> Fabien
> 
> PS: I will send debug files in a second mail.
> 
> 
> 
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> 
> 
> 
> 
> ___
> Farsight-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/farsight-devel




signature.asc
Description: OpenPGP digital signature
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Farsight-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/farsight-devel


[Farsight-devel] Can't send a video with Farsight/Telepathy (1/2)

2010-04-14 Thread Fabien LOUIS
Hi all,

Currently I have a test program which works with Telepathy and
Farsight. Its goal is to connect two clients (slave who listen and
master who initiate the call) and exchange video stream.
I can send "videotestsrc", the user's webcam with "gconfvideosrc" and
sound with "audiotestsrc".

However, I am not able to send a video file with "uridecodebin". Why
do I need to do more changes in my code than changing the gstreamer
source line? Sending a video file or "videotestsrc" should be similar,
no ?
Here is the bin description I use: "uridecodebin
uri=file:///home/fabien/Bureau/Video/test.avi ! identity sync=True !
ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=320,height=240
! ffmpegcolorspace ! timeoverlay"

If anyone could explain me why it doesn't works and how can I fix my
problem, I would be very happy.
I attach my test file and the logs generated by the console.

I run the first client (slave) with "reset ; killall telepathy-gabble
; python ./test_farsight.py slave --autoconnect"
and then the second client (master) with "reset && python
test_farsight.py master --video".

If you need more details, please ask me.

Thank you very much,
Fabien

PS: I will send debug files in a second mail.
"""
Example to create a videoconferencing application using Farsight throught
Telepathy

@author: Fabien LOUIS, [email protected]
@date: December 2009

Copyright (C) 2009 Viotech Communications

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 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.

@Usage:
Just run two clients, one with "slave" parameter and seconds with "master"
parameter (master account initiate the call or slave accept the call).

@Scenario:
We start by connect each accounts (first the slave and then the master).
(see function on_status_changed_user)
When accounts are connected, we enable CHANNEL_TYPE_STREAMED_MEDIA capabilities
(see function function enable_capabilities)
on it and MASTER create a telepathy account.
(see function function create_telepathy_channel)

When the channel CHANNEL_TYPE_STREAMED_MEDIA is created and ready
(received by each contacts), we create an TfListener. But only the MASTER
offer a stream on it for SLAVE. SLAVE look if some streams already exists
on the telepathy channel and in this case, we accept the stream.

TfListener is a component which encapsulate farsight management (session
creation, stream creation, src pad adding, etc.).

We create a tfChannel linked with the telepathy channel path and connect it
with some farsight signals.

Once the stream is created and accepted, the farsight part started.
First, we get 'session-created' signal which call __on_session_created
On signal "session-created", we create the pipeline and add conference
on it. We set pipeline to PLAYING and we transfer all bus message to it.

Second, we get 'stream-get-codec-config' signal which call __on_stream_get_codec_config
On signal "stream-get-codec-config", we returns our codec configuration

Third, we get 'stream-created' which call __on_stream_created
On signal "stream-created", connect signals on stream and add source.
Then we link the stream's sink-pad  to source's src-pad.

If all works (codec negotiation and other things), we get 'src-pad-added' which
call __on_src_pad_added.
On signal "src-pad-added", we display stream's view
"""

##
MASTER_ACCOUNT = "[email protected]"
MASTER_PASSWORD = "Viovio"

SLAVE_ACCOUNT = "[email protected]"
SLAVE_PASSWORD = "Viovio"

LISTENER = None
##

import pygst
pygst.require('0.10')

import sys, os
import gobject, dbus.glib
import tpfarsight
import farsight, gst

os.environ["GST_PLUGIN_PATH"] = "/usr/local/lib/gstreamer-0.10"

##
## Debugging
##
#os.environ["GST_DEBUG"] = "fsrtp*:5"
#os.environ["GST_DEBUG"] = "1,fs*:2,rtp*:1"
#os.environ["GST_DEBUG"] = "*PAD*:5,*bin*:5"

import telepathy
from telepathy.interfaces import (
CONNECTION,
CONNECTION_MANAGER,
CONNECTION_INTERFACE_CAPABILITIES,
CHANNEL_TYPE_STREAMED_MEDIA,
CONNECTION_INTERFACE_REQUESTS,
CHANNEL_INTERFACE_GROUP,
)
from telepathy.constants import (
CONNECTION_STATUS_CONNECTED,
HANDLE_TYPE_CONTACT,
MEDIA_STREAM_TYPE_AUDIO,
MEDIA_STREAM_TYPE_VIDEO,
)

##
def debug_callback(sel