summaryrefslogtreecommitdiffstats
path: root/tinyMEDIA/include/tinymedia/tmedia_producer.h
diff options
context:
space:
mode:
Diffstat (limited to 'tinyMEDIA/include/tinymedia/tmedia_producer.h')
-rwxr-xr-xtinyMEDIA/include/tinymedia/tmedia_producer.h124
1 files changed, 61 insertions, 63 deletions
diff --git a/tinyMEDIA/include/tinymedia/tmedia_producer.h b/tinyMEDIA/include/tinymedia/tmedia_producer.h
index 0817821..3cfc4c6 100755
--- a/tinyMEDIA/include/tinymedia/tmedia_producer.h
+++ b/tinyMEDIA/include/tinymedia/tmedia_producer.h
@@ -2,19 +2,19 @@
* Copyright (C) 2010-2011 Mamadou Diop.
*
* 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.
*
@@ -55,70 +55,68 @@ typedef int (*tmedia_producer_raw_cb_f)(const tmedia_video_encode_result_xt* chu
#define TMEDIA_PRODUCER_CHROMA_DEFAULT tmedia_chroma_yuv420p
/** Base object for all Producers */
-typedef struct tmedia_producer_s
-{
- TSK_DECLARE_OBJECT;
-
- tmedia_type_t type;
- const char* desc;
-
- struct{
- tmedia_chroma_t chroma;
- int fps;
- int rotation;
- tsk_bool_t mirror;
- tsk_size_t width;
- tsk_size_t height;
- } video;
-
- struct{
- uint8_t bits_per_sample;
- uint8_t channels;
- uint32_t rate;
- uint8_t ptime;
- uint8_t gain;
- int32_t volume;
- } audio;
-
- const struct tmedia_producer_plugin_def_s* plugin;
-
- tsk_bool_t is_prepared;
- tsk_bool_t is_started;
- uint64_t session_id;
-
- struct{
- enum tmedia_codec_id_e codec_id;
- // other options to be added
- } encoder;
-
- struct{
- tmedia_producer_enc_cb_f callback;
- const void* callback_data;
- } enc_cb;
-
- struct{
- tmedia_producer_raw_cb_f callback;
- tmedia_video_encode_result_xt chunck_curr;
- } raw_cb;
+typedef struct tmedia_producer_s {
+ TSK_DECLARE_OBJECT;
+
+ tmedia_type_t type;
+ const char* desc;
+
+ struct {
+ tmedia_chroma_t chroma;
+ int fps;
+ int rotation;
+ tsk_bool_t mirror;
+ tsk_size_t width;
+ tsk_size_t height;
+ } video;
+
+ struct {
+ uint8_t bits_per_sample;
+ uint8_t channels;
+ uint32_t rate;
+ uint8_t ptime;
+ uint8_t gain;
+ int32_t volume;
+ } audio;
+
+ const struct tmedia_producer_plugin_def_s* plugin;
+
+ tsk_bool_t is_prepared;
+ tsk_bool_t is_started;
+ uint64_t session_id;
+
+ struct {
+ enum tmedia_codec_id_e codec_id;
+ // other options to be added
+ } encoder;
+
+ struct {
+ tmedia_producer_enc_cb_f callback;
+ const void* callback_data;
+ } enc_cb;
+
+ struct {
+ tmedia_producer_raw_cb_f callback;
+ tmedia_video_encode_result_xt chunck_curr;
+ } raw_cb;
}
tmedia_producer_t;
/** Virtual table used to define a producer plugin */
-typedef struct tmedia_producer_plugin_def_s
-{
- //! object definition used to create an instance of the producer
- const tsk_object_def_t* objdef;
-
- //! the type of the producer
- tmedia_type_t type;
- //! full description (usefull for debugging)
- const char* desc;
-
- int (*set) (tmedia_producer_t* , const tmedia_param_t*);
- int (* prepare) (tmedia_producer_t* , const tmedia_codec_t*);
- int (* start) (tmedia_producer_t* );
- int (* pause) (tmedia_producer_t* );
- int (* stop) (tmedia_producer_t* );
+typedef struct tmedia_producer_plugin_def_s {
+ //! object definition used to create an instance of the producer
+ const tsk_object_def_t* objdef;
+
+ //! the type of the producer
+ tmedia_type_t type;
+ //! full description (usefull for debugging)
+ const char* desc;
+
+ int (*set) (tmedia_producer_t* , const tmedia_param_t*);
+ int (* prepare) (tmedia_producer_t* , const tmedia_codec_t*);
+ int (* start) (tmedia_producer_t* );
+ int (* pause) (tmedia_producer_t* );
+ int (* stop) (tmedia_producer_t* );
}
tmedia_producer_plugin_def_t;
OpenPOWER on IntegriCloud