Suyeon Hwang [Wed, 21 Jul 2021 10:15:05 +0000 (19:15 +0900)]
Add TCs for pcm data handling API
Change-Id: I5701d21cfe213f09d87d0af252eeb1755e90fbfe
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 21 Jul 2021 08:46:36 +0000 (17:46 +0900)]
Remove TCs those can not be reproduced
Change-Id: I2d6133f4f224f3fb19a39097ad6ae3ddec292316
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 9 Jul 2021 08:52:36 +0000 (17:52 +0900)]
Fix critical section for checking thread status
If there are multi client handles exist, uid that wants to stop or pause can be different from uid
that is played on sub thread.
However, previous code always checks thread status although uid is not the same as played uid.
If it is different, 'ttsd_player_stop()' does not stop the thread because the uid is not
playing.
By this thread status check, deadlock can occur.
This patch makes critical section for checking thread status only when 'g_playing_info' is set as
NULL. 'g_playing_info' becomes NULL means that play thread should stop.
Change-Id: I3d073d2ea49fb5d139ce6f2a2865c168538be3ef
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 8 Jul 2021 12:07:55 +0000 (21:07 +0900)]
Remove expired notify callback handle
If the client reconnects and assigns new notify callback, server should update the callback handle.
However, if finalize method was not invoked, server did not update the handle but make new memory
for saving this handle. And this memory could not be searched by logic.
This patch changes the logic for saving callback handle. By this patch, callback handle is always
updated and dangling memory is disappeared.
Change-Id: I02e89970e7a154c33abf38d71733605988051b95
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 8 Jul 2021 09:59:46 +0000 (18:59 +0900)]
Clear player data after play thread is stopped
Previous code clears player data before reset the g_playing_info. If play thread still play
some text, race condition of player data(ex. pasued_data) may occur.
This patch changes the order of function call that 'ttsd_player_clear()' is invoked after
play thread is stopped.
By this change, player data is safe to access from other thread.
Change-Id: Ia768cf76a876956a591974f9bc7871dcbdffe1c0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 8 Jul 2021 02:08:06 +0000 (11:08 +0900)]
Clean code to enhance readability
This patch includes these changes.
- Remove unvaluable parameter from 'ttsd_data_clear_speak_data()'
- Change NULL to nullptr to unify the coding style of file
Change-Id: I672a675899e2e66a9e795e148ce39335212f752e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 7 Jul 2021 11:43:38 +0000 (20:43 +0900)]
Enhance the readability using cpp style
This patch changes the coding style from c to cpp.
Using cpp style code and grammar, the code will become simple and easy to read.
Change-Id: I9365f5db69d97555fbd7df2577e21bf93db3efd9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 7 Jul 2021 10:37:46 +0000 (19:37 +0900)]
Add mutex for thread safety of app_data access
app_data can be handled by main thread and sub thread for text playing.
Previous code guarantees the thread safety of sound data and speak data.
However, these are members of app data and thread safety of app data is not guaranteed.
This patch make mutex for app data access and unifies the mutex g_speak_data_mutex and
g_sound_data_mutex. These mutex are covered by new mutex for app data, because the data
covered by previous mutexs are member of app data.
So, if app wants to access those data, it should access app data first.
Change-Id: Ifb42b4e4751c32e3d8f786f79ffc3871b3c273e7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 7 Jul 2021 05:37:34 +0000 (14:37 +0900)]
Set timer asynchronously to avoid deadlock
If 'tts_stop()' or 'tts_pause()' is called when play thread calls '__unset_policy_for_playing()',
deadlock can occur because 'tts_stop()' or 'tts_pause()' blocks main thread until play thread is
finished, although play thread also blocks the thread by 'ecore_main_loop_thread_safe_call_sync()'
until ecore main is available.
This patch prevents deadlock using function 'ecore_main_loop_thread_safe_call_async()'.
By this function, play thread does not have to block the thread any more stil wait main thread.
Change-Id: I06af24bdc365d8ab1032f42256d7fe770625003e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 5 Jul 2021 11:07:10 +0000 (20:07 +0900)]
Add mutex to avoid race condition of tidl handle
Change-Id: Iaa19e1b18eb0601655ac492bfa9c54e326ce2e62
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
sooyeon [Tue, 6 Jul 2021 17:15:59 +0000 (02:15 +0900)]
Fix coverity issues
* Add to release resource
* Add a checker of return value
Change-Id: Id0f9d0c8c55459ec2f48edb82d997fd697e89743
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
Suyeon Hwang [Fri, 2 Jul 2021 06:37:42 +0000 (15:37 +0900)]
Fix data type of tidl interace for raw pcm data
This patch fix data type of tidl interface for adding raw pcm data.
Previous type is string and string type could not send raw pcm data completely,
because the data is not character string.
To send raw pcm data completely, array<char> type should be used.
Change-Id: I50dee2f4c4f41d19f2eeaf512ed4cfa17a5e5fc2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 1 Jul 2021 07:28:22 +0000 (16:28 +0900)]
Add screen reader check when client try to prepare
If service engine terminates without unprepare by some purpose such as disable screen reader on TV,
some clients try to reprepare by service reset message.
In this case, prepare by service reset is not intended behavior.
Thus, this patch adds checking screen reader option code to avoid prepare by screen reader disable.
Change-Id: If93ded568eae17bdf019c8f4d109d45ce542800e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
sooyeon [Thu, 1 Jul 2021 19:29:39 +0000 (04:29 +0900)]
Fix coverity issues
* No lock
* No memory release
Change-Id: I6de64422ee6b610d99cd6dbe1cad232bcb855f9d
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
Suyeon Hwang [Thu, 1 Jul 2021 09:34:01 +0000 (09:34 +0000)]
Merge "Check length of extra_info to prevent empty string" into tizen
Suyeon Hwang [Thu, 1 Jul 2021 09:33:46 +0000 (09:33 +0000)]
Merge "Deactivate ducking after the activation is completed" into tizen
Suyeon Hwang [Thu, 1 Jul 2021 09:32:36 +0000 (09:32 +0000)]
Merge "Remove ducking when background volume is changed" into tizen
sooyeon [Thu, 1 Jul 2021 17:54:30 +0000 (02:54 +0900)]
Fix svace issue
* No lock
* No null checker
Change-Id: I94892e1226d9ee6c3852648e5f86690945ed1462
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
Suyeon Hwang [Thu, 3 Jun 2021 01:43:22 +0000 (10:43 +0900)]
Deactivate ducking after the activation is completed
Change-Id: Iafaecc214467a4e4268b8daf56a0f9c5b9d2ab2b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit
3d554b32acd26b6c45bfee1903cb34107742e69b)
sooyeon.kim [Fri, 28 May 2021 07:39:37 +0000 (16:39 +0900)]
Remove ducking when background volume is changed
Change-Id: I49fff0e042938786ea001dddfeb2f9ef67ded6e8
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
(cherry picked from commit
e62a27b107eee9febed04b3af7c2687533de104b)
Suyeon Hwang [Fri, 25 Jun 2021 08:03:30 +0000 (17:03 +0900)]
Check length of extra_info to prevent empty string
Change-Id: I68bfcb742fa2e17e111e8eae3beb4fefd94b8c1c
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 28 Jun 2021 05:55:17 +0000 (05:55 +0000)]
Merge "Update version (1.65.5)" into tizen
Suyeon Hwang [Mon, 28 Jun 2021 05:43:21 +0000 (14:43 +0900)]
Update version (1.65.5)
Change-Id: I4b4aba6cc90514b8cb15f17b9fbc80afa2fd6ac2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 28 Jun 2021 05:27:12 +0000 (14:27 +0900)]
Remove duplicated check code
Change-Id: I2641de9f183dfa758a8bfe18fcc27c86f2801b04
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 28 Jun 2021 05:08:25 +0000 (14:08 +0900)]
Remove duplicated function
Change-Id: I8f48778e4d67d8e4c2baae185dc06a6c786a24ee
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 13 May 2021 05:26:20 +0000 (14:26 +0900)]
Clean up proxy handle creation code
Change-Id: I4031b0455844feeda369da1fe9cf2ff576a46cf4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 12 May 2021 11:01:51 +0000 (20:01 +0900)]
Wait TIDL connection when tts_prepare_sync() is called
Change-Id: I97892140e896249c1cd90f86ba3c2810ce6e4473
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 12 May 2021 07:07:57 +0000 (16:07 +0900)]
Create data structure for saving tidl proxy information
Change-Id: I00a4583cd8b62527e3da5eddfd62951b72d5cad1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 12 May 2021 06:23:26 +0000 (15:23 +0900)]
Remove unused tidl method
Change-Id: I209626021bb00d72fdfc71a5f9137dd6c8c76b22
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 21 Apr 2021 04:49:48 +0000 (13:49 +0900)]
Fix tidl_request_hello logic to match tidl and dbus behavior
Change-Id: I2b7731701f9117775d94d0efc1bcd77065be24a9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 21 Apr 2021 02:53:01 +0000 (11:53 +0900)]
Implement tts_prepare_sync() on tidl method
Change-Id: I583eab761d9af9083257dfdc77344c1595231187
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 11 May 2021 07:10:34 +0000 (16:10 +0900)]
Create TCs for tts_prepare_sync()
Change-Id: Ia41af943aba155cb0ab4d6984047076dff65d180
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 11 May 2021 06:23:38 +0000 (15:23 +0900)]
Check timeout on unittest
Change-Id: I009fef16175c573c892421bc50532ee71285ea99
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 7 May 2021 06:07:13 +0000 (15:07 +0900)]
Launch exact service process for each mode
Change-Id: I515b3e552c633d0af75443d643bd012182c23a89
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 6 May 2021 07:26:45 +0000 (16:26 +0900)]
Extract function from open_connection
This patch extracts the unit functions from open_connection to enhance readability
Change-Id: If5315031089a115dfaa6b730326ae47cb8e0543f
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 21 Apr 2021 01:21:49 +0000 (10:21 +0900)]
Make structure for saving tidl information
Change-Id: I7942601167e84d18de3ca287ed9d142141fbf824
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 22 Jun 2021 07:36:18 +0000 (16:36 +0900)]
Use 'intptr_t' to support multi architecture safely
Change-Id: Ibcda4d2f4c5e781b6bb6c00084c97f373ccf9095
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 16 Jun 2021 07:08:47 +0000 (16:08 +0900)]
Remove duplicate code and unvaluable function
This patch removes duplicated code and unvaluble function to enhance readbility.
Using 'tts_core_check_screen_reader()' remove and simplify the condition check code.
And also, 'tts_core_set_mode()' just call 'tts_client_set_mode()', this patch makes 'tts_set_mode()'
calls 'tts_client_set_mode()' directly and removes 'tts_core_set_mode()'.
Change-Id: Ia1338770fe243bd7b99cab23089ce17547bc6325
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 16 Jun 2021 06:33:19 +0000 (15:33 +0900)]
Remove 'g_is_screen_reader_on' and '__screen_reader_state_changed_cb()'
This patch removes 'g_is_screen_reader_on' and '__screen_reader_state_changed_cb()' to avoid duplicate behavior.
Using '__update_screen_reader_state()', client can still check current screen reader state.
Therefore, it is okay to remove 'g_is_screen_read_on' and '__screen_reader_state_changed_cb()'.
Change-Id: Ia2d6d77be7c7bb01e38e3e1d39c536b968700926
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 16 Jun 2021 05:53:43 +0000 (14:53 +0900)]
Remove unused parameter 'before_state'
Change-Id: I17ee21cbca9c558fb8ec2d71686c135913914a61
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 16 Jun 2021 05:34:19 +0000 (14:34 +0900)]
Fix name of function and remove unused function
This patch reflects the review content of https://review.tizen.org/gerrit/c/platform/core/uifw/tts/+/257109
To remove ambiguous function name 'tts_core_set_current_state()', this patch remove unused function
'tts_core_notify_state_changed()' and reuse this name.
'tts_core_set_current_state()' invokes the state changed callback, so I think using verbe 'notify' gives more
clear meaning.
Change-Id: I126fdd646ae435788797a9a60cb777ef3a4df3ca
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 21 Dec 2020 11:47:13 +0000 (20:47 +0900)]
Fix loop statement from 'while' to 'for'
Change-Id: I2f42eb7943d6ddd2c56e75eb91eb5e913fe344d3
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 21 Dec 2020 11:16:41 +0000 (20:16 +0900)]
Remove duplicated code using __handle_dbus_request_result function
Change-Id: Ic11f9694ad4f952d70e95961c0dc9c708e3c76bb
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 21 Dec 2020 10:58:14 +0000 (19:58 +0900)]
Extract function about private data from tts.c
Change-Id: Ia9c623f4344896b8235c975e44770dc0d53e660a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 27 Nov 2020 05:19:37 +0000 (14:19 +0900)]
Clean up the code and mark the future task
This patch includes next changes
- Remove unused variables.
- Remove not necessary check code.
- Add missing code for finalization.
- Add missing const keyword.
Change-Id: I506a3413c277a0f9a27927e1902aad0a5f57460e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 23 Nov 2020 06:26:59 +0000 (15:26 +0900)]
Refactor duplicated code for handling dbus request
Change-Id: I7519e7144ed9c423304bcbc41f0e3beb752d96dd
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 20 Nov 2020 01:31:09 +0000 (10:31 +0900)]
Refactor the APIs about playing text
This patch refactors the next APIs about playing text.
- tts_add_text
- tts_play
- tts_stop
- tts_pause
- tts_add_pcm
- tts_play_pcm
- tts_stop_pcm
By this patch, tts.c provides simple business logic and tts_core provides core logic.
Change-Id: Ieb81972acc5e305733f0bbceb357b1866f7c05c2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 18 Nov 2020 07:48:11 +0000 (16:48 +0900)]
Make function to access uid of client
Change-Id: I79b36ab368f559aeb8f3368eca508f80f8c9aca4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 18 Nov 2020 06:38:58 +0000 (15:38 +0900)]
Move code for checking screen reader status into tts_core
Change-Id: Iba167a7fe003d95c9de8ba147b8be2806d6b9a61
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 19 Apr 2021 05:42:16 +0000 (14:42 +0900)]
Make function to access mode of client
Change-Id: Ia64ecbc1865f68c9be1f3575fe43140dd0548a83
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 15 Apr 2021 07:55:55 +0000 (16:55 +0900)]
Unify error handling function
Because tts_ipc layer is added, error handling code is duplicated.
To remove duplicated code, this patch unifies the functions for handling error from server.
Change-Id: Icc5a43cc8d66a956ef8aa050c01b718454ea8be7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 17 Nov 2020 08:36:18 +0000 (17:36 +0900)]
Divide __tts_cb_error() into two seperate function
__tts_cb_err() is used for two different purpose, so this function has high complexity.
This patch divides __tts_cb_error() into two functions __handle_service_reset() and
__handle_service_error().
These two function has lower complexity and clear purpose to use.
Thus, it is expected that new developer can easily understand the purpose and behavior of each
function.
Change-Id: I749f292ac3161d1cca33ab8ca6847f8d55f240a3
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 16 Apr 2021 04:32:34 +0000 (13:32 +0900)]
Make validation function for tts_client_s
Using uid is better way to validate tts_client_s.
However, using uid makes unnecessary access for tts_client_s and it makes unsafe pointer access.
This patch makes function for validating tts_client_s using pointer of tts_client_s.
This function is useful when the function does not use uid.
Change-Id: I6f10e64bee6c32c46f78f8124d551d349af5505d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 16 Apr 2021 04:17:48 +0000 (13:17 +0900)]
Remove include statements for unused header
Change-Id: I703f556012ad9c504134758496eb3022ef84e0e0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 26 May 2021 06:02:45 +0000 (15:02 +0900)]
Update version (1.65.4)
Change-Id: I64ae1ce8c2c459d71bd85bc48c874256ee810b08
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 21 May 2021 07:44:34 +0000 (16:44 +0900)]
Add null check to avoid null reference problem
Change-Id: I717cc485a79eafd97f41f4ca70671dc1a964808f
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 21 May 2021 06:22:50 +0000 (15:22 +0900)]
Remove access function to avoid toctou problem
Change-Id: I8291353ba9770a470a35cccaddc8a0d6cb8f20ea
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 21 May 2021 06:15:30 +0000 (15:15 +0900)]
Intialize function pointer to avoid invalid access
Change-Id: I33b539e6735b52bfd42ea7859f1a5c7984150b21
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 21 May 2021 05:35:48 +0000 (14:35 +0900)]
Swap order of parameter and argument to match proxy and stub
Change-Id: I45e103cd370e38d3bb00d7a7a4534a6bbc160c23
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 21 May 2021 05:15:43 +0000 (14:15 +0900)]
Remove memory leakage on tts_core and tts_engine_parser
Change-Id: I2bdba5074f9ca97af8b40b181fc5653c8e0a7a9f
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 8 Apr 2021 11:53:02 +0000 (20:53 +0900)]
Lock all accessing state code and Use cpp style lock and iteration
Change-Id: I37d67af97884e332ca9392b7d880d91371db5b31
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 8 Apr 2021 07:23:25 +0000 (16:23 +0900)]
Use tts_ipc function as same way regardless of ipc methods.
tts_ipc layer is interface layer.
Thus, developer should not have no interest below the layer.
However, in current code, tts_ipc function is used as different way by the ipc method.
Calling interface as same way is better to read, and if there is difference, the difference should
be covered on implementation layer.
This patch unify the usages of functions in tts_ipc. To unify the usage, this patch also fix the
implementation of each method dbus and tidl.
Change-Id: I557fed82f11cace93f52eb13a9ba37bb9287a38d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 8 Apr 2021 02:52:51 +0000 (11:52 +0900)]
Remove not needed function and reorder the code to log the valid uid
Change-Id: I8e51a8a28c7223fb40cc31feecf02c685fd7f43c
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 7 Apr 2021 12:17:41 +0000 (21:17 +0900)]
Add function on tts_ipc to hide tts_dbus completely
Change-Id: Icee9794fd4b87ab85cc72e4be20acf97689236b6
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 6 Apr 2021 09:36:57 +0000 (18:36 +0900)]
Use tts_ipc_method_e on server side
To match the method handling of client and server, this patch change the code to use
tts_ipc_method_e on server.
Using tts_ipc_method_e, server can be expanded to use other ipc method.
And also, server can clearly know which ipc method is used by client.
Change-Id: I48c98fb567d00fcaff805715bb6c097cc3caddde
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 6 Apr 2021 08:36:45 +0000 (17:36 +0900)]
Join two tidl method, register and request_hello
These two callbacks are called on same and have similar behavior.
So, I combine these two method to simplify the behavior of ttsd_server_initialize().
By this patch, ttsd_server_initialize() has same behavior to use either tidl and dbus method.
Change-Id: I0f5366b8cf1407c7b5943633d19f9b67821d8ddd
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 25 Mar 2021 07:44:11 +0000 (16:44 +0900)]
Create play thread if the app state is still playing
Change-Id: I68a5d0f676cd350063df4aa459bc5a5690b56e47
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 25 Jan 2021 05:18:05 +0000 (14:18 +0900)]
Fix return value of tts_get_max_text_size()
Change-Id: I83c7cfd0c2df8b034bef051ebf2df862a0f20eeb
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 16 Nov 2020 08:58:28 +0000 (17:58 +0900)]
Refactor parameter check
Change-Id: I4612d2f94a0064d153f1af8c7da0e4f18e389df1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 13 Nov 2020 09:47:44 +0000 (18:47 +0900)]
Refactor tts handle check code
To apply unity code to check tts handle, this patch fixes handle check code of each API.
Change-Id: I8168bf04321f81f365a3f38060281b0a922776c9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 13 Nov 2020 08:03:36 +0000 (17:03 +0900)]
Fix state getter function to return current state directly
This patch fixes getter of current state directyly return the state value to
make clearer and safer checking current state.
Change-Id: Ibd31affec7ab047607aa4469f2247623492bc9d8
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 12 Nov 2020 09:11:42 +0000 (18:11 +0900)]
Make functions for set current state into client
Most of funtions in tts.c are directly access tts_client_s to set/get current
state.
This patch provides new functions to access state of client. This function
reduces duplicates code and provides safer access to tts_client_s.
Change-Id: Ia0eac2d4b43adf9badf49ff4b7bc822a19a4c9b5
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 11 Nov 2020 08:23:43 +0000 (17:23 +0900)]
Pass return value of supported_voice_cb to tts_config_mgr_get_voice_list
Change-Id: I746702455b9bd1ba71a52019c6da0437593eca1b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 11 Nov 2020 08:21:30 +0000 (17:21 +0900)]
Make functions to access callbacks and handle of the client
To access safely to member of tts_client_s, this patch define new functions.
Theses functions provides the access of the member of tts_client_s.
And if there is requirement of thread safety, we will easily implement it, only
fixing these functions.
Change-Id: I6190f106ffc334baed4fa0a477fd92f5c204a059
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 11 Nov 2020 05:35:53 +0000 (14:35 +0900)]
Fix tts_client_is_valid() use uid as a parameter
Using the pointer as a parameter may be simple and fast implementation.
However, this program creates a sub thread that the app can not manage and this
sub thread can not know whether the pointer of client is dereferenced.
Thus, using a pointer can occur heap-use-after-free problem in this case.
To remove this kind of issue, this patch changes the parameter from pointer to
integer value uid.
But the code still direct access to pointer
Change-Id: Id657922b0c4c405a525d6cb8ce39516e59a9a744
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 10 Nov 2020 10:59:21 +0000 (19:59 +0900)]
Refactor set/unset client callback logic
To avoid direct access of tts_client_s on tts.c, this patch creates the new function on tts_client.c.
These new functions provides safer access of tts_client_s.
Change-Id: I45d8b5894575951bc2fd34aaf76f8fd9683430f9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 18 Mar 2021 02:11:49 +0000 (11:11 +0900)]
Fix tts_tidl and tts_dbus use same logic
Change-Id: Ic70c9e0963aee17835beed6826c657c363784ff8
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Sungwook Park [Fri, 27 Nov 2020 11:21:12 +0000 (20:21 +0900)]
Support TIDL / dbus IPC
Change-Id: I06a8fcd1d2f51a79e33a4a1d06a66d6f25e27319
Signed-off-by: Sungwook Park <sungwook79.park@samsung.com>
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 8 Mar 2021 01:50:46 +0000 (10:50 +0900)]
Update version (1.65.3)
Change-Id: Id19e2700b76ee225207dcbf0f3adaeef1f27563d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 8 Mar 2021 01:41:02 +0000 (10:41 +0900)]
Add missing mutex unlock before exit the function
Change-Id: I6f6c6f84fc99918f916b387589e5d8e10bcbe83b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 26 Feb 2021 05:04:17 +0000 (14:04 +0900)]
Update version (1.65.2)
Change-Id: Ibeb08f917f10523709decc85624e4b0df185bbf4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 26 Feb 2021 04:39:33 +0000 (13:39 +0900)]
Fix state check code
Current state check code just checks current state is ready or not.
However, if state is not ready, client is still connected to server,
because playing or processing state also means the connection is still
on.
This patch changes the state check code to exact way.
Change-Id: Idb3be9f1b042c01dbd7c2e5f208866d70d8a25a0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 23 Feb 2021 09:34:29 +0000 (18:34 +0900)]
Update version (1.65.1)
Change-Id: I18e53060c6510df23f0c3cf69bc3a5eb9e6e5497
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 23 Feb 2021 07:59:37 +0000 (16:59 +0900)]
Add mutex to remove race condition among functions of ttsd_player
Change-Id: I34493c7367bda630ae5e0cb78348a3db9caaefb1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit
c6181d507d85f69474837dba5fc8733775f66e18)
Sooyeon Kim [Thu, 18 Feb 2021 10:31:17 +0000 (10:31 +0000)]
Merge "spec: remove unused pkgconfig(libsystemd-daemon) build dependency" into tizen
Suyeon Hwang [Tue, 16 Feb 2021 04:56:54 +0000 (13:56 +0900)]
Remove client data dependency from reprepare thread
Change-Id: I5f65fd56ef3ec89b6f7343b681a0e7dbc08d8150
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
INSUN PYO [Wed, 3 Feb 2021 05:31:42 +0000 (14:31 +0900)]
spec: remove unused pkgconfig(libsystemd-daemon) build dependency
Change-Id: I0e357a90514ac09ee1dfc98a889f8697488249c5
sooyeon.kim [Wed, 16 Dec 2020 09:02:46 +0000 (18:02 +0900)]
Remove unnecessary HTML link for feature
Change-Id: I63ff5ba7ed3e7288ee6cbff8033664f6e46dd1e3
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
sungrae jo [Thu, 3 Dec 2020 09:47:24 +0000 (18:47 +0900)]
Fix Native TTS API references
Change-Id: I33ece7bc5d0c31c99f16937bcb721cd0fadebfb1
Signed-off-by: sungrae jo <seongrae.jo@samsung.com>
Suyeon Hwang [Fri, 27 Nov 2020 05:21:03 +0000 (14:21 +0900)]
Version up to 1.65.0
Change-Id: I5ca36efb0d95a600b3f11e0e488b6a4af5d3e0ca
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 27 Nov 2020 05:14:45 +0000 (05:14 +0000)]
Merge changes Ic6ad2c94,I7d0f0397,I5b298cb5,Ib64b8628,I28428a7c into tizen
* changes:
Move service engine status check logic into tts_core
Remove extern definition from tts_dbus
Remove shared variable for callback timer
Refactor prepare/unprepare logic with tts_core
Introduce tts_core.h/c as genral logic layer
Suyeon Hwang [Fri, 20 Nov 2020 07:28:59 +0000 (16:28 +0900)]
Add mutex to wait play thread safely
Change-Id: I4120e70c86042c9fcb87c31c969dba9df6640296
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 4 Nov 2020 06:37:29 +0000 (15:37 +0900)]
Move service engine status check logic into tts_core
tts_core handles all prepare sequence and service engine status is only needed on prepare sequence.
This patch moves all the codes related with service engine status into tts_core.c/h.
Change-Id: Ic6ad2c947b0c6bd40add5842b6c90e0c2577dc56
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
sooyeon.kim [Mon, 9 Nov 2020 12:20:56 +0000 (21:20 +0900)]
Fix build error in 64bit
Change-Id: I38040f491ddc4cf62e68ffc9e1231b1eb181b310
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
Sungwook Park [Mon, 9 Nov 2020 03:07:20 +0000 (12:07 +0900)]
Remove infinite loop log
Change-Id: I43a0b58706935bccb3eb9c00b258ad384263074d
Signed-off-by: Sungwook Park <sungwook79.park@samsung.com>
sooyeon.kim [Fri, 6 Nov 2020 02:02:00 +0000 (11:02 +0900)]
Return operation failed error when inserting data is failed
Change-Id: Ie8a3d1803bad6978af7b72dfbf9bb1a962c8a68c
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
sooyeon.kim [Fri, 6 Nov 2020 01:33:08 +0000 (10:33 +0900)]
Fix crash in pringint logs
Change-Id: I6284248b2c32b2edbeb0bb3a607084111cd21e99
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
sooyeon.kim [Thu, 5 Nov 2020 09:58:07 +0000 (18:58 +0900)]
Fix build error and Update version (1.60.12)
Change-Id: I632d19dfe19f984cf92c62c4a7a3cc28773866e0
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
sooyeon.kim [Thu, 5 Nov 2020 07:49:46 +0000 (16:49 +0900)]
Add logs for checking clients in ttsd_data
Change-Id: Ifbfe0178ffb0b3880b1de9f53f23ea38fa3fe6a2
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
Suyeon Hwang [Mon, 2 Nov 2020 05:20:36 +0000 (14:20 +0900)]
Remove extern definition from tts_dbus
Extern keyword makes easy to use functions in other .c files, but also it makes difficult to trace
call stack and breaks boundary between private and public functions.
This patch removes extern definition from tts_dbus.c and implements these functions on tts_core.
Change-Id: I7d0f039757aedd961f94590489182de688e3d3f2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>