[Pidgin] #16315: New API for private Raw and RTP data streams
Pidgin
trac at pidgin.im
Mon Mar 16 14:05:16 EDT 2015
#16315: New API for private Raw and RTP data streams
------------------------------------+------------------------
Reporter: kakaroto | Owner:
Type: patch | Status: new
Milestone: Patches Needing Review | Component: libpurple
Version: 3.0.0hg | Resolution:
Keywords: |
------------------------------------+------------------------
Comment (by kakaroto):
Hi David,
Thanks for all the work you've done with the patches.
One reason for using appsrc/appsink is because we can't let the plugin
provide us with a GstElement since the whole API is supposed to be
independent of gstreamer/farstream as there are many abstraction layers
there. Exposing the GstElement kind of defeats the purpose. While there is
the media-gst.h, I don't think having to use it should be needed in order
to use the MEDIA_APPLICATION.
As for the blocking calls, they aren't actually blocking unless you
specify it. Both the send and receive APIs have a blocking argument which
if set to FALSE will make it non-blocking, otherwise, after it sends the
data to the pipeline, it will wait until the data is flushed before
returning.
If you see them as blocking writes, it's possible that sipe is doing it
that way. While data does travel through the main thread, it's only when
it goes from/to pidgin, but otherwise, it gets sent to appsrc/appsink
which have their own threads and all the processing is in that thread.
It's possible something else needs to be optimized to avoid the issue
you're experiencing.
As for using filesrc/fdsrc, I'm not sure it's a good idea, mostly because
I don't think there's any protocol which takes raw data this way, it will
always be encapsulated somehow, so you will always need to modify the data
in one way or another.
As you can see here :
https://github.com/tieto/sipe/commit/bae7b738dfe31baafbe50200f5895fc432fc170a
for file transfers, you still need to parse the packets to see if it's a
start-of-file, data-chunk, or end-of-file packet, so even with
filesrc/fdsrc or whatever, you still need data to go through the
application in order to be parsed, which means you need appsrc/apssink. It
might work with fdsrc/fdsink for RDP though since I don't think there is
any processing other than what freeRDP does.
I know you weren't saying it should be replaced with filesrc/filesink, but
I'm just saying that removing the appsrc/appsink system will just cause it
to be moved into sipe for file transfers and you may have the exact same
issues which are making you disliking it at the moment.
It looks like some profiling may be in order...
Thanks.
--
Ticket URL: <https://developer.pidgin.im/ticket/16315#comment:12>
Pidgin <https://pidgin.im>
Pidgin
More information about the Tracker
mailing list