FsAppTransmitter / dummy call in nullprpl

David Woodhouse dwmw2 at infradead.org
Mon Dec 11 05:13:42 EST 2017


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...?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4938 bytes
Desc: not available
URL: <https://pidgin.im/pipermail/devel/attachments/20171211/2a36c0e1/attachment.bin>


More information about the Devel mailing list