blob: 5c5083df85d25d97662053d4285cd107485a4196 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*****************************************************************************
2 * °æ±¾ËùÓÐ (C)2008ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾
3 * Ä£¿éÃû £º
4 * ʵÏÖ¹¦ÄÜ £º
5 * ×÷Õß £º
6 * °æ±¾ £º
7 * Íê³ÉÈÕÆÚ £º
8 * ÆäËü˵Ã÷ £ºMSPÊÓÆµ²¥·Å¶ÔÍâ½Ó¿ÚÍ·Îļþ
9 * ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
10 * ---------------------------------------------------------------------
11 * 2008/08/01 V1.0 XXXX XXXX
12************************************************************************/
13#ifndef ZTE_VIDEO_H
14#define ZTE_VIDEO_H
15
16/**************************************************************************
17 * Í·Îļþ°üº¬ *
18 **************************************************************************/
19#include "zte_display.h"
20
21/**************************************************************************
22 * ºê *
23 **************************************************************************/
24#define VIDEO_MAX_PATH_LEN 1024
25/**************************************************************************
26 * Êý¾ÝÀàÐÍ *
27 **************************************************************************/
28typedef enum
29{
30 VIDEO_FILE_TYPE_MP4,
31 VIDEO_FILE_TYPE_3GP,
32 VIDEO_FILE_TYPE_K3G,
33 VIDEO_FILE_TYPE_UNKNOWN
34} VIDEO_BUFFER_FILE_TYPE_E;
35
36typedef enum
37{
38 CHANNEL_OUT_RECEIVER = 1, /*ÌýͲ*/
39 CHANNEL_OUT_SPEAKER , /*speaker*/
40 CHANNEL_OUT_EARPHONE, /*¶ú»ú*/
41 CHANNEL_OUT_SPEAKER_EARPHONE, /*¶ú»ú + SpeakerͬʱÊä³ö*/
42 CHANNEL_OUT_BLUETOOTH
43}VIDEO_CHANNEL_OUT_TYPE_E;
44
45typedef enum
46{
47 VIDEO_VOLUME_LEVEL_0,
48 VIDEO_VOLUME_LEVEL_1,
49 VIDEO_VOLUME_LEVEL_2,
50 VIDEO_VOLUME_LEVEL_3,
51 VIDEO_VOLUME_LEVEL_4,
52 VIDEO_VOLUME_LEVEL_5
53}VIDEO_VOLUME_LEVEL_E;
54
55typedef enum
56{
57 VIDEO_SEEK_FROM_CUR, /*´Óµ±Ç°Î»ÖÃseek*/
58 VIDEO_SEEK_FROM_BEGIN /*´Ó¿ªÊ¼Seek*/
59}VIDEO_PLAY_SEEK_MODE;
60
61typedef enum
62{
63 VIDEO_PLAY_STATE_IDLE,
64 VIDEO_PLAY_STATE_READY,
65 VIDEO_PLAY_STATE_PLAY,
66 VIDEO_PLAY_STATE_PAUSE,
67 VIDEO_PLAY_STATE_STOP
68}VIDEO_PLAY_STATE;
69
70typedef struct
71{
72 char filepath[VIDEO_MAX_PATH_LEN+1]; /*ÊÓÆµµÄ×ÊԴ·¾¶*/
73 RECT_T play_rect;
74 MAN_ROTATE_TYPE rotate;
75 VIDEO_CHANNEL_OUT_TYPE_E channel;
76 VIDEO_VOLUME_LEVEL_E volume;
77 VIDEO_PLAY_STATE curstate;
78 UINT8 *videoBuf; /* Ö¸ÏòÊÓÆµbufferÊý¾ÝµÄÖ¸Õë */
79 UINT32 videoBuffSize; /* ÊÓÆµbufferµÄ´óС */
80 VIDEO_BUFFER_FILE_TYPE_E videotype; /* ÊÓÆµÀàÐÍ */
81}VIDEO_PLAY_PARAM_T;
82
83typedef struct
84{
85 UINT32 pos;
86 VIDEO_PLAY_SEEK_MODE seekmode;
87}VIDEO_PLAY_SEEK_T;
88
89typedef struct
90{
91 UINT32 dwTotalTime;
92 DISPLAY_SIZE_T tsize;
93 UINT32 dwOnlyHaveAudio;
94}VIDEO_PLAY_INFO;
95
96/**************************************************************************
97 * º¯ÊýÔ­ÐÍ *
98 **************************************************************************/
99DCAMERA_RETURN_VALUE_E Video_Open(void);
100
101DCAMERA_RETURN_VALUE_E Video_Close(void);
102
103DCAMERA_RETURN_VALUE_E Video_Play_Init(VIDEO_PLAY_PARAM_T *param);
104
105DCAMERA_RETURN_VALUE_E Video_Play_Buffer_Init(VIDEO_PLAY_PARAM_T *param);
106
107DCAMERA_RETURN_VALUE_E Video_Play_Release(void);
108
109DCAMERA_RETURN_VALUE_E Video_StartPlay(VIDEO_PLAY_PARAM_T *param);
110
111DCAMERA_RETURN_VALUE_E Video_StopPlay(void);
112
113DCAMERA_RETURN_VALUE_E Video_PausePlay(void);
114
115DCAMERA_RETURN_VALUE_E Video_ResumePlay(void);
116
117DCAMERA_RETURN_VALUE_E Video_Seek(VIDEO_PLAY_SEEK_T *param);
118
119DCAMERA_RETURN_VALUE_E Video_Rotate(VIDEO_PLAY_PARAM_T *param);
120
121DCAMERA_RETURN_VALUE_E Video_GetCurTime(unsigned long *param);
122
123DCAMERA_RETURN_VALUE_E Video_GetTotalTime(unsigned long *param);
124
125DCAMERA_RETURN_VALUE_E Video_GetFileInfo(VIDEO_PLAY_INFO *param);
126
127#endif
128
129