summaryrefslogtreecommitdiffstats
path: root/tinyMEDIA/include/tinymedia/tmedia_consumer.h
diff options
context:
space:
mode:
Diffstat (limited to 'tinyMEDIA/include/tinymedia/tmedia_consumer.h')
-rwxr-xr-xtinyMEDIA/include/tinymedia/tmedia_consumer.h130
1 files changed, 64 insertions, 66 deletions
diff --git a/tinyMEDIA/include/tinymedia/tmedia_consumer.h b/tinyMEDIA/include/tinymedia/tmedia_consumer.h
index 0e88f45..9d347f1 100755
--- a/tinyMEDIA/include/tinymedia/tmedia_consumer.h
+++ b/tinyMEDIA/include/tinymedia/tmedia_consumer.h
@@ -4,17 +4,17 @@
* 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.
*
@@ -56,73 +56,71 @@ TMEDIA_BEGIN_DECLS
#endif
/** Base object for all Consumers */
-typedef struct tmedia_consumer_s
-{
- TSK_DECLARE_OBJECT;
-
- tmedia_type_t type;
- const char* desc;
-
- struct{
- int fps;
- struct {
- tmedia_chroma_t chroma;
- tsk_size_t width;
- tsk_size_t height;
- } in;
- struct {
- tmedia_chroma_t chroma;
- tsk_size_t width;
- tsk_size_t height;
- tsk_bool_t auto_resize; // auto_resize to "in.width, in.height"
- } display;
- } video;
-
- struct{
- uint8_t bits_per_sample;
- uint8_t ptime;
- uint8_t gain;
- struct{
- uint8_t channels;
- uint32_t rate;
- } in;
- struct{
- uint8_t channels;
- uint32_t rate;
- } out;
- int32_t volume;
- } audio;
-
- tsk_bool_t is_started;
- tsk_bool_t is_prepared;
- uint64_t session_id;
-
- struct{
- enum tmedia_codec_id_e codec_id;
- // other options to be added
- } decoder;
-
- const struct tmedia_consumer_plugin_def_s* plugin;
+typedef struct tmedia_consumer_s {
+ TSK_DECLARE_OBJECT;
+
+ tmedia_type_t type;
+ const char* desc;
+
+ struct {
+ int fps;
+ struct {
+ tmedia_chroma_t chroma;
+ tsk_size_t width;
+ tsk_size_t height;
+ } in;
+ struct {
+ tmedia_chroma_t chroma;
+ tsk_size_t width;
+ tsk_size_t height;
+ tsk_bool_t auto_resize; // auto_resize to "in.width, in.height"
+ } display;
+ } video;
+
+ struct {
+ uint8_t bits_per_sample;
+ uint8_t ptime;
+ uint8_t gain;
+ struct {
+ uint8_t channels;
+ uint32_t rate;
+ } in;
+ struct {
+ uint8_t channels;
+ uint32_t rate;
+ } out;
+ int32_t volume;
+ } audio;
+
+ tsk_bool_t is_started;
+ tsk_bool_t is_prepared;
+ uint64_t session_id;
+
+ struct {
+ enum tmedia_codec_id_e codec_id;
+ // other options to be added
+ } decoder;
+
+ const struct tmedia_consumer_plugin_def_s* plugin;
}
tmedia_consumer_t;
/** Virtual table used to define a consumer plugin */
-typedef struct tmedia_consumer_plugin_def_s
-{
- //! object definition used to create an instance of the consumer
- const tsk_object_def_t* objdef;
-
- //! the type of the consumer
- tmedia_type_t type;
- //! full description (usefull for debugging)
- const char* desc;
-
- int (*set) (tmedia_consumer_t* , const tmedia_param_t*);
- int (* prepare) (tmedia_consumer_t*, const tmedia_codec_t* );
- int (* start) (tmedia_consumer_t* );
- int (* consume) (tmedia_consumer_t*, const void* buffer, tsk_size_t size, const tsk_object_t* proto_hdr);
- int (* pause) (tmedia_consumer_t* );
- int (* stop) (tmedia_consumer_t* );
+typedef struct tmedia_consumer_plugin_def_s {
+ //! object definition used to create an instance of the consumer
+ const tsk_object_def_t* objdef;
+
+ //! the type of the consumer
+ tmedia_type_t type;
+ //! full description (usefull for debugging)
+ const char* desc;
+
+ int (*set) (tmedia_consumer_t* , const tmedia_param_t*);
+ int (* prepare) (tmedia_consumer_t*, const tmedia_codec_t* );
+ int (* start) (tmedia_consumer_t* );
+ int (* consume) (tmedia_consumer_t*, const void* buffer, tsk_size_t size, const tsk_object_t* proto_hdr);
+ int (* pause) (tmedia_consumer_t* );
+ int (* stop) (tmedia_consumer_t* );
}
tmedia_consumer_plugin_def_t;
OpenPOWER on IntegriCloud