Re: FsAppTransmitter / dummy call in nullprpl
David Woodhouse <[email protected]> Mon, 11 Dec 2017 10:13:42 +0000
| Newsgroups | gmane.comp.telephony.farsight.devel,gmane.comp.gnome.gaim.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 2017-12-10 at 21:02 +0000, David Woodhouse wrote:
> I'm thinking of following the precedent set by FsShmTransmitter and
> abusing the host and username fields of the FsCandidate, except not
> with filenames as FsShmTransmitter does it, but with pipeline
> descriptions to be handled by gst_parse_launch().
OK, so that much works, but I can't used named elements; those have to
have been created in the *same* pipeline description. So this code
doesn't work because there's no way to make it find "MyTestSrc" AFAICT:
GstElement *mysrc = gst_element_factory_make("audiotestsrc", "MyTestSrc");
gst_bin_add(GST_BIN(purple_media_manager_get_pipeline(mgr)), mysrc);
PurpleMediaCandidate *cand =
purple_media_candidate_new(NULL, 1,
PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
"filesink location=/tmp/pidgin.s16", 0);
g_object_set(cand, "username", "MyTestSrc.", NULL);
GList *cands = g_list_append (NULL, cand);
GList *codecs = g_list_append(NULL,
purple_media_codec_new(1, "audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1", PURPLE_MEDIA_AUDIO, 0));
purple_media_add_stream(media, sess, name,
PURPLE_MEDIA_AUDIO, TRUE,
"app", 0, NULL);
purple_media_add_remote_candidates(media, sess, name, cands);
// purple_media_set_send_codec(media, sess, codecs->data);
purple_media_set_remote_codecs(media, sess, name, codecs);
purple_media_stream_info(media, PURPLE_MEDIA_INFO_ACCEPT, sess, name, FALSE);
It looks like my sanest options are either to ditch the idea of a
generic FsPipelineTransmitter (as I suppose it would now be called) and
just do my own dedicated FsChimeTransmitter, or maybe to subclass the
AppSrc/AppSink elements to create ChimeSrc/ChimeSink, which take an
extra parameter which can tie them up with the correct data streams on
the back end, and thus I *can* generate them from a simple pipeline
description.
Olivier, I suppose the choice there comes down to whether you see any
benefit in merging a FsPipelineTransmitter upstream...?
_______________________________________________
Farstream-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/farstream-devel
smime.p7s
(application/x-pkcs7-signature, 4.8 KB) - not displayed