blob: 89be11272f5f6b36fa172fcb6b8ff4a3579caaf3 [file] [log] [blame]
Song Zhaoea5a0412021-01-18 16:40:08 -08001/*
2 * Copyright (c) 2020 Amlogic, Inc. All rights reserved.
3 *
4 * This source code is subject to the terms and conditions defined in the
5 * file 'LICENSE' which is part of this source code package.
6 *
7 * Description:
8 * User space AV sync module.
9 *
10 * Author: song.zhao@amlogic.com
11 */
12
13#ifndef MSYNC_UTIL_H
14#define MSYNC_UTIL_H
15
16#include <stdbool.h>
17#include <stdint.h>
18#include "aml_avsync.h"
19
20int msync_create_session();
21void msync_destory_session(int id);
22
23int msync_session_set_mode(int fd, enum sync_mode mode);
24int msync_session_get_mode(int fd, enum sync_mode *mode);
25int msync_session_get_start_policy(int fd, uint32_t *policy);
26int msync_session_set_start_policy(int fd, uint32_t policy);
27int msync_session_set_pause(int fd, bool pause);
28int msync_session_set_video_start(int fd, pts90K pts);
29int msync_session_get_wall(int fd, uint32_t *wall, uint32_t *interval);
30int msync_session_set_video_start(int fd, pts90K pts);
31int msync_session_set_audio_start(int fd, pts90K pts, pts90K delay, uint32_t *mode);
32int msync_session_set_video_dis(int fd, pts90K pts);
33int msync_session_set_audio_dis(int fd, pts90K pts);
34int msync_session_set_rate(int fd, float speed);
35int msync_session_get_rate(int fd, float *speed);
36int msync_session_set_name(int fd, const char* name);
37int msync_session_update_vpts(int fd, uint32_t system, uint32_t pts, uint32_t delay);
38int msync_session_update_apts(int fd, uint32_t system, uint32_t pts, uint32_t delay);
39int msync_session_set_audio_stop(int fd);
40int msync_session_set_video_stop(int fd);
Song Zhaoe208d692021-04-19 15:38:52 -070041int msync_session_get_stat (int fd, enum sync_mode *mode,
42 bool *v_active, bool *a_active, bool *v_timeout);
Song Zhaoea5a0412021-01-18 16:40:08 -080043bool msync_clock_started(int fd);
44int msync_session_set_pcr(int fd, pts90K pts);
45int msync_session_get_pcr(int fd, pts90K *pts);
46
47#endif