-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dnssd name as property #8
base: main
Are you sure you want to change the base?
Conversation
This is great, thanks! (and sorry for the delay) I'm getting a segfault at |
case PROP_DNSSD_NAME: | ||
g_mutex_lock(&self->data->property_lock); | ||
g_free (self->data->dnssd_name); | ||
self->data->dnssd_name = g_strdup (g_value_get_string (value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g_value_dup_string()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a style or correctness fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style, I guess. g_value_dup_string()
replaces g_strdup()
and g_value_get_string()
into one.
@@ -389,7 +407,11 @@ gst_airplay_src_class_init (GstAirPlaySrcClass * klass) | |||
prop_connected = g_param_spec_boolean ("connected", "Connected", | |||
"Whether a client is connected to the airplay server", | |||
FALSE, G_PARAM_READABLE); | |||
prop_dnssd_name = g_param_spec_string ("dnssd-name", "DNS-SD name", | |||
"Name to use for the DNS Service Discovery", DEFAULT_DNSSD_NAME, | |||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add G_PARAM_CONSTRUCT
so that the property is set when the object is created.
@hadess thanks for the review! With the suggested changes there's no segfault anymore. I won't have access to my iPad in the next few days so I can't test it, but if you confirm it's working I'll merge. |
This lets the user set the DNS-SD name via a GStreamer property such as:
This way, the iPad or iPhone will display
DeviceX
when listing the AirPlay devices.