summaryrefslogtreecommitdiff
path: root/amavutils/mediactl/common_ctl.h (plain)
blob: 82db25892e0771086addd2dfa33ad1bd6733a354
1/*
2 * Copyright (c) 2014 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 */
9
10
11#ifndef COMMON_CTL_H
12#define COMMON_CTL_H
13
14#include <stdio.h>
15#include <stdlib.h>
16#include <fcntl.h>
17#include <string.h>
18#include <unistd.h>
19#include <sys/ioctl.h>
20#include <errno.h>
21#include <cutils/log.h>
22#include <../mediaconfig/media_config.h>
23#include <amports/amstream.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#define UnSupport 0xFFFF
30//#define CTRL_PRINT ALOGD
31#define CTRL_PRINT
32int media_open(const char *path, int flags);
33int media_close(int fd);
34int media_control(int fd, int cmd, unsigned long paramter);
35int media_set_ctl(const char * path,int setval);
36int media_get_ctl(const char * path);
37int media_set_ctl_str(const char * path,char* setval);
38int media_get_ctl_str(const char * path, char* buf, int size);
39int media_sync_set_ctl(const char * path,int setval);
40int media_sync_get_ctl(const char * path);
41int media_sync_set_ctl_str(const char * path,char* setval);
42int media_sync_get_ctl_str(const char * path, char* buf, int size);
43int media_video_set_ctl(const char * path,int setval);
44int media_video_get_ctl(const char * path);
45int media_video_set_ctl_str(const char * path,char* setval);
46int media_video_get_ctl_str(const char * path, char* buf, int size);
47int media_decoder_set_ctl(const char * path,int setval);
48int media_decoder_get_ctl(const char * path);
49int media_decoder_set_ctl_str(const char * path,char* setval);
50int media_decoder_get_ctl_str(const char * path, char* buf, int size);
51int media_video_get_int(int cmd);
52int media_video_set_int(int cmd, int para);
53int media_vfm_get_ulong(int cmd);
54int media_vfm_set_ulong(int cmd, unsigned long para);
55int media_codec_mm_set_ctl_str(const char * path,char* setval);
56int media_codec_mm_get_ctl_str(const char * path, char* buf, int size);
57int media_get_vfm_map_str(char* val,int size);
58int media_set_vfm_map_str(const char* val);
59int media_rm_vfm_map_str(const char* name,const char* val);
60int media_add_vfm_map_str(const char* name,const char* val);
61int media_sub_getinfo(int type);
62int media_sub_setinfo(int type, int info);
63struct vfmctl{
64char name[10];
65char val[300];
66};
67
68#define VFM_IOC_MAGIC 'V'
69#define VFM_IOCTL_CMD_ADD _IOW((VFM_IOC_MAGIC), 0x00, struct vfmctl)
70#define VFM_IOCTL_CMD_RM _IOW((VFM_IOC_MAGIC), 0x01, struct vfmctl)
71#define VFM_IOCTL_CMD_DUMP _IOW((VFM_IOC_MAGIC), 0x02, struct vfmctl)
72#define VFM_IOCTL_CMD_ADDDUMMY _IOW((VFM_IOC_MAGIC), 0x03, struct vfmctl)
73#define VFM_IOCTL_CMD_SET _IOW(VFM_IOC_MAGIC, 0x04, struct vfmctl)
74#define VFM_IOCTL_CMD_GET _IOWR(VFM_IOC_MAGIC, 0x05, struct vfmctl)
75
76
77enum subinfo_para_e {
78 SUB_NULL = -1,
79 SUB_ENABLE = 0,
80 SUB_TOTAL,
81 SUB_WIDTH,
82 SUB_HEIGHT,
83 SUB_TYPE,
84 SUB_CURRENT,
85 SUB_INDEX,
86 SUB_WRITE_POS,
87 SUB_START_PTS,
88 SUB_FPS,
89 SUB_SUBTYPE,
90 SUB_RESET,
91 SUB_DATA_T_SIZE,
92 SUB_DATA_T_DATA
93};
94
95struct subinfo_para_s {
96 enum subinfo_para_e subinfo_type;
97 int subtitle_info;
98 char *data;
99};
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif
106