Add a cpu_count property to Mediastreamer2

For instance, to allow video encoder to configure multithreading
parent d8cc31be
......@@ -219,6 +219,13 @@ MS2_PUBLIC int ms_discover_mtu(const char *destination_host);
MS2_PUBLIC void ms_set_mtu(int mtu);
* Declare how many cpu (cores) are available on the platform
MS2_PUBLIC void ms_set_cpu_count(unsigned int c);
MS2_PUBLIC unsigned int ms_get_cpu_count();
/** @} */
#ifdef __cplusplus
......@@ -74,6 +74,17 @@ extern void libmsandroidopengldisplay_init(void);
static MSList *ms_plugins_loaded_list;
static unsigned int cpu_count = 1;
unsigned int ms_get_cpu_count() {
return cpu_count;
void ms_set_cpu_count(unsigned int c) {
ms_message("CPU count set to %d", c);
cpu_count = c;
MSList *ms_list_new(void *data){
MSList *new_elem=(MSList *)ms_new(MSList,1);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment