Commit 9d8451c8 authored by Emmanuel Milou's avatar Emmanuel Milou

Merge commit 'origin/video'

parents b2a35012 b80f7f3e
......@@ -2,14 +2,7 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = libs src ringtones skins doc
SUBDIRS = libs src ringtones skins
EXTRA_DIST = m4/*.m4 tools/*.sh platform/* images/* README.gentoo
.PHONY: doc
doc:
$(MAKE) -C doc doc
.PHONY: doxygen-trac
doxygen-trac:
$(MAKE) -C doc/doxygen doxygen-trac
\ No newline at end of file
......@@ -39,7 +39,12 @@ AC_CONFIG_FILES([src/Makefile \
src/audio/codecs/ilbc/Makefile \
src/config/Makefile \
src/dbus/Makefile \
src/zeroconf/Makefile])
src/zeroconf/Makefile \
src/video/Makefile \
src/video/VideoCodec/Makefile \
src/video/V4L/Makefile \
src/memmanager/Makefile \
src/mixer/Makefile])
AC_CONFIG_FILES([skins/Makefile \
skins/metal/Makefile \
......
......@@ -26,6 +26,7 @@ PKG_CHECK_MODULES(DEPS, \
dbus-glib-1 >= 0.35 \
gtk+-2.0 >= 2.2 \
glib-2.0 >= 2.2 \
gtkglext-1.0 >= 1.0.0 \
)
......
......@@ -16,7 +16,9 @@ sflphone_gtk_SOURCES = \
marshaller.c \
sliders.c \
statusicon.c \
codeclist.c
codeclist.c \
glwidget.c \
MemManager.c
noinst_HEADERS = actions.h dbus.h mainwindow.h calllist.h dialpad.h codeclist.h\
callmanager-glue.h configurationmanager-glue.h instance-glue.h menus.h calltree.h screen.h configwindow.h \
......
#include "MemManager.h"
MemKey* createMemKeyFromChar( char* key )
{
return 0;
}
MemKey* initSpace( MemKey *key )
{
return 0;
}
int fetchData( MemKey *key, MemData *data )
{
return 0;
}
int putData( MemKey *key, MemData *data )
{
return 0;
}
\ No newline at end of file
#ifndef MEMMANAGER_H_
#define MEMMANAGER_H_
typedef struct {
char* data;
int size;
}MemData;
typedef struct
{
int key;
char* description;
int size;
char* BaseAdd;
}MemKey;
MemKey* createMemKeyFromChar( char* key );
MemKey* initSpace( MemKey *key );
int fetchData( MemKey *key, MemData *data );
int putData( MemKey *key, MemData *data );
#endif /*MEMMANAGER_H_*/
#include <glwidget.h>
//! Callback Function to draw the content of the widget
/*!
* \param widget a pointer to the widget being drawned
* \param data data on the call back
* \return the success of the operation
*/
gboolean draw(GtkWidget* widget, gpointer data)
{
return TRUE;
}
//! Callback Function to reshape the content of the widget
/*!
* \param widget a pointer to the widget being drawned
* \param ev a pointer to the event data
* \param data data on the call back
* \return the success of the operation
*/
gboolean reshape(GtkWidget* widget, GdkEventConfigure* ev, gpointer data)
{
return TRUE;
}
//! Callback Function to initialise the content of the widget
/*!
* \param widget a pointer to the widget being drawned
* \param data data on the call back
* \return the success of the operation
*/
gboolean init(GtkWidget* widget, gpointer data)
{
return TRUE;
}
//! Function to force a redraw of the widget
void redraw(GtkWidget* widget)
{
}
//! Function that creates the opengl widget with all the proper information
/*!
* \return the created widget
*/
GtkWidget* createGLWidget()
{ return NULL;
}
//! Draws the images from the local capture source
/*!
* \param widget a pointer to the widget being drawned
* \param data data on the call back
* \return the success of the operation
*/
gboolean drawLocal(GtkWidget* widget, gpointer data)
{
return TRUE;
}
//! Draws the images from the remote source
/*!
* \param widget a pointer to the widget being drawned
* \param data data on the call back
* \return the success of the operation
*/
gboolean drawRemote(GtkWidget* widget, gpointer data)
{
return TRUE;
}
/* Generated by Together */
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <gtk/gtkgl.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "MemManager.h"
//! Memory manager
//MemManager* sharedMemory;
//! Key to access the shared Memory space that refers to the remote data
MemKey* remoteKey;
//! Key to access the shared Memory space that refers to the local data
MemKey* localKey;
//! Remote data buffer
unsigned char * remoteBuff;
//! Local data buffer
unsigned char * localBuff;
//! Configuration information for the gl widget
GdkGLConfig* glconfig;
//! The glwidget it self
GtkWidget* drawing_area;
//! Callback Function to draw the content of the widget
/*!
* \param widget a pointer to the widget being drawned
* \param data data on the call back
* \return the success of the operation
*/
gboolean draw(GtkWidget* widget, gpointer data);
//! Callback Function to reshape the content of the widget
/*!
* \param widget a pointer to the widget being drawned
* \param ev a pointer to the event data
* \param data data on the call back
* \return the success of the operation
*/
gboolean reshape(GtkWidget* widget, GdkEventConfigure* ev, gpointer data);
//! Callback Function to initialise the content of the widget
/*!
* \param widget a pointer to the widget being drawned
* \param data data on the call back
* \return the success of the operation
*/
gboolean init(GtkWidget* widget, gpointer data);
//! Function to force a redraw of the widget
void redraw(GtkWidget* widget);
//! Function that creates the opengl widget with all the proper information
/*!
* \return the created widget
*/
GtkWidget* createGLWidget();
//! Draws the images from the local capture source
/*!
* \param widget a pointer to the widget being drawned
* \param data data on the call back
* \return the success of the operation
*/
gboolean drawLocal(GtkWidget* widget, gpointer data);
//! Draws the images from the remote source
/*!
* \param widget a pointer to the widget being drawned
* \param data data on the call back
* \return the success of the operation
*/
gboolean drawRemote(GtkWidget* widget, gpointer data);
#endif //GLWIDGET_H
......@@ -28,7 +28,7 @@ IAXSOURCES =
IAXHEADERS =
endif
SUBDIRS = audio config dbus $(ZEROCONFDIR)
SUBDIRS = audio config dbus memmanager video mixer $(ZEROCONFDIR)
sflphoned_SOURCES = eventthread.cpp main.cpp voiplink.cpp \
managerimpl.cpp observer.cpp \
......@@ -51,6 +51,9 @@ libsflphone_la_LIBADD = \
./audio/libaudio.la \
./dbus/libdbus.la \
./config/libconfig.la \
./memmanager/libmemmanager.la \
./mixer/libmixer.la \
./video/libvideo.la \
$(IAX_LIBS)
libsflphone_la_SOURCES =
......
SUBDIRS =
noinst_LTLIBRARIES = libmemmanager.la
libmemmanager_la_SOURCES = MemData.cpp \
MemKey.cpp \
MemManager.cpp \
MemSorter.cpp \
MemSpace.cpp
AM_CXXFLAGS = -I$(top_srcdir)/include $(libccext2_CFLAGS) $(USER_INCLUDES)
/* Generated by Together */
#include "MemData.h"
MemData::MemData()
{
}
MemData::~MemData()
{
// TODO: Use memcpy to copy data
}
MemData::MemData(MemData* data)
{
// TODO: Use memcpy to copy data
}
MemData::MemData(MemData& data)
{
}
int MemData::fetchData(char * data)
{
data= 0;
return 0;
}
void MemData::putData(char * data, int size)
{
}
/* Generated by Together */
#ifndef MEMDATA_H
#define MEMDATA_H
//! Memmory data container
/*!
* Contains a copy of the data in the shared memory. It contains the data it self and the size. This class acts like a container.
*/
class MemData {
public:
//! Constructor
/*!
* Initialises the Container
*/
MemData();
//! Pointer copy constructor
/*!
* Creates an independant copy of the source object
*
* \param data a pointer to a MemData object
*/
MemData(MemData* data);
//! Reference copy constructor
/*!
* Creates an independant copy of the source object
*
* \param data a reference to a MemData object
*/
MemData(MemData& data);
//! Destructor
/*!
* Disposes cleanly of the data pointer
*/
~MemData();
//! Method to access the data in the buffer
/*!
* \param data a pointer to where the data wil be copied
* \return the size of data
*/
int fetchData(char * data);
//! Method to change the data in the buffer
/*!
* \param data a pointer to the new data
* \param size the size of data
*/
void putData(char * data, int size);
private:
//! Pointer to the data
char * data;
//! The current size of the data in the buffer
int size;
};
#endif //MEMDATA_H
/* Generated by Together */
#include "MemKey.h"
MemKey::MemKey(int size, char* description)
{
}
MemKey::~MemKey()
{
}
int MemKey::getKey()
{
return 0;
}
const char * MemKey::getDescription() const
{
return 0;
}
int MemKey::getIndex()
{
return 0;
}
void MemKey::setIndex(int index)
{
}
MemKey::MemKey(MemKey* key)
{
}
MemKey::MemKey(MemKey& key)
{
}
int MemKey::getSize()
{
return 0;
}
char * MemKey::serialize()
{
return 0;
}
MemKey::MemKey()
{
}
MemKey::MemKey(char* serializedData)
{
}
/* Generated by Together */
#ifndef MEMKEY_H
#define MEMKEY_H
//! Reprensent a unique key associated to a shared memory space
/*!
* This class is a container for the information relative to a shared memory space
*/
class MemKey {
public:
//! Constructor
/*!
* Initiate the object
*
* \param size the maximum size of the shared memory space
* \param description a description of the shared memory space
*/
MemKey(int size, char* description = 0);
//! Pointer copy constructor
/*!
* Creates an independant copy of the source object
*
* \param key a pointer to a MemKey object
*/
MemKey(MemKey* key);
//! Reference copy constructor
/*!
* Creates an independant copy of the source object
*
* \param key a reference to a MemKey object
*/
MemKey(MemKey& key);
//! Constructor from serialized data
/*!
* \param serializedData a char pointer to the representation of a MemKey
*/
MemKey(char* serializedData);
//! Destructor
/*!
* Disposes cleanly of object
*/
~MemKey();
//! Access method to the key of the shared memory space
/*!
* \return the key to the memory space
*/
int getKey();
//! Access method to the description of the shared memory space
/*!
* \return a constant char pointer to the description
*/
const char * getDescription() const;
//! Access method to the index of the memory space in the MemManager
/*!
* \return the index in the MemManager
*/
int getIndex();
//! Modification method to the index of the memory space in the MemManager
/*!
* \param index the index in the MemManager
*/
void setIndex(int index);
//! Access method to the maixmum size of shared memory space
/*!
* \return the maximum size of the shared memory space
*/
int getSize();
//! Method to serialize the MemKeyObject
/*!
* \return a char pointer reprensenting the state of the key
*/
char * serialize();
private:
//! Default constructor
/*!
* The default constructor is declared private to prevent the decleratio of an MemKey without the proper information.
*/
MemKey();
//! The key to access the shared memory space
int key;
//! The description of the shared memory space
char * description;
//! The index of the MemSpace in the MemManager
int index;
//! The maximum size of the shared memory space
int size;
};
#endif //MEMKEY_H
/* Generated by Together */
#include "MemManager.h"
MemManager* MemManager::instance= 0;
MemManager* MemManager::getInstance()
{
return 0;
}
MemManager::MemManager()
{
}
MemManager::~MemManager()
{
}
const MemKey* MemManager::initSpace(int key, int size)
{
return 0;
}
const MemKey* MemManager::initSpace(MemKey* key, int size)
{
return 0;
}
bool MemManager::setDefaultSpace(MemKey* key)
{
return false;
}
void MemManager::nextSpace()
{
}
void MemManager::previousSpace()
{