mvpstb_api.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <string.h>
#include "mvpstb_mod.h"

Go to the source code of this file.

Functions

static int mvpstb_open (void)
int kern_read (unsigned long memaddr, void *buffaddr, unsigned int size)
 Read kernel data.
int kern_write (unsigned long memaddr, void *buffaddr, unsigned int size)
 Write kernel data.
int dcr_read (unsigned long regaddr, unsigned int *data)
 Read a DCR register.
int dcr_write (unsigned long regaddr, unsigned int data)
 Write a DCR register.
int mvpstb_set_lbox_offset (unsigned int offset)
 Set the offset for letterboxed output.
int mvpstb_get_lbox_offset (unsigned int *offset)
 Get the offset for letterboxed output.
int mvpmod_start_audit (unsigned long interval_ms)
 Start audio/video auditing.
int mvpmod_stop_audit (void)
 Stop audio/video auditing.
int mvpstb_get_vid_stc (unsigned long long *vstc)
 Get video system time code.
int mvpstb_get_vid_pts (unsigned long long *vpts)
 Get video presentation time stamp.
int mvpstb_get_aud_stc (unsigned long long *astc)
 Get audio system time code.
int mvpstb_get_aud_pts (unsigned long long *apts)
 Get audio presentation time stamp.
int mvpstb_set_video_sync (int on)
 Enable or disable video sync.
int mvpstb_set_audio_sync (int on)
 Enable or disable audio sync.
int mvpstb_audio_end (void)
 Determine if the end of audio hardware buffer has been reached.
int mvpstb_video_end (void)
 Determine if the end of video hardware buffer has been reached.

Variables

static int mvpstb_fd = -1


Function Documentation

int dcr_read unsigned long  regaddr,
unsigned int *  data
 

Read a DCR register.

Parameters:
regaddr register address
[out] data address to store data
Return values:
0 success
<0 error

Definition at line 91 of file mvpstb_api.c.

References mvpmod_iocrw::buff, mvpmod_iocrw::memaddr, MVPMOD_READ_DCR, mvpstb_fd, mvpstb_open(), and mvpmod_iocrw::res.

int dcr_write unsigned long  regaddr,
unsigned int  data
 

Write a DCR register.

Parameters:
regaddr register address
data data to be written
Return values:
0 success
<0 error

Definition at line 110 of file mvpstb_api.c.

References mvpmod_iocrw::dint, mvpmod_iocrw::memaddr, MVPMOD_WRITE_DCR, mvpstb_fd, mvpstb_open(), and mvpmod_iocrw::res.

int kern_read unsigned long  memaddr,
void *  buffaddr,
unsigned int  size
 

Read kernel data.

Parameters:
memaddr kernel memory address
[out] buffaddr address to store data
size size of buffaddr
Return values:
0 success
<0 error

Definition at line 51 of file mvpstb_api.c.

References mvpmod_iocrw::buff, mvpmod_iocrw::memaddr, MVPMOD_READL, mvpstb_fd, mvpstb_open(), and mvpmod_iocrw::res.

int kern_write unsigned long  memaddr,
void *  buffaddr,
unsigned int  size
 

Write kernel data.

Parameters:
memaddr kernel memory address
buffaddr data to be written
size size of buffaddr
Return values:
0 success
<0 error

Definition at line 71 of file mvpstb_api.c.

References mvpmod_iocrw::buff, mvpmod_iocrw::memaddr, MVPMOD_WRITEL, mvpstb_fd, mvpstb_open(), and mvpmod_iocrw::res.

int mvpmod_start_audit unsigned long  interval_ms  ) 
 

Start audio/video auditing.

Parameters:
interval_ms audit interval in milliseconds
Return values:
0 success
<0 error

Definition at line 145 of file mvpstb_api.c.

References mvpmod_iocrw::info, MVPMOD_START_AUDIT, mvpstb_fd, and mvpstb_open().

int mvpmod_stop_audit void   ) 
 

Stop audio/video auditing.

Return values:
0 success
<0 error

Definition at line 163 of file mvpstb_api.c.

References MVPMOD_STOP_AUDIT, mvpstb_fd, and mvpstb_open().

int mvpstb_audio_end void   ) 
 

Determine if the end of audio hardware buffer has been reached.

Return values:
0 not empty
1 empty
-1 error

Definition at line 281 of file mvpstb_api.c.

References AUDIO_DSP_STATUS, and dcr_read().

Referenced by av_empty(), and sync_ac3_audio().

int mvpstb_get_aud_pts unsigned long long *  apts  ) 
 

Get audio presentation time stamp.

Parameters:
[out] apts output buffer
Return values:
0 success
<0 error

Definition at line 232 of file mvpstb_api.c.

References mvpmod_iocrw::buff, mvpmod_iocrw::info, MVPMOD_GET_TS, mvpstb_fd, mvpstb_open(), mvpmod_iocrw::res, and TS_AUDIO_PTS.

int mvpstb_get_aud_stc unsigned long long *  astc  ) 
 

Get audio system time code.

Parameters:
[out] astc output buffer
Return values:
0 success
<0 error

Definition at line 214 of file mvpstb_api.c.

References mvpmod_iocrw::buff, mvpmod_iocrw::info, MVPMOD_GET_TS, mvpstb_fd, mvpstb_open(), mvpmod_iocrw::res, and TS_AUDIO_STC.

int mvpstb_get_lbox_offset unsigned int *  offset  ) 
 

Get the offset for letterboxed output.

Parameters:
[out] offset offset in lines per field
Return values:
0 success
<0 error

Definition at line 135 of file mvpstb_api.c.

References dcr_read(), and VIDEO_LETTERBOX_OFFSET.

int mvpstb_get_vid_pts unsigned long long *  vpts  ) 
 

Get video presentation time stamp.

Parameters:
[out] vpts output buffer
Return values:
0 success
<0 error

Definition at line 196 of file mvpstb_api.c.

References mvpmod_iocrw::buff, mvpmod_iocrw::info, MVPMOD_GET_TS, mvpstb_fd, mvpstb_open(), mvpmod_iocrw::res, and TS_VIDEO_PTS.

int mvpstb_get_vid_stc unsigned long long *  vstc  ) 
 

Get video system time code.

Parameters:
[out] vstc output buffer
Return values:
0 success
<0 error

Definition at line 179 of file mvpstb_api.c.

References mvpmod_iocrw::buff, mvpmod_iocrw::info, MVPMOD_GET_TS, mvpstb_fd, mvpstb_open(), mvpmod_iocrw::res, and TS_VIDEO_STC.

static int mvpstb_open void   )  [inline, static]
 

Definition at line 36 of file mvpstb_api.c.

References mvpstb_fd.

Referenced by dcr_read(), dcr_write(), kern_read(), kern_write(), mvpmod_start_audit(), mvpmod_stop_audit(), mvpstb_get_aud_pts(), mvpstb_get_aud_stc(), mvpstb_get_vid_pts(), mvpstb_get_vid_stc(), mvpstb_set_audio_sync(), and mvpstb_set_video_sync().

int mvpstb_set_audio_sync int  on  ) 
 

Enable or disable audio sync.

Parameters:
on 1 to enable, 0 to disable
Return values:
0 success
<0 error

Definition at line 268 of file mvpstb_api.c.

References mvpmod_iocrw::info, MVPMOD_AUDIO, MVPMOD_SET_SYNC, mvpstb_fd, and mvpstb_open().

int mvpstb_set_lbox_offset unsigned int  offset  ) 
 

Set the offset for letterboxed output.

Parameters:
offset offset in lines per field
Return values:
0 success
<0 error

Definition at line 130 of file mvpstb_api.c.

References dcr_write(), and VIDEO_LETTERBOX_OFFSET.

Referenced by av_init_letterbox().

int mvpstb_set_video_sync int  on  ) 
 

Enable or disable video sync.

Parameters:
on 1 to enable, 0 to disable
Return values:
0 success
<0 error

Definition at line 250 of file mvpstb_api.c.

References mvpmod_iocrw::info, MVPMOD_SET_SYNC, MVPMOD_VIDEO, mvpstb_fd, and mvpstb_open().

int mvpstb_video_end void   ) 
 

Determine if the end of video hardware buffer has been reached.

Return values:
0 not empty
1 empty
-1 error

Definition at line 294 of file mvpstb_api.c.

References dcr_read(), and VIDEO_CLIP_WLR.

Referenced by av_empty().


Variable Documentation

int mvpstb_fd = -1 [static]
 

Definition at line 29 of file mvpstb_api.c.

Referenced by dcr_read(), dcr_write(), kern_read(), kern_write(), mvpmod_start_audit(), mvpmod_stop_audit(), mvpstb_get_aud_pts(), mvpstb_get_aud_stc(), mvpstb_get_vid_pts(), mvpstb_get_vid_stc(), mvpstb_open(), mvpstb_set_audio_sync(), and mvpstb_set_video_sync().


Generated on Fri Sep 10 03:13:21 2010 for mvpmc by  doxygen 1.4.6