#define VID_BIT (1 << 31)
#define VERSION 4201
-/*
+#ifdef MP4_RECORD
struct file_header {
int32_t version;
char video_codec_name[32];
int fd;
int up;
};
-*/
+#endif
struct AVParams {
switch_core_session_t * session;
static void *SWITCH_THREAD_FUNC record_video_thread(switch_thread_t *thread, void *obj)
{
-/*
+#ifdef MP4_RECORD
record_helper *eh = reinterpret_cast<record_helper *>(obj);
switch_core_session_t *session = eh->session;
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_core_session_write_video_frame(session, read_frame, SWITCH_IO_FLAG_NONE, 0);
}
eh->up = 0;
-*/
+#endif
return NULL;
}
SWITCH_STANDARD_APP(record_mp4_function)
{
-/*
+#ifdef MP4_RECORD
switch_status_t status;
switch_frame_t *read_frame;
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Error opening file %s\n", (char *) data);
return;
}
-**
+*/
MP4::Context ctx(reinterpret_cast<char*>(data), true);
switch_core_session_set_read_codec(session, NULL);
switch_core_codec_destroy(&codec);
-*/
+#endif
}
static void *SWITCH_THREAD_FUNC play_video_function(switch_thread_t *thread, void *obj)