Data exchange structure for modules |
Data exchange structures |
|
int flag; // specifies context: TC_VIDEO for video TC_AUDIO for audio // or passes an integer to the module |
|
int flag; /* specifies context: TC_VIDEO for video * TC_AUDIO for audio * * or passes an integer to the module */ FILE *fd; /* file handle for input stream * NULL if import module performs reading * unused in export module */ |
|
FILE *fd; // file handle for input stream // NULL if import module performs reading // unused in export module |
|
int size; /* total amount of bytes in the buffer */ |
|
int size; // total amount of bytes in the buffer char *buffer; // pointer to data array with frame data |
|
char *buffer; /* pointer to data array with frame data */ |
Input parameter* option contains the requested action id * para1/2 its actually meaning depends on option |
|
tc_export * Parameters int option, void *para1, void *para2 ** option : contains the requested action id ** *para1/2 : its actually meaning depends on option |
Requested method |
Requested method |
[1]* option=TC_EXPORT_NAME * para1=_transfer_t * para2=NULL ; Requested action : Print out some general modules infos to stderr :: and inherit transcode verbosity flag :: (optional return capability flag) ; Status : Optional [2]* option=TC_EXPORT_INIT * para1=_transfer_t * para2=_vob_t |
[1] option=TC_EXPORT_NAMEpara1=_transfer_t para2=NULL ; Requested action : Print out some general modules infos to stderr and inherit transcode verbosity flag (optional return capability flag) ; Status : Optional [2] option=TC_EXPORT_INITpara1=_transfer_t para2=_vob_t |
|
; Status : Required |
|
; Status : Required |
[3]* option=TC_EXPORT_OPEN * para1=_transfer_t * para2=_vob_t |
[3] option=TC_EXPORT_OPENpara1=_transfer_t para2=_vob_t |
|
; Status : Required |
|
; Status : Required |
[4]* option=TC_EXPORT_ENCODE * para1=_transfer_t * para2=NULL |
[4] option=TC_EXPORT_ENCODEpara1=_transfer_t para2=NULL |
|
; Status : Required |
|
; Status : Required |
[5]* option:TC_EXPORT_CLOSE * para1=_transfer_t * para2=NULL |
[5] option:TC_EXPORT_CLOSEpara1=_transfer_t para2=NULL |
|
; Status : Required |
|
; Status : Required |
[6]* option=TC_EXPORT_STOP * para1=_transfer_t * para2=NULL |
[6] option=TC_EXPORT_STOPpara1=_transfer_t para2=NULL |
|
; Status : Required |
; Status : Required Exit codesThe following are all handled by transcode, and should be used when returning from the above core function. TC_EXPORT_UNKNOWN option not supported TC_EXPORT_OK no error, hopefully the default TC_EXPORT_ERROR a critical error occured |
Some very short documentation on writing export modules for transcode
#include "transcode.h" //definition of vob_t and transfer_t structure
typedef struct _vob_t {
//see transcode.h for details
} vob_t;
typedef struct _transfer_t {
int flag; /* specifies context: TC_VIDEO for video
* TC_AUDIO for audio
*
* or passes an integer to the module
*/
FILE *fd; /* file handle for input stream
* NULL if import module performs reading
* unused in export module
*/
int size; /* total amount of bytes in the buffer */
char *buffer; /* pointer to data array with frame data */
} transfer_t;
tc_export
para1=_transfer_t para2=NULL
para1=_transfer_t para2=_vob_t
para1=_transfer_t para2=_vob_t
para1=_transfer_t para2=NULL
para1=_transfer_t para2=NULL
para1=_transfer_t para2=NULL
TC_EXPORT_UNKNOWNoption not supported
TC_EXPORT_OKno error, hopefully the default
TC_EXPORT_ERRORa critical error occured