After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739801 - Need to change DEFAULT_{AUDIO,VIDEO}SINK in application running time
Need to change DEFAULT_{AUDIO,VIDEO}SINK in application running time
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Mac OS
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-08 01:13 UTC by Justin Kim
Modified: 2016-02-21 23:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
default sink properties (13.32 KB, patch)
2014-11-08 01:13 UTC, Justin Kim
none Details | Review

Description Justin Kim 2014-11-08 01:13:57 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.
Comment 1 Tim-Philipp Müller 2014-11-17 01:32:52 UTC
Why not just have the application set the sink directly using the audio-sink or video-sink property?
Comment 2 Justin Kim 2014-11-17 02:12:24 UTC
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.
Comment 3 Tim-Philipp Müller 2014-11-17 10:30:37 UTC
What about ./configure --with-default-audiosink=xyz ?
Comment 4 Justin Kim 2014-11-18 13:23:45 UTC
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.
Comment 5 Tim-Philipp Müller 2016-02-21 23:48:37 UTC
I think you should just set it in the application using the properties.

(I don't like these default defines anyway.)