source: svn/trunk/newcon3bcm2_21bu/dst/dhl/api/test/AVCAPTest.c @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 16.1 KB
Line 
1/**
2        AVCAPTest.c
3
4        ÀÌ ¸ðµâÀº AVCAP API Test ¸¦ À§ÇÑ ·çƾÀÌ´Ù.
5
6*/
7
8
9#include "DHL_OSAL.h"
10#include "DHL_AVCAP.h"
11
12//#include "DHL_APITest.h"
13
14
15#if COMMENT
16____Func___(){}
17#endif
18
19static void callback_func(tDHL_AVCallbackType cb_type, UINT32 param)
20{
21
22        if(cb_type == eDHL_CB_VideoSeqHdr)
23        {
24                tDHL_VideoSeqHdr *pSeq = (tDHL_VideoSeqHdr *)param;
25
26                DHL_OS_Printf("-- Video Sequence Header info -- \n");
27                DHL_OS_Printf("aspect_ratio_information : %d \n", pSeq->aspect_ratio_information);
28                DHL_OS_Printf("frame_rate_code : %d \n", pSeq->frame_rate_code);
29                DHL_OS_Printf("horizontal_size : %d \n", pSeq->horizontal_size);
30                DHL_OS_Printf("vertical_size : %d \n", pSeq->vertical_size);
31                DHL_OS_Printf("progressive_sequence : %d \n", pSeq->progressive_sequence);
32
33        }
34        else if(cb_type == eDHL_CB_HdmiStatusChanged)
35        {
36                tDHL_VideoHdmiStatus *pSeq = (tDHL_VideoHdmiStatus *)param;
37
38                DHL_OS_Printf("-- VideoHdmiStatus info -- \n");
39                DHL_OS_Printf("bConnected : %d \n", pSeq->bConnected);
40                DHL_OS_Printf("preferedFormat : %d \n", pSeq->preferedFormat);
41                DHL_OS_Printf("supportedFormat : 0x%08x \n", pSeq->supportedFormat);
42        }
43        else if(cb_type == eDHL_CB_FirstVideoShow)
44        {
45                DHL_OS_Printf("-- First Video Show -- \n");
46        }
47       
48
49}
50
51
52#if COMMENT
53____AV_Test___(){}
54#endif
55
56/*
57        AV start µ¿ÀÛ test ÇÔ¼ö
58
59        Á¤»ó µ¿ÀÛ ¼öÇà½Ã ºñµð¿À ¹× ¿Àµð¿À°¡ Ãâ·ÂµÈ´Ù.
60
61        ÀÔ·Â ¼Ò½º°¡ ¹Ù²î¾î Àç Start ½Ã¿¡´Â ¹Ýµå½Ã AVTest_StopÀ» ÇØÁØ ÈÄ Start ÇÑ´Ù.
62
63        id : TS input port (0, 1)
64        vpid : video pid
65        apid : audio pid
66        vtype : video decoding format
67        atype : audio decoding format
68                       
69*/
70void AVTest_Start(tDHL_VDID id, int vpid, int vtype, int apid, int atype)
71{
72
73        DHL_RESULT dhr = DHL_OK;
74
75        UINT16 pcr_pid;
76
77        pcr_pid = (UINT16)vpid;
78       
79
80        dhr = DHL_AV_Init();
81        if(dhr != DHL_OK)
82        {
83                DHL_OS_Printf("Error DHL_AV_init \n");
84        }
85
86        dhr = DHL_AV_VideoStart(id, (UINT16)vpid, pcr_pid, (tDHL_VideoCodingType)vtype);
87        if(dhr != DHL_OK)
88        {
89                DHL_OS_Printf("Error DHL_AV_VideoStart \n");
90        }
91
92        dhr = DHL_AV_AudioStart((UINT16)apid, pcr_pid, (tDHL_AudioCodingType)atype);
93        if(dhr != DHL_OK)
94        {
95                DHL_OS_Printf("Error DHL_AV_AudioStart \n");
96        }
97
98       
99}
100
101
102/*
103        AV stop µ¿ÀÛ test ÇÔ¼ö
104
105        Á¤»ó µ¿ÀÛ ¼öÇà½Ã ºñµð¿À ¹× ¿Àµð¿À Ãâ·ÂÀÌ disable µÈ´Ù.
106                       
107*/
108void AVTest_Stop(tDHL_VDID id)
109{
110
111        DHL_RESULT dhr = DHL_OK;
112
113        dhr = DHL_AV_VideoStop(id);
114        if(dhr != DHL_OK)
115        {
116                DHL_OS_Printf("Error DHL_AV_VideoStop \n");
117        }
118
119        dhr = DHL_AV_AudioStop();
120        if(dhr != DHL_OK)
121        {
122                DHL_OS_Printf("Error DHL_AV_AudioStop \n");
123        }
124
125}
126
127/*
128        AV terminate µ¿ÀÛ test ÇÔ¼ö
129
130        Á¤»ó µ¿ÀÛ ¼öÇà½Ã AV °ü·Ã ¸ðµç Ãâ·ÂÀÌ disable µÇ¸ç ³»ºÎÀûÀ¸·Î´Â module ÀÌ close µÇ¾î
131        AV_init À» ¼öÇàÇÒ ¼ö ÀÖ´Â Áغñ »óÅ·Π¸¸µç´Ù.
132
133        AV Start Áß¿¡ ¹Ù·Î Terminate ¸¦ ½ÇÇà½ÃŰ¸é ¾ÈµÇ¸ç ¹Ýµå½Ã AV Stop À» ÇÑÈÄ¿¡ terminate µ¿ÀÛ!!
134                       
135*/
136void AVTest_Terminate(tDHL_VDID id)
137{
138
139        DHL_RESULT dhr = DHL_OK;
140
141        dhr = DHL_AV_VideoStop(id);
142        if(dhr != DHL_OK)
143        {
144                DHL_OS_Printf("Error DHL_AV_VideoStop \n");
145        }
146
147        dhr = DHL_AV_AudioStop();
148        if(dhr != DHL_OK)
149        {
150                DHL_OS_Printf("Error DHL_AV_AudioStop \n");
151        }
152
153        dhr = DHL_AV_Terminate();
154        if(dhr != DHL_OK)
155        {
156                DHL_OS_Printf("Error DHL_AV_Terminate \n");
157        }
158
159}
160
161/*
162        AV Control µ¿ÀÛ test ÇÔ¼ö.
163
164        AV ÀÇ ¼¼ºÎ µ¿ÀÛÀ» Control ÇÑ´Ù.
165
166        type : Control type ÁöÁ¤.
167        value : Control ¿¡ ´ëÇÑ °ª ÁöÁ¤.
168
169        type º°·Î value Çü½ÄÀÌ ´Ù¸£´Ù.
170
171        1. eDHL_AV_CTL_VIDEO_BG_COLOR
172
173                Display ÀÇ ¹è°æ»öÀ» ¹Ù²Û´Ù. À̶§ value ´Â RGB(8:8:8bit) ÀÇ °ªÀÌ´Ù.
174                ¿¹) R(0x64), G(0x10), B(0x30) => value = 0x00641030
175
176        2. eDHL_AV_CTL_VIDEO_LETTERBOX_COLOR
177
178                Live video È­¸éÀÇ video ¿µ¿ª ÁÖº¯ÀÇ »öÀ» ¹Ù²Û´Ù. À̶§ value ´Â RGB(8:8:8bit) ÀÇ °ªÀÌ´Ù.
179                ¿¹) R(0x64), G(0x10), B(0x30) => value = 0x00641030
180
181        3. eDHL_AV_CTL_AUDIO_MIX_TYPE
182
183                Audio °¢ ¸ðµå¿¡ µû¸¥ downmix ¹× DRC ÀÇ ¼³Á¤À» ¹Ù²Þ.             
184                value : 0 (Lineout mode), 1 (RF mode)           
185
186        4. eDHL_AV_CTL_AUDIO_SPDIF_MODE
187
188                SPDIF ÀÇ Ãâ·Â ¸ðµå ¼³Á¤.
189                value :
190                        0 : SPDIF Ãâ·ÂÀÌ disable µÊ..sync ÀÚü°¡ disable(mute ¿Í´Â ´Ù¸§..)
191                        1 : digital audio ÀÇ PCM Ãâ·Â.
192                        2 : digital audio ÀÇ bitstream(compressed) Ãâ·Â.
193
194        5. eDHL_AV_CTL_AUDIO_HDMI_MODE
195
196                HDMI ¿Àµð¿À ÀÇ Ãâ·Â ¸ðµå ¼³Á¤.
197                value :
198                        0 : HDMI ¿Àµð¿À Ãâ·ÂÀÌ disable µÊ..sync ÀÚü°¡ disable(mute ¿Í´Â ´Ù¸§..)
199                        1 : digital audio ÀÇ PCM Ãâ·Â.
200                        2 : digital audio ÀÇ bitstream(compressed) Ãâ·Â.
201
202
203*/
204void AVTest_Control(int type, int value)
205{
206
207        DHL_RESULT dhr = DHL_OK;
208
209        dhr = DHL_AV_Control((tDHL_AVControlType)type, (UINT32)value);
210        if(dhr != DHL_OK)
211        {
212                DHL_OS_Printf("Error DHL_AV_Control \n");
213        }
214
215
216}
217
218/*
219        Main Chip ÀÌ Áö¿øÇÏ´Â video  ¹× Audio decoding format Á¤º¸¸¦ °¡Á®¿À´Â µ¿ÀÛ test ÇÔ¼ö.
220
221        HW ÀûÀ¸·Î º¸¿©Áö´Â ºÎºÐÀº ¾øÀ¸¸ç ½Ã¸®¾ó ·Î±× ¸Þ¼¼Áö¸¦ ÅëÇØ È®ÀÎ.
222
223        type : Á¤º¸¸¦ °¡Á®¿Ã Source type ÁöÁ¤. 1 (Video), 2 (Audio)
224        value : Áö¿øÇÏ´Â format À» bit ¿­·Î ³ª¿­ÇÑ °ª..
225
226
227*/
228void AVTest_Query(int type)
229{
230
231        DHL_RESULT dhr = DHL_OK;
232        UINT32 value;
233       
234        dhr = DHL_AV_Query((tDHL_AVQueryType)type, &value);
235        if(dhr != DHL_OK)
236        {
237                DHL_OS_Printf("Error DHL_AV_Query \n");
238        }
239        else
240        {
241                if(type == 1)
242                        DHL_OS_Printf(" Board Support info : Video, value : 0x%04x \n", value);
243                else if(type == 2)
244                        DHL_OS_Printf(" Board Support info : Audio, value : 0x%04x \n", value); 
245                       
246        }
247
248
249}
250
251
252/*
253        Sequence header Á¤º¸¿Í User data ÀÇ callback µ¿ÀÛÀ» Test ÇÏ´Â ÇÔ¼ö
254
255        Á¤»ó µ¿À۽à µî·ÏµÈ Callback ÇÔ¼ö°¡ È£ÃâµÈ´Ù.
256
257        cb_type : 0(Sequence header Á¤º¸)
258                      1(User data)
259
260
261*/
262void AVTest_Callback(int cb_type)
263{
264
265        DHL_RESULT dhr = DHL_OK;
266
267        dhr = DHL_AV_SetCallback((tDHL_AVCallbackType)cb_type, callback_func);
268       
269        if(dhr != DHL_OK)
270        {
271                DHL_OS_Printf("Error DHL_AV_SetCallback \n");
272        }
273
274}
275
276
277
278#if COMMENT
279____Video_Test___(){}
280#endif
281
282/*
283
284        Video hidden µ¿ÀÛ test ÇÔ¼ö
285
286        Á¤»ó µ¿ÀÛ ¼öÇà½Ã video plane ÀÌ »ç¶óÁø´Ù.
287        audio ¹× OSD ´Â Á¤»óÀûÀ¸·Î ³ª¿Í¾ß ÇÔ.
288
289        ishide : 1(hidden), 0(visible)
290
291       
292*/
293void AVTest_Vhide(tDHL_VDID id, int ishide)
294{
295
296
297        DHL_RESULT dhr = DHL_OK;
298        BOOL bHide;
299
300        if(ishide == 0)
301                bHide = 0;
302        else
303                bHide = 1; // hidden
304
305        dhr = DHL_AV_VideoHide(id, bHide);
306        if(dhr != DHL_OK)
307        {
308                DHL_OS_Printf("Error DHL_AV_VideoHide \n");
309        }
310
311}
312
313/*
314
315        Video freeze µ¿ÀÛ test ÇÔ¼ö
316
317        Á¤»ó µ¿ÀÛ ¼öÇà½Ã video È­¸éÀÌ ¸ØÃ߸ç Á¤Áö ¿µ»óÀ¸·Î Ãâ·ÂµÈ´Ù.
318        video start ÈÄ¿¡ ¼öÇà µÇ¾ß ÇÔ.
319
320        isfreeze : 1(freeze), 0(play)
321
322       
323*/
324void AVTest_Vfreeze(tDHL_VDID id, int isfreeze)
325{
326
327        DHL_RESULT dhr = DHL_OK;
328        BOOL bFreeze;
329
330        if(isfreeze == 0)
331                bFreeze = 0;
332        else
333                bFreeze = 1;
334
335        dhr = DHL_AV_VideoFreeze(id, bFreeze);
336        if(dhr != DHL_OK)
337        {
338                DHL_OS_Printf("Error DHL_AV_VideoFreeze \n");
339        }
340
341}
342
343/*
344        Live video È­¸éÀÇ Å©±â ¹× À§Ä¡ º¯°æ µ¿ÀÛ test ÇÔ¼ö
345
346        Á¤»óµ¿ÀÛ ¼öÇà½Ã ¿øÇÏ´Â À§Ä¡¿Í Å©±â·Î Live video È­¸éÀÌ º¯°æµÊ.
347        HD window ¿¡ ´ëÇØ¼­¸¸ Áö¿ø ?
348
349        x : x ÁÂÇ¥
350        y : y ÁÂÇ¥
351        w : È­¸éÀÇ ³ÐÀÌ
352        h : È­¸éÀÇ ³ôÀÌ
353
354*/
355void AVTest_Vresize(tDHL_VDID id, int x, int y, int w, int h)
356{
357
358        DHL_RESULT dhr = DHL_OK;
359
360        dhr = DHL_AV_VideoResize(id, x, y, w, h);
361        if(dhr != DHL_OK)
362        {
363                DHL_OS_Printf("Error DHL_AV_VideoResize \n");
364        }
365}
366
367/*
368        Live video È­¸éÀÇ ARC ¸ðµå µ¿ÀÛ Test ÇÔ¼ö
369
370        Á¤»ó µ¿ÀÛ ¼öÇà½Ã °¢ ARC ¸ðµå¿¡ ¸Â°Ô Live video È­¸éÀÌ º¯ÇÔ.
371
372        HD ±Þ Ãâ·Â Àû¿ë
373        SD ±Þ Ãâ·Â(composite)Àº Platform ¸¶´Ù ´Ù¸§. NEC ÀÇ °æ¿ì¿£ ±¸Á¶»ó ºÒ°¡´É.
374
375        Video start ÀÌÀü¿¡µµ ¼³Á¤°¡´ÉÇØ¾ß ÇÔ.
376
377        adj_hd : component, HDMI µîÀÇ HD±Þ Ãâ·Â¿¡ ´ëÇÑ ¸ðµå¼³Á¤.
378        adj_sd : composite µîÀÇ SD±Þ Ãâ·Â¿¡ ´ëÇÑ ¸ðµå ¼³Á¤.     
379
380*/
381void AVTest_Varc(int adj_hd, int adj_sd)
382{
383
384        DHL_RESULT dhr = DHL_OK;
385
386        dhr = DHL_AV_VideoSetARC((tDHL_DispARC)adj_hd, (tDHL_DispARC)adj_sd);
387        if(dhr != DHL_OK)
388        {
389                DHL_OS_Printf("Error DHL_AV_VideoSetARC \n");
390        }
391
392}
393
394/*
395        °¢ Æ÷Æ®¿¡ ´ëÇÑ display format ¹× color space º¯°æ µ¿ÀÛ Test ÇÔ¼ö
396
397        Á¤»ó µ¿ÀÛ ¼öÇà½Ã ÇØ»óµµ°¡ º¯°æµÈ´Ù.
398
399        ½ÇÁ¦ º¯°æµÉ ¼ö ÀÖ´Â°Ç HD ±Þ Ãâ·Â(component, hdmiµî)¿¡ ´ëÇØ¼­ À̸ç HD Ãâ·Â¿¡ ´ëÇØ¼­µµ
400        port ¸¶´Ù ¼­·Î ´Ù¸£°Ô format À» º¯°æÇÒ ¼ø ¾øÀ¸¸ç ¶È°°ÀÌ ¹Ý¿µµÈ´Ù.
401
402        format º¯°æ½Ã¿¡ ¹Ýµå½Ã ¸ðµç Ãâ·ÂÀ» disable ÇÑÈÄ º¯°æ ¼öÇà..(µå¶óÀ̹ö ¸¶´Ù ´Ù¸§.)
403
404        port : display Ãâ·Â ¼±ÅÃ(compont, hdmi, composite µîµî)
405        format : display format (ÇØ»óµµ)
406        color : Ãâ·Â½Ã display color space
407
408*/
409void AVTest_Vdispfmt(int port, int format, int color)
410{
411
412        DHL_RESULT dhr = DHL_OK;
413               
414        dhr = DHL_AV_DispSetFormat((tDHL_DispPort)port, (tDHL_DispFormat)format, (tDHL_DispColorSpace)color);
415        if(dhr != DHL_OK)
416        {
417                DHL_OS_Printf("Error DHL_AV_DispSetFormat \n");
418        }
419
420}
421
422/*
423        Video sequence header Á¤º¸¸¦ Àоî¿À´Â µ¿ÀÛ  test ÇÔ¼ö
424
425        HW ÀûÀ¸·Î º¸¿©Áö´Â ºÎºÐÀº ¾øÀ¸¸ç ½Ã¸®¾ó ·Î±× ¸Þ¼¼Áö¸¦ ÅëÇØ È®ÀÎ.
426
427        Video start ÈÄ¿¡ ¼öÇàµÇ¾ß ÇÔ.
428        Video start ÀÌÀüÀÌ¸é ¿¡·¯¸¦ ¹Ýȯ.
429       
430*/
431void AVTest_Vseqinfo(tDHL_VDID id)
432{
433
434        DHL_RESULT dhr = DHL_OK;
435
436        tDHL_VideoSeqHdr pSeq;
437       
438        dhr = DHL_AV_VideoSeqInfo(id, &pSeq);
439        if(dhr != DHL_OK)
440        {
441                DHL_OS_Printf("Error DHL_AV_VideoSeqInfo \n");
442        }
443        else
444        {
445                DHL_OS_Printf("-- Video Sequence Header info -- \n");
446                DHL_OS_Printf("aspect_ratio_information : %d \n", pSeq.aspect_ratio_information);
447                DHL_OS_Printf("frame_rate_code : %d \n", pSeq.frame_rate_code);
448                DHL_OS_Printf("horizontal_size : %d \n", pSeq.horizontal_size);
449                DHL_OS_Printf("vertical_size : %d \n", pSeq.vertical_size);
450                DHL_OS_Printf("progressive_sequence : %d \n", pSeq.progressive_sequence);
451        }
452
453}
454
455/*
456        Video µ¿ÀÛ »óÅ Á¤º¸¸¦ Àоî¿À´Â µ¿ÀÛ test ÇÔ¼ö
457
458        HW ÀûÀ¸·Î º¸¿©Áö´Â ºÎºÐÀº ¾øÀ¸¸ç ½Ã¸®¾ó ·Î±× ¸Þ¼¼Áö¸¦ ÅëÇØ È®ÀÎ.
459
460        Video Start ¿Í »ó°ü¾øÀÌ »óŸ¦ ¹ÝÈ¯ÇØ¾ßÇÔ.
461
462*/
463void AVTest_Vgetinfo(tDHL_VDID id)
464{
465
466        DHL_RESULT dhr = DHL_OK;
467
468        tDHL_VideoStatus pStatus;
469       
470        dhr = DHL_AV_VideoGetStatus(id, &pStatus);
471        if(dhr != DHL_OK)
472        {
473                DHL_OS_Printf("Error DHL_AV_VideoGetStatus \n");
474        }
475        else
476        {
477                DHL_OS_Printf("--- Video get status --- \n");
478                DHL_OS_Printf("bDecoding : %d \n", pStatus.bDecoding);
479                DHL_OS_Printf("bOutputExist : %d \n", pStatus.bOutputExist);
480                DHL_OS_Printf("bScrambleDetected : %d \n", pStatus.bScrambleDetected);
481                DHL_OS_Printf("type : %d \n", pStatus.type);
482                DHL_OS_Printf("bHdmiConnected : %d \n", pStatus.bHdmiConnected);
483                DHL_OS_Printf("curDisplayFormat : %d \n", pStatus.curDisplayFormat);
484
485
486        }       
487}
488
489
490#if COMMENT
491____Audio_Test___(){}
492#endif
493
494/*
495        Audio mute µ¿ÀÛ test ÇÔ¼ö
496
497        Á¤»ó µ¿ÀÛ ¼öÇà½Ã ÇØ´ç port ÀÇ ¿Àµð¿À Ãâ·ÂÀÌ mute µÈ´Ù.
498
499        ismute : 1(mute), 0(output)
500
501*/
502void AVTest_Amute(int port, int ismute)
503{
504
505        DHL_RESULT dhr = DHL_OK;
506
507        BOOL bMute;
508
509        if(ismute == 0)
510                bMute = 0;
511        else
512                bMute = 1;
513
514        dhr = DHL_AV_AudioMuteControl((tDHL_AudioMutePlace)port, bMute);
515        if(dhr != DHL_OK)
516        {
517                DHL_OS_Printf("Error DHL_AV_AudioMuteControl \n");
518        }
519
520
521}
522
523/*
524        Audio volume range ¼³Á¤ ¹× volume Á¶Àý µ¿ÀÛ test ÇÔ¼ö.
525
526        Á¤»ó µ¿ÀÛ ¼öÇà½Ã ¼Ò¸® Å©±â°¡ °¡º¯ µÈ´Ù.
527
528        min : User °¡ ¼³Á¤ÇÏ´Â volume Å©±âÀÇ ÃÖ¼Ò °ª.
529        max : User °¡ ¼³Á¤ÇÏ´Â volume Å©±âÀÇ ÃÖ´ë °ª.
530        vol : volume °ª.
531
532        º¼·ý ¹üÀ§´Â min °ªÀÌ max º¸´Ù °°°Å³ª Ä¿¼­´Â ¾ÈµÊ.
533        º¼·ý°ªÀº ²À º¼·ý range ¾È¿¡ µé¾î°¡¾ßµÊ.
534
535*/
536void AVTest_Avolset(int min, int max, int vol)
537{
538
539        DHL_RESULT dhr = DHL_OK;
540
541        if(min >= max)
542        {
543                DHL_OS_Printf("Error User volume range value (min >= max)");
544                return;
545        }
546               
547        if((vol < min) || (vol > max))
548        {
549                DHL_OS_Printf("Error User volume value out of range");
550                return;
551        }
552
553        dhr = DHL_AV_AudioSetUserVolumeRange((UINT32)min, (UINT32)max); 
554        if(dhr != DHL_OK)
555        {               
556                DHL_OS_Printf("Error DHL_AV_AudioSetUserVolumeRange \n");
557        }
558
559        dhr = DHL_AV_AudioSetVolume((UINT16)vol);
560        if(dhr != DHL_OK)
561        {
562                DHL_OS_Printf("Error DHL_AV_AudioSetVolume \n");
563        }
564       
565
566}
567
568
569/*
570        Audio µ¿ÀÛ »óÅ Á¤º¸¸¦ Àоî¿À´Â µ¿ÀÛ test ÇÔ¼ö
571
572        HW ÀûÀ¸·Î º¸¿©Áö´Â ºÎºÐÀº ¾øÀ¸¸ç ½Ã¸®¾ó ·Î±× ¸Þ¼¼Áö¸¦ ÅëÇØ È®ÀÎ.
573
574*/
575void AVTest_Agetinfo(void)
576{
577
578
579        DHL_RESULT dhr = DHL_OK;
580
581        tDHL_AudioStatus pStatus;
582
583        dhr = DHL_AV_AudioGetStatus(&pStatus);
584        if(dhr != DHL_OK)
585        {
586                DHL_OS_Printf("Error DHL_AV_AudioGetStatus \n");
587        }
588        else
589        {
590
591                DHL_OS_Printf("---Audio get status--- \n");
592                DHL_OS_Printf("bDecoding : %d \n", pStatus.bDecoding);
593                DHL_OS_Printf("bOutputExist : %d \n", pStatus.bOutputExist);
594                DHL_OS_Printf("bStereo : %d \n", pStatus.bStereo);
595                DHL_OS_Printf("bSurround : %d \n", pStatus.bSurround);
596                DHL_OS_Printf("type : %d \n", pStatus.type);
597
598
599        }
600       
601
602}
603
604
605#if COMMENT
606____Capture_Test___(){}
607#endif
608
609/*
610        Capture video start test
611
612        id : capture input id
613
614        °á°ú
615                capture input À¸·Î µé¾î¿À´Â video °¡ Ãâ·ÂµÊ.
616       
617*/
618void AVTest_Cap_Vstart(int id)
619{
620        DHL_RESULT dhr = DHL_OK;
621
622        dhr = DHL_CAP_VideoStart((tDHL_VCAPID)id);
623
624        if(dhr != DHL_OK)
625        {
626                DHL_OS_Printf("Error DHL_CAP_VideoStart \n");
627        }       
628}
629
630/*
631        Capture video stop test
632
633        id : capture input id
634
635        °á°ú
636                capture input À¸·Î µé¾î¿À´Â video °¡ stop µÊ.
637
638*/
639void AVTest_Cap_Vstop(int id)
640{
641        DHL_RESULT dhr = DHL_OK;
642
643        dhr = DHL_CAP_VideoStop((tDHL_VCAPID)id);
644
645        if(dhr != DHL_OK)
646        {
647                DHL_OS_Printf("Error DHL_CAP_VideoStop \n");
648        }       
649}
650
651/*
652        Capture video hide test
653
654        id : capture input id
655        ishid : true->hidden, false->visible
656
657        °á°ú
658                hidden À» ÇÒ°æ¿ì capture video plane ¸¸ ¾Èº¸ÀÓ..OSD µîÀº Á¤»ó Ãâ·ÂµÇ¾ß ÇÔ.
659
660*/
661void AVTest_Cap_Vhide(int id, int ishide)
662{
663#if 0
664        DHL_RESULT dhr = DHL_OK;
665
666        BOOL bHide;
667
668        if(ishide == 0)
669                bHide = 0;
670        else
671                bHide = 1; // hidden           
672
673        dhr = DHL_CAP_VideoHide((tDHL_VCAPID)id, bHide);
674
675        if(dhr != DHL_OK)
676        {
677                DHL_OS_Printf("Error DHL_CAP_VideoHide \n");
678        }       
679#endif
680}
681
682/*
683        Capture video freeze test
684
685        id : capture input id
686        isfreeze : true->freeze, false->play
687
688        °á°ú
689                freeze ¸¦ ¼öÇàÇÒ °æ¿ì capture video °¡ ¼ø°£ Á¤ÁöµÊ..Á¤ÁöµÈ È­¸éÀº ±×´ë·Î Ãâ·Â.
690
691*/
692void AVTest_Cap_Vfreeze(int id, int isfreeze)
693{
694#if 0
695        DHL_RESULT dhr = DHL_OK;
696        BOOL bFreeze;
697
698        if(isfreeze == 0)
699                bFreeze = 0;
700        else
701                bFreeze = 1;
702
703        dhr = DHL_CAP_VideoFreeze((tDHL_VCAPID)id, bFreeze);
704        if(dhr != DHL_OK)
705        {
706                DHL_OS_Printf("Error DHL_CAP_VideoFreeze \n");
707        }
708#endif
709}
710
711/*
712        Capture video plane size º¯°æ test
713
714        id : capture input id
715        x, y : ÁÂÇ¥
716        w, h: ³ÐÀÌ¿Í ³ôÀÌ
717
718        °á°ú
719                ÁöÁ¤ÇÑ ÁÂÇ¥¿Í »çÀÌÁî·Î capture video plane ÀÌ Á¶Á¤µÊ.
720
721*/
722void AVTest_Cap_Vresize(int id, int x, int y, int w, int h)
723{
724#if 0
725        DHL_RESULT dhr = DHL_OK;
726
727        dhr = DHL_CAP_VideoResize((tDHL_VCAPID)id, x, y, w, h);
728        if(dhr != DHL_OK)
729        {
730                DHL_OS_Printf("Error DHL_CAP_VideoResize \n");
731        }
732#endif
733}
734
735/*
736        Capture audio start test       
737
738        °á°ú
739                Capture audio °¡ start µÇ¾î Ãâ·ÂµÊ.
740
741*/
742void AVTest_Cap_Astart(void)
743{
744        DHL_RESULT dhr = DHL_OK;
745
746        dhr = DHL_CAP_AudioStart();
747
748        if(dhr != DHL_OK)
749        {
750                DHL_OS_Printf("Error DHL_CAP_AudioStart \n");
751        }
752}
753
754/*
755        Capture audio stop test
756
757        °á°ú
758                Capture audio °¡ stop µÊ.
759
760*/
761void AVTest_Cap_Astop(void)
762{
763        DHL_RESULT dhr = DHL_OK;
764
765        dhr = DHL_CAP_AudioStop();
766
767        if(dhr != DHL_OK)
768        {
769                DHL_OS_Printf("Error DHL_CAP_AudioStop \n");
770        }       
771}
772
773/*
774        Capture video/Audio ÅëÇÕ Start API
775
776        °á°ú
777                 Capture channel 0 ÀÇ video/audio °¡ start µÊ.
778*/
779void AVTest_Cap_Start(int id)
780{
781        DHL_RESULT dhr = DHL_OK;
782
783        dhr = DHL_CAP_VideoStart((tDHL_VCAPID)id);
784
785        if(dhr != DHL_OK)
786        {
787                DHL_OS_Printf("Error DHL_CAP_VideoStart \n");
788        }       
789
790        dhr = DHL_CAP_AudioStart();
791
792        if(dhr != DHL_OK)
793        {
794                DHL_OS_Printf("Error DHL_CAP_AudioStart \n");
795        }
796}
797
798/*
799        Capture video/Audio ÅëÇÕ Stop API
800
801        °á°ú
802                 Capture channel 0 ÀÇ video/audio °¡ stop µÊ
803*/
804void AVTest_Cap_Stop(int id)
805{
806        DHL_RESULT dhr = DHL_OK;
807
808        dhr = DHL_CAP_VideoStop((tDHL_VCAPID)id);
809
810        if(dhr != DHL_OK)
811        {
812                DHL_OS_Printf("Error DHL_CAP_VideoStop \n");
813        }
814
815        dhr = DHL_CAP_AudioStop();
816
817        if(dhr != DHL_OK)
818        {
819                DHL_OS_Printf("Error DHL_CAP_AudioStop \n");
820        }       
821}
822
823
824#include "DHL_DBG.h"
825
826static DHL_SymbolTable AVCapTestSymbols[] =
827{
828        //---- functions
829       
830        DHL_FNC_SYM_ENTRY(AVTest_Start),
831        DHL_FNC_SYM_ENTRY(AVTest_Stop),
832        DHL_FNC_SYM_ENTRY(AVTest_Terminate),
833        DHL_FNC_SYM_ENTRY(AVTest_Control),
834        DHL_FNC_SYM_ENTRY(AVTest_Query),
835        DHL_FNC_SYM_ENTRY(AVTest_Vhide),
836        DHL_FNC_SYM_ENTRY(AVTest_Vfreeze),
837       
838        DHL_FNC_SYM_ENTRY(AVTest_Vresize),
839        DHL_FNC_SYM_ENTRY(AVTest_Varc),
840        DHL_FNC_SYM_ENTRY(AVTest_Vdispfmt),
841        DHL_FNC_SYM_ENTRY(AVTest_Vseqinfo),
842        DHL_FNC_SYM_ENTRY(AVTest_Vgetinfo)
843};
844
845void AVCAPTestInit()
846{
847        DHL_DBG_RegisterSymbols(AVCapTestSymbols, DHL_NUMSYMBOLS(AVCapTestSymbols));
848
849
850}
851
852
Note: See TracBrowser for help on using the repository browser.