}
}
+ if (argc->first_frame_position_string) {
+ // debug(1, "Check first frame position string");
+ th = shairport_sync_get_first_frame_position(shairportSyncSkeleton);
+ if ((th == NULL) || (strcasecmp(th, argc->first_frame_position_string) != 0)) {
+ // debug(1, "First frame position string should be changed");
+ shairport_sync_set_first_frame_position(shairportSyncSkeleton, argc->first_frame_position_string);
+ }
+ }
+
if (argc->stream_type) {
// debug(1, "Check stream type");
th = shairport_sync_remote_control_get_stream_type(shairportSyncRemoteControlSkeleton);
if (string_update(&metadata_store.frame_position_string,
&metadata_store.frame_position_string_changed, cs)) {
changed = 1;
- debug(2, "MH Frame Position String set to: \"%s\"", metadata_store.progress_string);
+ debug(2, "MH Frame Position String set to: \"%s\"", metadata_store.frame_position_string);
+ }
+ free(cs);
+ break;
+ case 'phb0':
+ cs = strndup(data, length);
+ if (string_update(&metadata_store.first_frame_position_string,
+ &metadata_store.first_frame_position_string_changed, cs)) {
+ changed = 1;
+ debug(2, "MH First Frame Position String set to: \"%s\"", metadata_store.first_frame_position_string);
}
free(cs);
break;
char *frame_position_string; // frame position string emitted by SPS on request
int frame_position_string_changed;
+ char *first_frame_position_string; // first frame position string emitted by SPS on request
+ int first_frame_position_string_changed;
+
int player_thread_active; // true if a play thread is running
int dacp_server_active; // true if there's a reachable DACP server (assumed to be the Airplay
// client) ; false otherwise
<property name="ServiceName" type="s" access="read" />
<property name="OutputFormat" type="s" access="read" />
<property name="OutputRate" type="i" access="read" />
+ <property name="FirstFramePosition" type="s" access="read" />
<property name="FramePosition" type="s" access="read" />
<method name="SetFramePositionUpdateInterval">
<arg name="seconds" type="d" direction="in" />
memset(hb, 0, 128);
snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp,
should_be_time);
+ send_ssnc_metadata('phb0', hb, strlen(hb), 1);
send_ssnc_metadata('phbt', hb, strlen(hb), 1);
time_of_last_metadata_progress_update = local_time_now;
} else {
memset(hb, 0, 128);
snprintf(hb, 127, "%" PRIu32 "/%" PRId64 "", inframe->given_timestamp,
should_be_time);
+ send_ssnc_metadata('phb0', hb, strlen(hb), 1);
send_ssnc_metadata('phbt', hb, strlen(hb), 1);
time_of_last_metadata_progress_update = local_time_now;
} else {