GNOME Bugzilla – Bug 739801
Need to change DEFAULT_{AUDIO,VIDEO}SINK in application running time
Last modified: 2016-02-21 23:48:37 UTC
Created attachment 290204 [details] [review] default sink properties gstplaysink supports default sink by configure. In some circumstance like various SoCs, the setting by application is required when the upper layer application is running. This patch is about adding properties for default sink of playsink.
Why not just have the application set the sink directly using the audio-sink or video-sink property?
Yes, it's possible and I know setting sinks by properties is very convenient. However, please think about a strange circumstance that we can't modify the upper layer player codes and I don't know if the upper layer uses audio-sink, and video-sink properties. In this case, I used this approach to provide proper sinks only when the upper layer doesn't specify certain sinks.
What about ./configure --with-default-audiosink=xyz ?
I am very appreciate for your attention even though I missed something important to explain. Perhaps, this patch would be only for me, but I want to help if there's someone who have similar situation. :) This is my application layers. -------- Player (Uncontrollable) -------- Gstreamer Helper Functions (Controllable) -------- Gstreamer (Controllable) -------- In the player layer, they call the helper function like this, but I can't access and modify the codes of the player. To help understand, I'll describe pseudo codes. pipeline = create_pipeline_by_helper (); I provide the helper function, create_pipeline_by_helper, as a library. It looks like that. create_pipeline_by_helpder() { playbin = create_playbin(); conf = get_configuration_from_file(); set_configuration (playbin, conf); return playbin; } The configuration file has several properties related to playbin or pipeline like this. [playbin] #default-video-sink=debugvideosink default-video-sink=releasevideosink #default-audio-sink=debugaudiosink default-audio-sink=releaseaudiosink The requirement of my patch was from this idea. For convenience of debugging, I just want to replace default sink element without compilation and with the closed upper layers.
I think you should just set it in the application using the properties. (I don't like these default defines anyway.)