diff options
author | jinwoo.shin <jw0227.shin@samsung.com> | 2015-08-11 21:13:38 +0900 |
---|---|---|
committer | jinwoo.shin <jw0227.shin@samsung.com> | 2015-08-11 21:13:38 +0900 |
commit | 1481c623c2a6eb1ecc529a62c04ee89bafd72ec6 (patch) | |
tree | 318060d3b60d43bca73852dd0b52bd28432c18c1 /src | |
parent | 00781418fa5792d01af898fa9fd4efe90abde89b (diff) | |
download | air_livetv-1481c623c2a6eb1ecc529a62c04ee89bafd72ec6.tar.gz air_livetv-1481c623c2a6eb1ecc529a62c04ee89bafd72ec6.tar.bz2 air_livetv-1481c623c2a6eb1ecc529a62c04ee89bafd72ec6.zip |
Call live service pause/resume on app pause/resume
Change-Id: I37a556b1c392bb18ceff005c5e35d96cf5fedac3
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/tv.c | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -1055,12 +1055,8 @@ int tv_destroy(void) { int r; - if (g_tv_info.live_svc) { - r = tv_service_live_destroy(g_tv_info.live_svc); - if (r != TVS_ERROR_OK) - _ERR("failed to destroy live service"); + if (g_tv_info.live_svc) g_tv_info.live_svc = NULL; - } r = tv_service_channel_info_destroy(); if (r < 0) @@ -1126,10 +1122,9 @@ int tv_pause(void) int r; if (g_tv_info.live_svc) { - r = tv_service_live_destroy(g_tv_info.live_svc); + r = tv_service_live_tune_pause(g_tv_info.live_svc); if (r != TVS_ERROR_OK) - _ERR("failed to destroy live service"); - g_tv_info.live_svc = NULL; + _ERR("failed to pause live service"); } return 0; @@ -1151,10 +1146,17 @@ int tv_resume(void) { int r; - if (g_tv_info.live_svc) - return 0; + if (!g_tv_info.live_svc) { + r = tv_service_live_create(&g_tv_info.live_svc); + if (r != TVS_ERROR_OK) { + _ERR("failed to create live service"); + goto err; + } else { + return 1; + } + } - r = tv_service_live_create(&g_tv_info.live_svc); + r = tv_service_live_tune_resume(g_tv_info.live_svc); if (r != TVS_ERROR_OK) { _ERR("failed to create live service"); goto err; @@ -1167,7 +1169,7 @@ int tv_resume(void) goto err; } - return 1; + return 0; err: tv_destroy(); |