summaryrefslogtreecommitdiffstats
path: root/tinyDAV/include/tinydav/video
diff options
context:
space:
mode:
Diffstat (limited to 'tinyDAV/include/tinydav/video')
-rw-r--r--tinyDAV/include/tinydav/video/directx/tdav_producer_screencast_d3d9.h36
-rw-r--r--tinyDAV/include/tinydav/video/directx/tdav_producer_screencast_ddraw.h37
-rw-r--r--tinyDAV/include/tinydav/video/gdi/tdav_consumer_video_gdi.h35
-rw-r--r--tinyDAV/include/tinydav/video/gdi/tdav_producer_screencast_gdi.h35
-rw-r--r--tinyDAV/include/tinydav/video/jb/tdav_video_frame.h68
-rw-r--r--tinyDAV/include/tinydav/video/jb/tdav_video_jb.h88
-rw-r--r--tinyDAV/include/tinydav/video/mf/tdav_consumer_video_mf.h39
-rw-r--r--tinyDAV/include/tinydav/video/mf/tdav_producer_video_mf.h39
-rw-r--r--tinyDAV/include/tinydav/video/tdav_consumer_video.h71
-rw-r--r--tinyDAV/include/tinydav/video/tdav_converter_video.h47
-rw-r--r--tinyDAV/include/tinydav/video/tdav_runnable_video.h54
-rw-r--r--tinyDAV/include/tinydav/video/tdav_session_video.h130
-rw-r--r--tinyDAV/include/tinydav/video/v4linux/tdav_producer_video_v4l2.h37
-rw-r--r--tinyDAV/include/tinydav/video/winm/tdav_consumer_winm.h39
-rw-r--r--tinyDAV/include/tinydav/video/winm/tdav_producer_winm.h39
15 files changed, 794 insertions, 0 deletions
diff --git a/tinyDAV/include/tinydav/video/directx/tdav_producer_screencast_d3d9.h b/tinyDAV/include/tinydav/video/directx/tdav_producer_screencast_d3d9.h
new file mode 100644
index 0000000..5c134d0
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/directx/tdav_producer_screencast_d3d9.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 2015 Mamadou DIOP.
+* Copyright (C) 2015 Doubango Telecom.
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#ifndef TINYDAV_PRODUCER_SCREENCAST_D3D9_H
+#define TINYDAV_PRODUCER_SCREENCAST_D3D9_H
+
+#include "tinydav_config.h"
+
+#if TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT
+
+#include "tinymedia/tmedia_producer.h"
+
+TDAV_BEGIN_DECLS
+
+TINYDAV_GEXTERN const tmedia_producer_plugin_def_t *tdav_producer_screencast_d3d9_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT */
+
+#endif /* TINYDAV_PRODUCER_SCREENCAST_D3D9_H */
diff --git a/tinyDAV/include/tinydav/video/directx/tdav_producer_screencast_ddraw.h b/tinyDAV/include/tinydav/video/directx/tdav_producer_screencast_ddraw.h
new file mode 100644
index 0000000..a499202
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/directx/tdav_producer_screencast_ddraw.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 2015 Mamadou DIOP.
+* Copyright (C) 2015 Doubango Telecom.
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#ifndef TINYDAV_PRODUCER_SCREENCAST_DDRAW_H
+#define TINYDAV_PRODUCER_SCREENCAST_DDRAW_H
+
+#include "tinydav_config.h"
+
+#if TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT
+
+#include "tinymedia/tmedia_producer.h"
+
+TDAV_BEGIN_DECLS
+
+tsk_bool_t tdav_producer_screencast_ddraw_plugin_is_supported();
+TINYDAV_GEXTERN const tmedia_producer_plugin_def_t *tdav_producer_screencast_ddraw_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT */
+
+#endif /* TINYDAV_PRODUCER_SCREENCAST_DDRAW_H */
diff --git a/tinyDAV/include/tinydav/video/gdi/tdav_consumer_video_gdi.h b/tinyDAV/include/tinydav/video/gdi/tdav_consumer_video_gdi.h
new file mode 100644
index 0000000..5609e9d
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/gdi/tdav_consumer_video_gdi.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 2014 Mamadou DIOP
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#ifndef TINYDAV_CONSUMER_VIDEO_GDI_H
+#define TINYDAV_CONSUMER_VIDEO_GDI_H
+
+#include "tinydav_config.h"
+
+#if TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT
+
+#include "tinymedia/tmedia_consumer.h"
+
+TDAV_BEGIN_DECLS
+
+TINYDAV_GEXTERN const tmedia_consumer_plugin_def_t *tdav_consumer_video_gdi_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT */
+
+#endif /* TINYDAV_CONSUMER_VIDEO_GDI_H */
diff --git a/tinyDAV/include/tinydav/video/gdi/tdav_producer_screencast_gdi.h b/tinyDAV/include/tinydav/video/gdi/tdav_producer_screencast_gdi.h
new file mode 100644
index 0000000..f50901e
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/gdi/tdav_producer_screencast_gdi.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 2014-2015 Mamadou DIOP.
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#ifndef TINYDAV_PRODUCER_SCREENCAST_GDI_H
+#define TINYDAV_PRODUCER_SCREENCAST_GDI_H
+
+#include "tinydav_config.h"
+
+#if TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT
+
+#include "tinymedia/tmedia_producer.h"
+
+TDAV_BEGIN_DECLS
+
+TINYDAV_GEXTERN const tmedia_producer_plugin_def_t *tdav_producer_screencast_gdi_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT */
+
+#endif /* TINYDAV_PRODUCER_SCREENCAST_GDI_H */ \ No newline at end of file
diff --git a/tinyDAV/include/tinydav/video/jb/tdav_video_frame.h b/tinyDAV/include/tinydav/video/jb/tdav_video_frame.h
new file mode 100644
index 0000000..798f848
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/jb/tdav_video_frame.h
@@ -0,0 +1,68 @@
+/*
+* Copyright (C) 2012 Doubango Telecom <http://www.doubango.org>
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango(DOT)org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tdav_video_frame.h
+ * @brief Video Frame
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango(DOT)org>
+ */
+#ifndef TINYDAV_VIDEO_JB_FRAME_H
+#define TINYDAV_VIDEO_JB_FRAME_H
+
+#include "tinydav_config.h"
+
+#include "tinyrtp/rtp/trtp_rtp_packet.h"
+
+#include "tsk_safeobj.h"
+#include "tsk_list.h"
+
+TDAV_BEGIN_DECLS
+
+#define TDAV_VIDEO_FRAME(self) ((tdav_video_frame_t*)(self))
+
+typedef uint16_t tdav_video_frame_seq_nums[16];
+typedef tsk_list_t tdav_video_frames_L_t;
+
+typedef struct tdav_video_frame_s
+{
+ TSK_DECLARE_OBJECT;
+
+ uint8_t payload_type;
+ uint32_t timestamp;
+ uint16_t highest_seq_num;
+ uint32_t ssrc;
+ trtp_rtp_packets_L_t* pkts;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tdav_video_frame_t;
+
+struct tdav_video_frame_s* tdav_video_frame_create(struct trtp_rtp_packet_s* rtp_pkt);
+int tdav_video_frame_put(struct tdav_video_frame_s* self, struct trtp_rtp_packet_s* rtp_pkt);
+const struct trtp_rtp_packet_s* tdav_video_frame_find_by_seq_num(const struct tdav_video_frame_s* self, uint16_t seq_num);
+tsk_size_t tdav_video_frame_write(struct tdav_video_frame_s* self, void** buffer_ptr, tsk_size_t* buffer_size);
+tsk_bool_t tdav_video_frame_is_complete(const struct tdav_video_frame_s* self, int32_t last_seq_num_with_mark, int32_t* missing_seq_num_start, int32_t* missing_seq_num_count);
+#define tdav_video_frame_is_complete_2(self, last_seq_num_with_mark) tdav_video_frame_is_complete((self), (last_seq_num_with_mark), tsk_null, tsk_null)
+
+TDAV_END_DECLS
+
+#endif /* TINYDAV_VIDEO_JB_FRAME_H */
diff --git a/tinyDAV/include/tinydav/video/jb/tdav_video_jb.h b/tinyDAV/include/tinydav/video/jb/tdav_video_jb.h
new file mode 100644
index 0000000..e47e18b
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/jb/tdav_video_jb.h
@@ -0,0 +1,88 @@
+/*
+* Copyright (C) 2012 Doubango Telecom <http://www.doubango.org>
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango(DOT)org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tdav_video_jb.h
+ * @brief Video Jitter Buffer
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango(DOT)org>
+ */
+#ifndef TINYDAV_VIDEO_JB_H
+#define TINYDAV_VIDEO_JB_H
+
+#include "tinydav_config.h"
+
+#include "tinymedia/tmedia_jitterbuffer.h"
+
+#include "tsk_buffer.h"
+#include "tsk_timer.h"
+#include "tsk_list.h"
+#include "tsk_safeobj.h"
+
+TDAV_BEGIN_DECLS
+
+typedef enum tdav_video_jb_cb_data_type_e
+{
+ tdav_video_jb_cb_data_type_rtp,
+ tdav_video_jb_cb_data_type_fl, // frame lost
+ tdav_video_jb_cb_data_type_tmfr, // too many frames removed
+ tdav_video_jb_cb_data_type_fdd, // average frame decoding duration
+ tdav_video_jb_cb_data_type_fps_changed, // fps changed, detection done using the timestamp
+}
+tdav_video_jb_cb_data_type_t;
+
+typedef struct tdav_video_jb_cb_data_xs
+{
+ tdav_video_jb_cb_data_type_t type;
+ uint32_t ssrc;
+ const void* usr_data;
+ union{
+ struct{
+ const struct trtp_rtp_packet_s* pkt;
+ }rtp;
+ struct{
+ uint16_t seq_num;
+ tsk_size_t count;
+ }fl;
+ struct{
+ uint32_t x_dur; // expected duration in milliseconds
+ uint32_t a_dur; // actual duration in milliseconds
+ }fdd;
+ struct{
+ uint32_t old;
+ uint32_t new;
+ }fps;
+ };
+}
+tdav_video_jb_cb_data_xt;
+
+typedef int (*tdav_video_jb_cb_f)(const tdav_video_jb_cb_data_xt* data);
+#define TDAV_VIDEO_JB_CB_F(self) ((tdav_video_jb_cb_f)(self))
+
+struct tdav_video_jb_s* tdav_video_jb_create();
+int tdav_video_jb_set_callback(struct tdav_video_jb_s* self, tdav_video_jb_cb_f callback, const void* usr_data);
+int tdav_video_jb_start(struct tdav_video_jb_s* self);
+int tdav_video_jb_put(struct tdav_video_jb_s* self, struct trtp_rtp_packet_s* rtp_pkt);
+int tdav_video_jb_stop(struct tdav_video_jb_s* self);
+
+TDAV_END_DECLS
+
+#endif /* TINYDAV_VIDEO_JB_H */
diff --git a/tinyDAV/include/tinydav/video/mf/tdav_consumer_video_mf.h b/tinyDAV/include/tinydav/video/mf/tdav_consumer_video_mf.h
new file mode 100644
index 0000000..277c1cc
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/mf/tdav_consumer_video_mf.h
@@ -0,0 +1,39 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+/**@file tdav_consumer_video_mf.h
+ * @brief Microsoft Media Foundation video consumer (header).
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/ms694197(v=vs.85).aspx
+ */
+#ifndef TINYDAV_CONSUMER_VIDEO_MF_H
+#define TINYDAV_CONSUMER_VIDEO_MF_H
+
+#include "tinydav_config.h"
+
+#if HAVE_MF
+
+#include "tinydav/video/tdav_consumer_video.h"
+
+TDAV_BEGIN_DECLS
+
+TINYDAV_GEXTERN const struct tmedia_consumer_plugin_def_s *tdav_consumer_video_mf_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* HAVE_MF */
+
+#endif /* TINYDAV_CONSUMER_VIDEO_MF_H */
diff --git a/tinyDAV/include/tinydav/video/mf/tdav_producer_video_mf.h b/tinyDAV/include/tinydav/video/mf/tdav_producer_video_mf.h
new file mode 100644
index 0000000..d1ee296
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/mf/tdav_producer_video_mf.h
@@ -0,0 +1,39 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+/**@file tdav_producer_video_mf.h
+ * @brief Microsoft Media Foundation video producer (header).
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/ms694197(v=vs.85).aspx
+ */
+#ifndef TINYDAV_PRODUCER_VIDEO_MF_H
+#define TINYDAV_PRODUCER_VIDEO_MF_H
+
+#include "tinydav_config.h"
+
+#if HAVE_MF
+
+#include "tinymedia/tmedia_producer.h"
+
+TDAV_BEGIN_DECLS
+
+TINYDAV_GEXTERN const struct tmedia_producer_plugin_def_s *tdav_producer_video_mf_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* HAVE_MF */
+
+#endif /* TINYDAV_PRODUCER_VIDEO_MF_H */
diff --git a/tinyDAV/include/tinydav/video/tdav_consumer_video.h b/tinyDAV/include/tinydav/video/tdav_consumer_video.h
new file mode 100644
index 0000000..a2bb966
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/tdav_consumer_video.h
@@ -0,0 +1,71 @@
+/*
+* Copyright (C) 2011 Doubango Telecom <http://www.doubango.org>
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango(DOT)org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tdav_consumer_video.h
+ * @brief Base class for all Video consumers.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango(DOT)org>
+ */
+#ifndef TINYDAV_CONSUMER_VIDEO_H
+#define TINYDAV_CONSUMER_VIDEO_H
+
+#include "tinydav_config.h"
+
+#include "tinymedia/tmedia_consumer.h"
+
+#include "tsk_safeobj.h"
+
+TDAV_BEGIN_DECLS
+
+#define TDAV_CONSUMER_VIDEO(self) ((tdav_consumer_video_t*)(self))
+
+typedef struct tdav_consumer_video_s
+{
+ TMEDIA_DECLARE_CONSUMER;
+
+ struct tmedia_jitterbuffer_s* jitterbuffer;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tdav_consumer_video_t;
+
+TINYDAV_API int tdav_consumer_video_init(tdav_consumer_video_t* self);
+TINYDAV_API int tdav_consumer_video_cmp(const tsk_object_t* consumer1, const tsk_object_t* consumer2);
+#define tdav_consumer_video_prepare(self, codec) tmedia_consumer_prepare(TDAV_CONSUMER_VIDEO(self), codec)
+#define tdav_consumer_video_start(self) tmedia_consumer_start(TDAV_CONSUMER_VIDEO(self))
+#define tdav_consumer_video_consume(self, buffer, size) tmedia_consumer_consume(TDAV_CONSUMER_VIDEO(self), buffer, size)
+#define tdav_consumer_video_pause(self) tmedia_consumer_pause(TDAV_CONSUMER_VIDEO(self))
+#define tdav_consumer_video_stop(self) tmedia_consumer_stop(TDAV_CONSUMER_VIDEO(self))
+#define tdav_consumer_video_has_jb(self) ((self) && (self)->jitterbuffer)
+TINYDAV_API int tdav_consumer_video_set(tdav_consumer_video_t* self, const tmedia_param_t* param);
+TINYDAV_API int tdav_consumer_video_put(tdav_consumer_video_t* self, const void* data, tsk_size_t data_size, const tsk_object_t* proto_hdr);
+TINYDAV_API tsk_size_t tdav_consumer_video_get(tdav_consumer_video_t* self, void* out_data, tsk_size_t out_size);
+TINYDAV_API int tdav_consumer_video_tick(tdav_consumer_video_t* self);
+TINYDAV_API int tdav_consumer_video_reset(tdav_consumer_video_t* self);
+TINYDAV_API int tdav_consumer_video_deinit(tdav_consumer_video_t* self);
+
+#define TDAV_DECLARE_CONSUMER_VIDEO tdav_consumer_video_t __consumer_video__
+
+TDAV_END_DECLS
+
+
+#endif /* TINYDAV_CONSUMER_VIDEO_H */
diff --git a/tinyDAV/include/tinydav/video/tdav_converter_video.h b/tinyDAV/include/tinydav/video/tdav_converter_video.h
new file mode 100644
index 0000000..2ab3144
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/tdav_converter_video.h
@@ -0,0 +1,47 @@
+/*
+* Copyright (C) 2010-2011 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+/**@file tdav_converter_video.h
+ * @brief Video converter.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+
+ */
+#ifndef TINYDAV_CONVERTER_VIDEO_H
+#define TINYDAV_CONVERTER_VIDEO_H
+
+#include "tinydav_config.h"
+
+#include "tinymedia/tmedia_converter_video.h"
+
+TDAV_BEGIN_DECLS
+
+#if HAVE_LIBYUV
+extern const tmedia_converter_video_plugin_def_t *tdav_converter_video_libyuv_plugin_def_t;
+#endif /* HAVE_LIBYUV */
+#if HAVE_FFMPEG || HAVE_SWSSCALE
+extern const tmedia_converter_video_plugin_def_t *tdav_converter_video_ffmpeg_plugin_def_t;
+#endif /* if HAVE_FFMPEG || HAVE_SWSSCALE */
+
+TDAV_END_DECLS
+
+#endif /* TINYDAV_CONVERTER_VIDEO_H */
diff --git a/tinyDAV/include/tinydav/video/tdav_runnable_video.h b/tinyDAV/include/tinydav/video/tdav_runnable_video.h
new file mode 100644
index 0000000..4c8aef1
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/tdav_runnable_video.h
@@ -0,0 +1,54 @@
+/*
+* Copyright (C) 2010-2011 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+/**@file tdav_runnable_video.h
+ * @brief Video runnable used by codecs.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+
+ */
+#ifndef TINYDAV_RUNNABLE_VIDEO_H
+#define TINYDAV_RUNNABLE_VIDEO_H
+
+#include "tinydav_config.h"
+
+#include "tsk_runnable.h"
+
+TDAV_BEGIN_DECLS
+
+typedef struct tdav_runnable_video_s
+{
+ TSK_DECLARE_RUNNABLE;
+
+ const void* userdata;
+}
+tdav_runnable_video_t;
+
+tdav_runnable_video_t* tdav_runnable_video_create(tsk_runnable_func_run run_f, const void* userdata);
+int tdav_runnable_video_start(tdav_runnable_video_t* self);
+int tdav_runnable_video_stop(tdav_runnable_video_t* self);
+
+TINYDAV_GEXTERN const tsk_object_def_t *tdav_runnable_video_def_t;
+
+TDAV_END_DECLS
+
+#endif /* TINYDAV_RUNNABLE_VIDEO_H */
diff --git a/tinyDAV/include/tinydav/video/tdav_session_video.h b/tinyDAV/include/tinydav/video/tdav_session_video.h
new file mode 100644
index 0000000..a1cb7d4
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/tdav_session_video.h
@@ -0,0 +1,130 @@
+/*
+* Copyright (C) 2010-2011 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*
+*/
+
+/**@file tdav_session_video.h
+ * @brief Video Session plugin.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+
+ */
+#ifndef TINYDAV_SESSION_VIDEO_H
+#define TINYDAV_SESSION_VIDEO_H
+
+#include "tinydav_config.h"
+#include "tinydav/tdav_session_av.h"
+
+TDAV_BEGIN_DECLS
+
+typedef enum tdav_session_video_pkt_loss_level_e
+{
+ tdav_session_video_pkt_loss_level_low,
+ tdav_session_video_pkt_loss_level_medium,
+ tdav_session_video_pkt_loss_level_high,
+}
+tdav_session_video_pkt_loss_level_t;
+
+typedef struct tdav_session_video_s
+{
+ TDAV_DECLARE_SESSION_AV;
+
+ struct tdav_video_jb_s* jb;
+ tsk_bool_t jb_enabled;
+ tsk_bool_t zero_artifacts;
+ tsk_bool_t fps_changed;
+ tsk_bool_t started;
+
+ struct{
+ const void* context;
+ tmedia_session_rtcp_onevent_cb_f func;
+ } cb_rtcpevent;
+
+ struct{
+ void* buffer;
+ tsk_size_t buffer_size;
+
+ int rotation;
+ tsk_bool_t scale_rotated_frames;
+
+ void* conv_buffer;
+ tsk_size_t conv_buffer_size;
+
+ tdav_session_video_pkt_loss_level_t pkt_loss_level;
+ int32_t pkt_loss_fact;
+ int32_t pkt_loss_prob_good;
+ int32_t pkt_loss_prob_bad;
+
+ uint64_t last_frame_time;
+
+ uint8_t payload_type;
+ struct tmedia_codec_s* codec;
+ tsk_mutex_handle_t* h_mutex;
+ } encoder;
+
+ struct{
+ void* buffer;
+ tsk_size_t buffer_size;
+
+ void* conv_buffer;
+ tsk_size_t conv_buffer_size;
+
+ // latest decoded RTP seqnum
+ uint16_t last_seqnum;
+ // stream is corrupted if packets are lost
+ tsk_bool_t stream_corrupted;
+ uint64_t stream_corrupted_since;
+ uint32_t last_corrupted_timestamp;
+
+ uint8_t codec_payload_type;
+ struct tmedia_codec_s* codec;
+ uint64_t codec_decoded_frames_count;
+ } decoder;
+
+ struct {
+ tsk_size_t consumerLastWidth;
+ tsk_size_t consumerLastHeight;
+ struct tmedia_converter_video_s* fromYUV420;
+
+ tsk_size_t producerWidth;
+ tsk_size_t producerHeight;
+ tsk_size_t xProducerSize;
+ struct tmedia_converter_video_s* toYUV420;
+ } conv;
+
+ struct{
+ tsk_list_t* packets;
+ tsk_size_t count;
+ tsk_size_t max;
+ uint64_t last_fir_time;
+ uint64_t last_pli_time;
+ } avpf;
+}
+tdav_session_video_t;
+
+#define TDAV_SESSION_VIDEO(self) ((tdav_session_video_t*)(self))
+
+TINYDAV_GEXTERN const tmedia_session_plugin_def_t *tdav_session_video_plugin_def_t;
+TINYDAV_GEXTERN const tmedia_session_plugin_def_t *tdav_session_bfcpvideo_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* TINYDAV_SESSION_VIDEO_H */
diff --git a/tinyDAV/include/tinydav/video/v4linux/tdav_producer_video_v4l2.h b/tinyDAV/include/tinydav/video/v4linux/tdav_producer_video_v4l2.h
new file mode 100644
index 0000000..496bfcb
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/v4linux/tdav_producer_video_v4l2.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 2014 Mamadou DIOP.
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+#ifndef TINYDAV_PRODUCER_VIDEO_V4L2_H
+#define TINYDAV_PRODUCER_VIDEO_V4L2_H
+
+#include "tinydav_config.h"
+
+#if HAVE_LINUX_VIDEODEV2_H
+
+#include "tinymedia/tmedia_producer.h"
+
+TDAV_BEGIN_DECLS
+
+TINYDAV_GEXTERN const tmedia_producer_plugin_def_t *tdav_producer_video_v4l2_plugin_def_t;
+TINYDAV_GEXTERN const tmedia_producer_plugin_def_t *tdav_producer_screencast_v4l2_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* HAVE_LINUX_VIDEODEV2_H */
+
+#endif /* TINYDAV_PRODUCER_VIDEO_V4L2_H */
+
diff --git a/tinyDAV/include/tinydav/video/winm/tdav_consumer_winm.h b/tinyDAV/include/tinydav/video/winm/tdav_consumer_winm.h
new file mode 100644
index 0000000..3bdd52c
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/winm/tdav_consumer_winm.h
@@ -0,0 +1,39 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+/**@file tdav_consumer_winm.h
+ * @brief Microsoft Windows Media (WinM) consumer.
+ *
+ */
+#ifndef TINYDAV_CONSUMER_WINM_H
+#define TINYDAV_CONSUMER_WINM_H
+
+#include "tinydav_config.h"
+
+#if HAVE_WINM
+
+#include "tinydav/video/tdav_consumer_video.h"
+
+TDAV_BEGIN_DECLS
+
+TINYDAV_GEXTERN const struct tmedia_consumer_plugin_def_s *tdav_consumer_winm_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* HAVE_WINM */
+
+#endif /* TINYDAV_CONSUMER_WINM_H */
diff --git a/tinyDAV/include/tinydav/video/winm/tdav_producer_winm.h b/tinyDAV/include/tinydav/video/winm/tdav_producer_winm.h
new file mode 100644
index 0000000..34d4254
--- /dev/null
+++ b/tinyDAV/include/tinydav/video/winm/tdav_producer_winm.h
@@ -0,0 +1,39 @@
+/*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with DOUBANGO.
+*/
+/**@file tdav_producer_winm.h
+ * @brief Microsoft Windows Media (WinM) producer.
+ *
+ */
+#ifndef TINYDAV_PRODUCER_WINM_H
+#define TINYDAV_PRODUCER_WINM_H
+
+#include "tinydav_config.h"
+
+#if HAVE_WINM
+
+#include "tinymedia/tmedia_producer.h"
+
+TDAV_BEGIN_DECLS
+
+TINYDAV_GEXTERN const struct tmedia_producer_plugin_def_s *tdav_producer_winm_plugin_def_t;
+
+TDAV_END_DECLS
+
+#endif /* HAVE_WINM */
+
+#endif /* TINYDAV_PRODUCER_WINM_H */
OpenPOWER on IntegriCloud