This function is deprecated.
int sm_avfrec_start(struct sm_avfrec_start_parms *avfsp)
typedef struct sm_avfrec_start_parms { tSMAVFrecId avfrec; /* in */ enum kSMAVFInputType { kSMAVFInputAVFVideo, kSMAVFInputAVFAudio, kSMAVFInputLinearAudio, } src_type; /* in */ union { struct { tSM_INT payload_type; /* in */ enum kSMAudioDataFormat dest_type; /* in */ union { struct { tSM_INT bitrate; /* in */ tSM_INT vad_enable; /* in */ } amrnb; /* in */ } u_dest_type; /* in */ } audio; /* in */ } u_src_type; /* in */ tSM_INT hbuf_size; /* in */ tSM_INT test_mode; /* in */ } SM_AVFREC_START_PARMS;
Starts the necessary tasks on the module for record of AVF-encapsulated video or audio.
If src_type is set to kSMAVFInputAVFVideo once the AVF recorder has been started, it will not emit any AVF frames to the host until it has received an AVF frame containing a video I-Frame. This helps to ensure that when the resulting video is rendered - e.g. by a 3GP file player - the video starts cleanly. When recording both audio and video, sm_avfrec_sync() can be used to help achieve lipsync even when the video AVF stream to the host starts some time after the audio AVF stream.
Note that, unlike most tasks, an AVF recorder can input different types of data - e.g. AVF AMR-NB audio stream, AVF H.263 video stream, etc. - dependant on how it is started. It is the application writer's responsibility to ensure that the task (e.g. VMP[rx]) to which the AVF rec's datafeed is connected is able to generate this data.
Note: The unions in in the above struct are used to allow future expansion.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody Audio Video Format (AVF) API.