Suyeon Hwang [Mon, 1 Aug 2022 07:13:48 +0000 (16:13 +0900)]
Send 'NULL' string if there is no private data
- Issue:
When server sends null pointer through TIDL parameter, client may
receive unhanlded error.
- Solution:
This is because null pointer can occur invalid access on TIDL logic. To
prevent this situation, this patch sends 'NULL' string instead of null
pointer. Through this change, client always can access valid memory
pointer.
Change-Id: I2685ca0a836c360b3a784da804bbabfabb7df783
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 28 Jul 2022 07:52:38 +0000 (16:52 +0900)]
Fix tidl error handling code
- Issue:
TIDL functions always return -1 even if those are failed by various
reasons.
- Solution:
The code generated by tidlc uses 'set_last_result()' and 'get_last_result()'
function for handling exception. Thus, the caller of those code should
check the error code of 'get_last_result()' first. However, current code
only check return value of each functions.
This patch adds logic for check the error from 'get_last_result()'.
Through this change, framework can handle error from tidl code properly.
Change-Id: Ic075a95ebb64074797633f5973c8c4d5fe8d07e0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 15 Jul 2022 04:17:07 +0000 (13:17 +0900)]
Refactor feature check and handle creation code
Change-Id: Idc6d9c6de4ff23d30646a3797c615e75e54af411
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 13 Jul 2022 10:38:18 +0000 (19:38 +0900)]
Use condition check macro for line coverage
- Issue:
It is tough to cover error handling code through unit test.
- Solution:
Actually, all conditional statement for checking error is invoked, but
the problem is that the code for when error occurs is not invoked. some
error handling codes are covered, but others are not covered only
through unit tests. So this patch changes conditional check code to
macro version. It still works as same as before, but the code is
compressed into one line, so all line is covered.
Change-Id: I268908220eb27258d19661b9907e83bffea008da
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 13 Jul 2022 07:47:21 +0000 (16:47 +0900)]
Fix unit functions that are not invoked
- Issue:
Some internal functions are not invoked from business logic.
- Solution:
Some functions are predefined for future needs, but they are note called
yet. So, these functions decrease the line coverage. To solve this issue,
this patch removes those dead functions.
And also, this patch invokes a dead function. This function has purpose
and code that needs to invoke this function, but current code does not
use it. Through this patch, this function is invoked and covered by test
case.
Change-Id: I33b882525e99ca251644aedbe7b18cf938dc17ff
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 13 Jul 2022 07:24:34 +0000 (16:24 +0900)]
Exclude un-testable codes from line coverage analysis
- Issue:
Some codes can not be tested in automatic test enviroment. Those code
are effected by the behavior of engine or configuration.
- Solution:
This patch excludes some codes that are not tested by automatic test
enviroment from line coverage analysis. To excludes those codes, this
patch adds special comments that indicate that codes are excluded from
line coverage analysis.
Change-Id: I6201bbd7b341dcede7400565a6b106f5d1228cd6
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 13 Jul 2022 06:28:41 +0000 (15:28 +0900)]
Add test cases for uncovered APIs
- Issue:
Some APIs are not checked by line coverage analysis.
- Solution:
This patch adds new test cases for uncovered APIs. Through this change,
uncovered APIs are now checked in line coverage analysis.
Change-Id: Iab6cded7402a461c3da42bac0d41e5327d6a0904
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 12 Jul 2022 11:25:39 +0000 (20:25 +0900)]
Exclude un-testable files and fix test launch option
- Issue:
Line coverage result by automatic checker is not good.
- Solution:
This patch excludes some files that are not target for testing user APIs. This
repository is for TTS framework code, so there are code for not only client but
also server and settings. Those code are not invoked or refered when the test
case of user APIs run, so we exclude those files from line coverage checking
through this patch.
And also, this patch adds launch option for testing. This is because for
checking the test result using journal log.
Change-Id: I23efa18a51a01040b29e9283f82cf27fe016c72f
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
ulgal-park [Mon, 25 Jul 2022 08:48:57 +0000 (17:48 +0900)]
Add metadata key
Change-Id: I637be805d6fd917c045b444b135545d06273caf8
Suyeon Hwang [Thu, 7 Jul 2022 05:59:58 +0000 (14:59 +0900)]
Make variables shared between threads atomic
- Issue:
Some variables that are shared between threads are defined with 'volatile'
keyword for preventing race condition. However 'volatile' can not assure
preventing race condition.
- Solution:
'volatile' just prevents compiler optimization, not prevent race
condition between threads. To assure thread safety, we should use atomic
variable.
This patch fixes the definition of those variable into atomic variables.
Through this patch, each variables will be created as atomic variables
and these atomic varaibles can prevent race condition during multi
threads enviroment.
Change-Id: I71f254a62d7ac848fedeffc91c40e4271f7af25d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
wn.jang [Sun, 24 Jul 2022 23:03:12 +0000 (08:03 +0900)]
Update version to 1.70.7
Change-Id: I94519ffd8013d740112746098880e1669f7e178e
Suyeon Hwang [Wed, 13 Jul 2022 02:20:01 +0000 (11:20 +0900)]
Add static keyword into global variables
- Issue:
Some global variables can be accessed by other files, because those are
not hided from others. It can allow malicious access.
- Solution:
This patch adds static keyword into global variables that are used only
in the file.
Change-Id: I85a0563027fc94dcd9d31eb508b37f237678b0e0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 13 Jul 2022 01:54:52 +0000 (10:54 +0900)]
Exclude code of unittests from SAM analysis
- Issue:
When we get SAM score using automation enviroment, the DC score is
effected by unittest code.
- Solution:
This patch excludes files for test code from SAM analysis. Through this
change, the SAM score is calculated only refering implementation.
Change-Id: I9dd67868727db0c257c9d83896441dc42337a018
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 5 Jul 2022 11:51:29 +0000 (20:51 +0900)]
Extract common code as functions for reducing duplicated code
Change-Id: I5de2dbe0c6e240ce364c4447c87bca048c59e6cc
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 5 Jul 2022 01:29:01 +0000 (10:29 +0900)]
Refactor unit test code for removing duplicated code
- Issue:
There are too many test case for testing scenarios, and some of test
case have similar or same testing scenarios. And these scenarios make
duplicated code.
- Solution:
For removing common and duplicated code for each test case, this patch
creates new test suites classes. Through these new classes, each test
case can remove common setUp and tearDown codes.
Change-Id: Id74508b7ef3732748799d9f2878598de3e5dead0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 4 Jul 2022 11:01:45 +0000 (20:01 +0900)]
Extract unit functions for reducing duplicated code
- Issue:
To get some dynamic values, there are too many duplicated code used.
- Solution:
This patch extracts duplicated codes and creates new functions using the
codes. Using these new functions, we can remove duplicated codes from
the file.
Change-Id: I926f105e5ed124b10ddc55eecc7844aa83c08033
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 4 Jul 2022 05:00:32 +0000 (14:00 +0900)]
Simplify the precondition checking code
- Issue:
Each functions of TTS framework have many precondition checking codes and
these codes are duplicated.
- Solution:
This patch creates macro for simplifying the precondition checking
codes. According to this patch, each checking codes are becoming shorter
and simpler than before. There are still duplicated code, but these
codes are shorter than before, so these can effectively reduce the line of
duplicated code.
Change-Id: Ibf705a819217d892ff4d2bdcb2d74d3539640b65
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 29 Jun 2022 06:20:04 +0000 (15:20 +0900)]
Reorder precondition checking code
- Issue:
In the ttsd_engine_agent.c file, the precondition checking code of each
function has no constant rule for coding. This can decrease the
readability of the code.
- Solution:
To improve the readbility of the code, this patch reorders the
precondition checking code of each function by constant way.
According to this patch, each function first checks the validation of
parameters and then checks initialization of the module and engine.
Change-Id: If9498fd406ca29bf693493f959b521bf02b9604b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 28 Jun 2022 04:46:04 +0000 (13:46 +0900)]
Remove duplicated codes
- Issue:
The codes for checking preconditions are repeated in every functions. And also,
the codes for clearing list are repeated.
- Solution:
This patch makes new inline functions for simplify the precondtion
checking code. Using theses new functions, we can remove many duplicated
precondition checking code.
And also, this patch makes new function for clearing voice information list.
Through this function, we can remove duplicated list clearing code.
Change-Id: I611c798238b76b3e2d0b50942dc3b3c5d0eb2372
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 27 Jun 2022 07:07:13 +0000 (16:07 +0900)]
Remove duplicated code
- Issue:
There are too many duplicated codes.
- Solution:
This patch makes new function for removing duplicated code. These new
functions encapsulate duplicated codes, so these have high reusability.
Change-Id: I5a53dc5a6c2c9e97f16944001e3801496e9d771e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 27 Jun 2022 02:35:29 +0000 (02:35 +0000)]
Merge changes Ic626132d,I2b542061 into tizen
* changes:
Make return value clear using enum
Remove duplicated code
Suyeon Hwang [Fri, 24 Jun 2022 08:17:19 +0000 (17:17 +0900)]
Make return value clear using enum
- Issue:
Return values of each function were not clear.
- Solution:
This patch makes each function use enum value as return value. And also,
this patch fixes the return values which are not matched with situation.
Change-Id: Ic626132db4afaa96d3997ba3de02a1f007b9b7ca
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 24 Jun 2022 05:39:25 +0000 (14:39 +0900)]
Remove duplicated code
- Issue:
From tts_engine_agent.c and tts_config_parser.c, too many duplicated code was generated.
- Solution:
This patch makes new unit functions that encapsulate the duplicated code. These functions will
remove duplicated code.
Change-Id: I2b542061f2d5a694d3f786eefbf6447c507fb225
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 16 May 2022 11:41:05 +0000 (20:41 +0900)]
Remove unused reconnect logic code
- Issue:
By calling __reconnect() function from __on_disconnected() callback, unused memory is created.
- Solution:
When client loose the connection to service engine, client tries to reconnect to service engine by
calling tts_core_handle_service_reset() function. This function checks the service engine status
and tries again the prepare processing. So reconnection by __reconnect() function is not necessary.
And also, __reconnect() creates unused information structure memory. Of course these memories are
not searched because the order of append into list. However, this can make memory explosion, so
by this patch, I remove this unused function.
Change-Id: Ic0b0d2aefbb31d8235b4331e1f6f78fa1d4a10ca
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 13 May 2022 07:46:22 +0000 (16:46 +0900)]
Remove tts_core_notify_state_changed_async() to assure callback invocation
- Issue:
Sometimes, if client calls tts_play() very quickly, then the first state changed callback which
shows the change from 'created' to 'ready' state is skipped.
- Solution:
This patch removes the tts_core_notify_state_changed_async() function in order to make sure that
the first state changed callback is called. tts_core_notify_state_changed_async() can not assure
the callback invocation of all state changed because state of client can be changed between timer
register and its actual invocation. And also, without this function, calback invocation does not
block the main loop because all the callers of this function is called by ipc message.
Thus, by this patch, client can assure that the state changed callback is always invoked when
the state is changed.
Change-Id: I2b333330d0c44caeb08973d41f800619458e292e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Sooyeon Kim [Thu, 16 Jun 2022 09:03:58 +0000 (09:03 +0000)]
Merge "Invoke error callback when __prepare_cb is failed" into tizen
sooyeon [Thu, 17 Feb 2022 14:27:00 +0000 (23:27 +0900)]
Invoke error callback when __prepare_cb is failed
Change-Id: Ia03e13220dea3f67a1413ddf19a4c0560ae580c9
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
sooyeon [Mon, 28 Mar 2022 16:20:08 +0000 (01:20 +0900)]
Add a checker whether requesting connection is failed or not
Change-Id: I050f1be537e0267f2a0f2fb58928d5feaa1ce24b
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
Suyeon Hwang [Mon, 13 Jun 2022 08:17:14 +0000 (17:17 +0900)]
Update version (1.70.6)
Change-Id: I0711fd957e0d590fd710a064283ac790370cefa9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 10 Jun 2022 06:27:38 +0000 (15:27 +0900)]
Fix unittest for line coverage automation
Change-Id: Icf4cc166b0516936c385b9903df9699d9e54060d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 9 Jun 2022 02:36:12 +0000 (11:36 +0900)]
Fix gcov package contents for automation
Change-Id: I084fa48109e2af6347a0588e82ac15c7053f79a3
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 13 May 2022 05:13:23 +0000 (14:13 +0900)]
Update Version (1.70.5)
Change-Id: I5ecbabdc69e926f80d89a9b2016aa20d4da0f3a5
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 12 May 2022 12:46:19 +0000 (21:46 +0900)]
Fix paused data handling logic
- Issue:
If sound_data queue is cleared still player thread has reference of the first element of the
sound_data queue, then player thread makes double free problem of sound_data.
- Solution:
Problem is because the player thread tries to destroy the data without ownership of the data. So
This patch makes the player thread has ownership of played sound_data. By this change, player
thread can destroy the data that the thread has its ownership.
Change-Id: Ib3e34f9cc8632458f097edd760da2179471bc864
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
wn.jang [Fri, 15 Apr 2022 01:04:06 +0000 (10:04 +0900)]
Update version to 1.70.4
Change-Id: I8e73638367b4c660e0082df6079e9a101bbee170
wn.jang [Wed, 13 Apr 2022 10:38:42 +0000 (19:38 +0900)]
Add metadata profile xml file
Change-Id: I0b48c7bafbe1773e7ad97c2112ef593d104aaba6
wn.jang [Mon, 28 Mar 2022 07:15:42 +0000 (16:15 +0900)]
Update version to 1.70.3
Change-Id: I5f21a34f8f853fdd8536f33625f40a289dc3f4c9
wn.jang [Mon, 28 Mar 2022 07:01:07 +0000 (16:01 +0900)]
Add to check return value
Change-Id: I7e8033925bef9f14010fdf5409d8fd008bebb097
wn.jang [Mon, 28 Mar 2022 05:34:46 +0000 (14:34 +0900)]
Initialize type of app data
This issue was detected by static analysis tool.
Change-Id: I4b1d4dc81d94f3bd6fa492f680697a7670ed79f8
wn.jang [Fri, 25 Mar 2022 01:54:12 +0000 (10:54 +0900)]
Update version 1.70.2
Change-Id: I4f3a608b9adf8fb4c4fc5dd9dcef8b346815b18e
wn.jang [Fri, 25 Mar 2022 01:34:56 +0000 (10:34 +0900)]
Initialize result_event of app data
This issue was detected by static analysis tool.
Change-Id: Iac86b73641a1feacb59b29781a1f777f12b8f0b5
Suyeon Hwang [Mon, 24 Jan 2022 05:54:52 +0000 (14:54 +0900)]
Clean up header files
Change-Id: I87127a6429e4396dfaf5492c06eba9a6cbb230b2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 20 Jan 2022 03:11:15 +0000 (12:11 +0900)]
Remove ttsd_player_resume()
Change-Id: Iea7fdeeef07dc83f4a75997c4b9c5ecf2aa5dbb9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 20 Jan 2022 02:26:47 +0000 (11:26 +0900)]
Rearrange code to stop all client
Change-Id: I1395e10b466b998a6b14d4d17ccb2cf6839b20e4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 19 Jan 2022 07:02:39 +0000 (16:02 +0900)]
Remove code for mode of service engine
Change-Id: I49ca352cd1dc35a9404903079467277445a35af8
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 19 Jan 2022 06:05:51 +0000 (15:05 +0900)]
Remove unused code about sound focus change
Change-Id: I7769384e7d16697b460a7b12af669c08b5627dc7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 19 Jan 2022 05:08:37 +0000 (14:08 +0900)]
Rearrange the policy handling code
In order to service by one process, server would handle policy for client mode without sound focus.
This patch removes the sound focus changed callback from ttsd_player because it is not used from
now. And this patch changes the policy code in ttsd_server to make the code cover all cases of
policy.
Change-Id: I48f92e4453d7299df805af938bbb1fdac2403e3b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 14 Jan 2022 09:03:36 +0000 (18:03 +0900)]
Make play type to identify the method to stop playing
Change-Id: Ief42fe91d71fc74db33fd3bea79b1419a9be7a5b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 10 Jan 2022 05:58:05 +0000 (14:58 +0900)]
Run only one service process regardless of client mode
To support multiple mode, current code runs multiple service process for each mode. However,
this architecture needs huge resource for launching multiple process.
To reduce the resource usage, this patch makes client request to launch only one service
process.
Change-Id: I8e0161e0615bdf6a3548b7004c4aab34b826dbdf
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 14 Jan 2022 10:32:01 +0000 (19:32 +0900)]
Remove unused parameter of ttsd_server_pause()
Change-Id: Id1970c88a563b86ccbbf3125cbd8b409fb876927
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 26 Apr 2021 07:24:38 +0000 (16:24 +0900)]
Change name of function to increase readability
Change-Id: I604c31fb357678c61f0b1c18e144842ff6c13f8a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 28 May 2021 09:40:07 +0000 (18:40 +0900)]
Clean up code to enhance readability
This patch includes these to enhance readability.
- Remove unused headers and invaluable comments
- Change log level to help logging.
- Remove invaluable keywords.
- Fix NULL to nullptr.
Change-Id: Iadb75d1fb42cebf5740b9e0d2df0581785427acb
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 28 May 2021 09:13:39 +0000 (18:13 +0900)]
Use PlayerThread class to manage utterance playing thread
Change-Id: I7965754245c4f8422e19771483d63deb45015120
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 27 May 2021 11:52:08 +0000 (20:52 +0900)]
Remove functions and variables relative with player_s
Change-Id: I572a1b1420cafca0bfc9c3aab3e0f548b903f4c4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 8 Nov 2021 08:09:12 +0000 (17:09 +0900)]
Use PlayerThread class to manage current playing client
Change-Id: I8d32b0570de420485b3c50fea9d28933ba62bf0b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 30 Apr 2021 08:20:09 +0000 (17:20 +0900)]
Define class for new TTS play thread
ttsd_player.cpp has too complexity responsibility to play PCM data. This complexity makes bad code
to maintain.
This patch makes new class PlayerThread to manage thread for playing pcm data. By this new class,
we can simplify the responsibility of ttsd_player.cpp, and this enhance the maintainability.
Change-Id: Icc7c6f294a8879243a310383c59e46358780cd75
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 8 Mar 2022 00:42:40 +0000 (00:42 +0000)]
Merge "Make new functions to manager last event of played sound data" into tizen
sooyeon [Mon, 7 Mar 2022 16:55:55 +0000 (01:55 +0900)]
Revert to Dbus service activation, not systemd service activation
Change-Id: I701066ac290f1aa4969c1df14380e9fffc3e3c48
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
Suyeon Hwang [Mon, 7 Mar 2022 07:13:28 +0000 (16:13 +0900)]
Fix build error by order of initializer
Change-Id: I9e2f157fe2503af0d09e6f515b3d7083711afa44
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 7 Mar 2022 02:07:12 +0000 (02:07 +0000)]
Merge "Fix defect from static analysis tool" into tizen
Suyeon Hwang [Thu, 4 Nov 2021 06:13:25 +0000 (15:13 +0900)]
Make new functions to manager last event of played sound data
Change-Id: I51f101ddbeb7379a3b783c54bc55c2abef8026d9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 24 May 2021 11:07:05 +0000 (20:07 +0900)]
Extract function for waiting synthesis
Change-Id: I92c385d1d3dc2d5c4871d19a4e28f62c7f76bfbc
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 21 May 2021 04:26:15 +0000 (13:26 +0900)]
Unify state check of player and ttsd_data
Change-Id: Id736520f6ac18f4d1f9ceec3d5abc82235be1596
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 20 May 2021 06:08:19 +0000 (15:08 +0900)]
Fix ttsd_data_get_client_state() returns state value directly
Change-Id: I4ae4bbe95e236e2f957fa40b855b6ecd92958664
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 3 Mar 2022 04:23:37 +0000 (04:23 +0000)]
Merge "Extract function for utterance start/complete event" into tizen
Suyeon Hwang [Tue, 18 May 2021 09:26:46 +0000 (18:26 +0900)]
Extract function for utterance start/complete event
Change-Id: I490a61bc8707ba0cc189d8c1804cebebf17b46d7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 3 Mar 2022 02:23:16 +0000 (11:23 +0900)]
Remove ttsd_network.c/h
ttsd_network.c/h is providing function for checking network connection, but this is too small
responsibilty and ttsd_server only uses this function. And also, initializing and
finalizing functions are not implemented.
This patch removes these files and moves the function to ttsd_server. By this change, we do not
need to check unnecessary files and functions.
Change-Id: Iebb7ed340aaf7272a232fcfe5f5a3b21aa21aab2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 3 Mar 2022 02:41:56 +0000 (02:41 +0000)]
Merge "Extract function for playting pcm data" into tizen
Suyeon Hwang [Thu, 3 Mar 2022 00:56:33 +0000 (00:56 +0000)]
Merge changes I7c724fff,I3e1607f8 into tizen
* changes:
Add ttse_terminate() and tts_prepare_sync() into public API
Clean up ttse_terminate(), tts_prepare_sync() function
wn.jang [Wed, 2 Mar 2022 11:43:32 +0000 (20:43 +0900)]
Fix defect from static analysis tool
This issue is UNINIT_CTOR which means "Uninitialize pointer field".
Change-Id: I90f75258797ac2460a5b85d03f0fd663feb6d2a8
Suyeon Hwang [Mon, 8 Nov 2021 06:26:28 +0000 (15:26 +0900)]
Extract function for playting pcm data
Change-Id: I595011cac656c1a90936fbf0cf1bdaa7aead0839
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 2 Mar 2022 06:20:40 +0000 (06:20 +0000)]
Merge "Refactor retry IPC code to enhance readability" into tizen
Suyeon Hwang [Wed, 2 Mar 2022 06:20:30 +0000 (06:20 +0000)]
Merge "Fix paused data handling logic" into tizen
Suyeon Hwang [Wed, 23 Feb 2022 10:04:25 +0000 (19:04 +0900)]
Refactor retry IPC code to enhance readability
The code for retry IPC is too complex to understand.
To simplify the code, this patch refactors the code for retry IPC. By this patch, the name of
function and its logic become more clear to understand.
Change-Id: I9b7cdc4265ce639f3ebc5d71230af14c684adc95
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 16 Feb 2022 07:00:23 +0000 (16:00 +0900)]
Add ttse_terminate() and tts_prepare_sync() into public API
Change-Id: I7c724fff803f9d2aa85ef7f24638685683430075
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
sooyeon [Wed, 23 Feb 2022 14:41:56 +0000 (23:41 +0900)]
Change dbus-based to systemd-based and Change a directory to install service files in accordance with architecture
Change-Id: I6b86b13e0c40f85e787f9576f7e3377061a62401
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
Suyeon Hwang [Wed, 16 Feb 2022 08:47:53 +0000 (17:47 +0900)]
Clean up ttse_terminate(), tts_prepare_sync() function
Change-Id: I3e1607f831f1371d626fc57b34de7d13e1c69e01
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 14 May 2021 05:37:55 +0000 (14:37 +0900)]
Fix paused data handling logic
By current pause logic, player_s stores pointer of paused sound_data_s and its data index for
resuming, and these are stored sperately by member variable of player_s.
However, the index and sound_data_s can be managed together if sound_data_s has the member for
data index, although current logic has no problem.
And also, managing together is easy and safe to handle paused data.
If we combine paseud index and data with sound_data_s, player_s should not store the data, because
the first data of the list from ttsd_data is the last played data and it should be paused data
itself.
By this patch, new functions are defined on ttsd_data. These functions provides interface to access
sound data. And also this patch creates new functions for checking whether client has pasued data
or not.
Change-Id: I9ca41a08bafdff97ae7b4ba3981897cd9485bbe4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Fri, 18 Feb 2022 09:41:43 +0000 (09:41 +0000)]
Merge changes Ifddb8324,I3537411c into tizen
* changes:
Use AudioStream class on ttsd_player
Define class for managing audio stream
Suyeon Hwang [Fri, 18 Feb 2022 06:43:34 +0000 (06:43 +0000)]
Merge "Fix the description of tts_repeat()" into tizen
Suyeon Hwang [Mon, 10 May 2021 09:20:28 +0000 (18:20 +0900)]
Use AudioStream class on ttsd_player
Change-Id: Ifddb83248619e710356fab0ee0bcef274b1b8d29
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 28 Apr 2021 02:48:38 +0000 (11:48 +0900)]
Define class for managing audio stream
ttsd_player.cpp has too complexity responsibility to play PCM data. This complexity makes bad code
to maintain.
This patch makes new class AudioStream to manage audio stream. By this new class, we can simplify
the responsibility of ttsd_player.cpp, and this enhance the maintainability.
Change-Id: I3537411c41349166cd617815e65415676dda4723
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 17 Feb 2022 02:46:48 +0000 (02:46 +0000)]
Merge "Fix potential defects on ttsd_player" into tizen
Suyeon Hwang [Fri, 7 May 2021 07:13:40 +0000 (16:13 +0900)]
Use BackgroundVolume class on ttsd_player
Change-Id: I598a0d7c7525ca97c1edd747b1a1c0e38ef9baab
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 6 May 2021 02:54:15 +0000 (11:54 +0900)]
Define class for managing background sound
ttsd_player.cpp has too complexity responsibility to play PCM data. This complexity makes bad code
to maintain.
This patch makes new class BackgroundVolume to manage background sound. By this new class,
we can simplify the responsibility of ttsd_player.cpp, and this enhance the maintainability.
Change-Id: I080b092af1c833473bac30f768fefac3ec2d0674
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 16 Feb 2022 02:30:02 +0000 (11:30 +0900)]
Fix potential defects on ttsd_player
This patch includes this changes in order to fix some potential defects:
- Remove null pointer dereferencing
- Add mutex lock in order to use conditional wait
- Move assigning code to avoid change out of critical section
Change-Id: Iad704cfd30316b5299ab5acbb47178fb6ef2c12a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 7 Feb 2022 08:25:28 +0000 (17:25 +0900)]
Fix the description of tts_repeat()
Current descprion is not matched with the behavior and purpose of the function.
This patch changes the description in order to match the description and behavior of the function.
Change-Id: I3f8e39348c327206a38522a3853541b6ee1fc1aa
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 20 Jan 2022 06:57:51 +0000 (15:57 +0900)]
Add code to check whether the player is initialized
Change-Id: Ic651a374b408dd10f0cee033e49c080d678d178f
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 27 Apr 2021 09:33:04 +0000 (18:33 +0900)]
Change file format of ttsd_player from c to cpp
To enhance readability, this patch changes the format of ttsd_player from c to cpp.
By this change, we can apply cpp grammar into ttsd_player code to enhance the readability and
simplify the code. And also, we can use class to seperate the responsibility of ttsd_player to
decrease the complexity.
Change-Id: I63ce7efe9729a4b31377265fc21d0551397aa160
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 5 Jan 2022 04:44:56 +0000 (13:44 +0900)]
Fix condition to remove dead code
In current code, speak_data is not null if ttsd_data_get_speak_data() returns error none, so null
check on line #99 ~ #102 would become dead code.
To remove this dead code, this patch fixes the condition to check the result of
ttsd_data_get_speak_data(). And this patch fixes some potential memory leak and enhances the
readability.
Change-Id: Ic8dcf0eea79cb57a4a8ad8cf6afc9d59fcd60e49
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 26 Apr 2021 10:36:04 +0000 (19:36 +0900)]
Fix prototypes of internal functions to increase readability
Some internal functions are not declared as a static. Using static keyword, each functions can
avoid the access from out of file.
And also, some functions have too many parameters and it makes difficult to use.
This patch adds static keywords to internal functions and simplify some internal function.
Change-Id: I6e315f19fe84c063f094cd1a665b2c2ae7097b19
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Tue, 27 Apr 2021 08:47:06 +0000 (17:47 +0900)]
Make function for managing sound_data_s
In previous code, instance of sound_data_s is created by ttsd_server.c. However, destruction of
instance is by ttsd_data.c.
This way of memory management is dangerous, because invalid memory access can occur by the mistake
of developers.
This patch provides two new function for creating and destroying instance of sound_data_s.
These functions provide safe creation and destruction of the instance.
Change-Id: I18634d45e5a145238989c5eeefb7457332e7a782
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Mon, 26 Apr 2021 06:36:59 +0000 (15:36 +0900)]
Make function for managing speak_data_s
In previous code, instance of speak_data_s created by ttsd_server.c but destroyed by ttsd_data.c.
This way of memory management is dangerous because invalid memory access can occur by the mistake
of developers.
This patch provides two new function for creating and destroying instance of speak_data_s.
These functions provide safe creation and destruction of the instance.
Change-Id: I016720eccbffd16bdfcb23878573caa1cb9f3115
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Wed, 21 Apr 2021 10:40:41 +0000 (19:40 +0900)]
Use single play thread to play PCM data
To simplify the management of player thread, this patch makes only one sub thread to play PCM data.
Change-Id: I9f0a050f59411bb692e038488e474dce0716cb46
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
Suyeon Hwang [Thu, 10 Feb 2022 02:38:13 +0000 (02:38 +0000)]
Merge "Return error when TTS engine is terminated before beginning the main loop" into tizen
Suyeon Hwang [Fri, 28 Jan 2022 08:57:44 +0000 (17:57 +0900)]
Send return value from server to client
Current code does not send return value of server error to client which uses TIDL as IPC method.
However, this can make unintented behavior because some function like tts_play() needs to error
value for returning.
This patch makes server send return value to client although the client uses TIDL. By this change,
clients can always get proper error values from server.
Change-Id: Ibb98cd1bf64e92746022632f3bc5bf9eded904df
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit
3a86f249ae8266bf145944f108088af0dd5f2ba3)
sooyeon [Fri, 28 Jan 2022 00:49:43 +0000 (09:49 +0900)]
Return error when TTS engine is terminated before beginning the main loop
Change-Id: I93e5a1b189632629f3e3334d08d7d99a9942042a
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
(cherry picked from commit
8ac094519445240d9c29133b1ada3dd7c2a7b73a)
Suyeon Hwang [Wed, 12 Jan 2022 04:30:41 +0000 (13:30 +0900)]
Send new state to client synchornously
Current code sends new state asynchornously using ecore timer in order to prohibit main loop
from being blocked. However, sending new state can be delayed by the event from
ecore_main_loop_thread_safe_call_async(). Callback registered by this function has higher priority
than the ecore timer callback. This may cause uninteded behavior on client side.
To prevent this situation, this patch sends new state synchornously. By this patch, client gets
new state immediately after stop player. Of course, IPC overhead can be added into
ttsd_server_play(), but the overhead is short enough.
Change-Id: Ia580edbd957d57a215d3d760fdcd8de54b73c49c
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
wn.jang [Thu, 20 Jan 2022 07:35:36 +0000 (16:35 +0900)]
Update version to 1.70.0
Change-Id: I1025a116f660c8006dad779956dbe88d77c740ed
wn.jang [Thu, 20 Jan 2022 04:22:14 +0000 (13:22 +0900)]
Coverage support for robot profile
Change-Id: I94628c39ae124a282001a1ccf4f2afc8cc07e5b4
Suyeon Hwang [Fri, 14 Jan 2022 02:55:12 +0000 (11:55 +0900)]
Terminate service engine when engine is changed
Change-Id: I2d9bc90b0ce71cb37b9c9f4997debdb7dc517061
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit
4bd34ef0d4ef885642c3752b7ecfcdf76d5d2694)