sink-input, source-output: Update the start time of changing state to run 37/203037/2
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 9 Apr 2019 06:38:28 +0000 (15:38 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 10 Apr 2019 07:18:00 +0000 (16:18 +0900)
[Version] 11.1.67
[Issue type] New feature

Change-Id: I056f780e7db6217c4b06a0ea27560a17cd5ceeb8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio.spec
src/pulsecore/sink-input.c
src/pulsecore/sink-input.h
src/pulsecore/source-output.c
src/pulsecore/source-output.h

index fb63134..50318dd 100644 (file)
@@ -3,7 +3,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          11.1
-Release:          66
+Release:          67
 Group:            Multimedia/Audio
 License:          LGPL-2.1
 URL:              http://pulseaudio.org
index 32aa260..858b4a2 100644 (file)
@@ -36,6 +36,9 @@
 #include <pulse/rtclock.h>
 #include <pulse/timeval.h>
 #endif
+#ifdef __TIZEN__
+#include <pulse/rtclock.h>
+#endif
 
 #include <pulsecore/core-format.h>
 #include <pulsecore/mix.h>
@@ -782,6 +785,10 @@ static void sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state)
         i->pcm_dump_fp = NULL;
     }
 #endif
+#ifdef __TIZEN__
+    if (state == PA_SINK_INPUT_RUNNING)
+        i->time_of_start_to_run = pa_rtclock_now();
+#endif
 
     update_n_corked(i, state);
     i->state = state;
index 1746475..df99068 100644 (file)
@@ -274,6 +274,7 @@ struct pa_sink_input {
     } thread_info;
 
 #ifdef __TIZEN__
+    pa_usec_t time_of_start_to_run;
     FILE *pcm_dump_fp;
     char *dump_path;
     uint32_t dump_length;
index 38c6545..bb08d36 100644 (file)
@@ -28,6 +28,9 @@
 #include <time.h>
 #include <pulse/timeval.h>
 #endif
+#ifdef __TIZEN__
+#include <pulse/rtclock.h>
+#endif
 
 #include <pulse/utf8.h>
 #include <pulse/xmalloc.h>
@@ -621,6 +624,10 @@ static void source_output_set_state(pa_source_output *o, pa_source_output_state_
         o->pcm_dump_fp = NULL;
     }
 #endif
+#ifdef __TIZEN__
+    if (state == PA_SOURCE_OUTPUT_RUNNING)
+        o->time_of_start_to_run = pa_rtclock_now();
+#endif
     update_n_corked(o, state);
     o->state = state;
 
index a6212fa..0290b20 100644 (file)
@@ -212,6 +212,7 @@ struct pa_source_output {
         pa_sink_input *direct_on_input;       /* may be NULL */
     } thread_info;
 #ifdef __TIZEN__
+    pa_usec_t time_of_start_to_run;
     FILE *pcm_dump_fp;
     char *dump_path;
 #endif