Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
c580962d
Commit
c580962d
authored
Jun 17, 2014
by
Simon Morlat
Browse files
work in progress
parent
ebc30daf
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1247 additions
and
1204 deletions
+1247
-1204
include/mediastreamer2/Makefile.am
include/mediastreamer2/Makefile.am
+3
-1
include/mediastreamer2/formats.h
include/mediastreamer2/formats.h
+71
-0
include/mediastreamer2/mediastream.h
include/mediastreamer2/mediastream.h
+28
-9
include/mediastreamer2/msfactory.h
include/mediastreamer2/msfactory.h
+237
-0
include/mediastreamer2/msfilter.h
include/mediastreamer2/msfilter.h
+44
-11
include/mediastreamer2/msinterfaces.h
include/mediastreamer2/msinterfaces.h
+5
-0
include/mediastreamer2/msvideo.h
include/mediastreamer2/msvideo.h
+0
-4
src/Makefile.am
src/Makefile.am
+1
-1
src/android/android-display-bad.cpp
src/android/android-display-bad.cpp
+2
-2
src/android/android-display.c
src/android/android-display.c
+2
-2
src/android/android-opengl-display.c
src/android/android-opengl-display.c
+2
-2
src/audiofilters/msconf.c
src/audiofilters/msconf.c
+0
-817
src/audiofilters/msopus.c
src/audiofilters/msopus.c
+2
-1
src/base/eventqueue.c
src/base/eventqueue.c
+9
-7
src/base/mscommon.c
src/base/mscommon.c
+11
-119
src/base/msfactory.c
src/base/msfactory.c
+696
-0
src/base/msfilter.c
src/base/msfilter.c
+31
-188
src/videofilters/videoenc.c
src/videofilters/videoenc.c
+6
-6
src/voip/audiostream.c
src/voip/audiostream.c
+93
-22
src/voip/mediastream.c
src/voip/mediastream.c
+4
-12
No files found.
include/mediastreamer2/Makefile.am
View file @
c580962d
...
...
@@ -39,7 +39,9 @@ mediastreamer2_include_HEADERS= ice.h \
videostarter.h
\
bits_rw.h
\
x11_helper.h
\
flowcontrol.h
flowcontrol.h
\
formats.h
\
msfactory.h
EXTRA_DIST
=
$(mediastreamer2_include_HEADERS)
include/mediastreamer2/formats.h
0 → 100644
View file @
c580962d
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2014 Belledonne Communications SARL http://www.belledonne-communications.com
This program 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 2
of the License, or (at your option) any later version.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef msformats_h
#define msformats_h
#ifdef __cplusplus
extern
"C"
{
#endif
/**
* Simple enum to indicate whether a format is audio or video.
**/
typedef
enum
_MSFormatType
{
MSAudio
,
MSVideo
}
MSFormatType
;
/**
* to string from enum.
**/
MS2_PUBLIC
const
char
*
ms_format_type_to_string
(
MSFormatType
type
);
/* those structs are part of the ABI: don't change their size otherwise binary plugins will be broken*/
typedef
struct
MSVideoSize
{
int
width
,
height
;
}
MSVideoSize
;
/**
* Structure describing fully a media format.
**/
struct
_MSFmtDescriptor
{
MSFormatType
type
;
/**<format type, audio or video*/
char
*
encoding
;
/**<the name of the encoding: for example pcmu, H264, opus*/
int
nchannels
;
/**<number of channels, relevant for audio only*/
int
rate
;
/**<Samplerate for audio, clockrate for video*/
char
*
fmtp
;
/**<fmtp*/
MSVideoSize
vsize
;
/**<video size*/
char
*
text
;
/**<do not use directly, use ms_fmt_descriptor_to_string() instead*/
};
typedef
struct
_MSFmtDescriptor
MSFmtDescriptor
;
MS2_PUBLIC
const
char
*
ms_fmt_descriptor_to_string
(
const
MSFmtDescriptor
*
orig
);
#ifdef __cplusplus
}
#endif
#endif
include/mediastreamer2/mediastream.h
View file @
c580962d
...
...
@@ -88,13 +88,6 @@ typedef struct _MSCryptoSuiteNameParams{
MS2_PUBLIC
MSCryptoSuite
ms_crypto_suite_build_from_name_params
(
const
MSCryptoSuiteNameParams
*
nameparams
);
MS2_PUBLIC
int
ms_crypto_suite_to_name_params
(
MSCryptoSuite
cs
,
MSCryptoSuiteNameParams
*
nameparams
);
typedef
enum
StreamType
{
AudioStreamType
,
VideoStreamType
}
StreamType
;
MS2_PUBLIC
const
char
*
ms_stream_type_to_string
(
StreamType
);
/**
* The MediaStream is an object describing a stream (one of AudioStream or VideoStream).
**/
...
...
@@ -123,11 +116,14 @@ typedef enum _MSStreamState{
MSStreamStarted
}
MSStreamState
;
#define AudioStreamType MSAudio
#define VideoStreamType MSVideo
/**
* Base struct for both AudioStream and VideoStream structure.
**/
struct
_MediaStream
{
Stream
Type
type
;
MSFormat
Type
type
;
MSStreamState
state
;
MSMediaStreamSessions
sessions
;
OrtpEvQueue
*
evq
;
...
...
@@ -290,6 +286,12 @@ struct _AudioStream
MSFilter
*
recv_tee
;
MSFilter
*
recorder_mixer
;
MSFilter
*
recorder
;
struct
{
MSFilter
*
resampler
;
MSFilter
*
encoder
;
MSFilter
*
recorder
;
MSFilter
*
video_input
;
}
av_recorder
;
char
*
recorder_file
;
EchoLimiterType
el_type
;
/*use echo limiter: two MSVolume, measured input level controlling local output level*/
uint32_t
features
;
...
...
@@ -533,6 +535,7 @@ static inline int audio_stream_set_dscp(AudioStream *stream, int dscp) {
return
media_stream_set_dscp
(
&
stream
->
ms
,
dscp
);
}
/**
* @}
**/
...
...
@@ -564,6 +567,8 @@ struct _VideoStream
MSFilter
*
tee2
;
MSFilter
*
jpegwriter
;
MSFilter
*
output2
;
MSFilter
*
tee3
;
MSFilter
*
itcsink
;
MSVideoSize
sent_vsize
;
int
corner
;
/*for selfview*/
VideoStreamRenderCallback
rendercb
;
...
...
@@ -576,12 +581,13 @@ struct _VideoStream
VideoStreamDir
dir
;
MSWebCam
*
cam
;
int
device_orientation
;
/* warning: meaning of this variable depends on the platform (Android, iOS, ...) */
uint64_t
last_reported_decoding_error_time
;
bool_t
use_preview_window
;
bool_t
freeze_on_error
;
bool_t
display_filter_auto_rotate_enabled
;
bool_t
source_performs_encoding
;
bool_t
output_performs_decoding
;
uint64_t
last_reported_decoding_error_time
;
};
typedef
struct
_VideoStream
VideoStream
;
...
...
@@ -713,6 +719,19 @@ MS2_PUBLIC bool_t video_stream_is_decoding_error_to_be_reported(VideoStream *str
*/
MS2_PUBLIC
void
video_stream_decoding_error_reported
(
VideoStream
*
stream
);
/**
* Link the audio stream with an existing video stream.
* This is necessary to enable recording of audio & video into a multimedia file.
*/
MS2_PUBLIC
void
audio_stream_link_video
(
AudioStream
*
stream
,
VideoStream
*
video
);
/**
* Unlink the audio stream from the video stream.
* This must be done if the video stream is about to be stopped.
**/
MS2_PUBLIC
void
audio_stream_unlink_video
(
AudioStream
*
stream
,
VideoStream
*
video
);
/**
* Small API to display a local preview window.
**/
...
...
include/mediastreamer2/msfactory.h
0 → 100644
View file @
c580962d
/*
This program 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 2
of the License, or (at your option) any later version.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef msfactory_h
#define msfactory_h
/*do not use these fields directly*/
struct
_MSFactory
{
MSList
*
desc_list
;
MSList
*
stats_list
;
#ifdef WIN32
MSList
*
ms_plugins_loaded_list
;
#endif
MSList
*
formats
;
char
*
plugins_dir
;
int
cpu_count
;
struct
_MSEventQueue
*
evq
;
int
max_payload_size
;
int
mtu
;
bool_t
statistics_enabled
;
bool_t
voip_initd
;
};
typedef
struct
_MSFactory
MSFactory
;
/**
* Create a mediastreamer2 factory. This is the root object that will create everything else from mediastreamer2.
**/
MS2_PUBLIC
MSFactory
*
ms_factory_new
(
void
);
/**
* Used by the legacy functions before MSFactory was added.
* Do not use in an application.
**/
MS2_PUBLIC
MSFactory
*
ms_factory_get_fallback
(
void
);
/**
* Destroy the factory.
* This should be done after destroying all objects created by the factory.
**/
MS2_PUBLIC
void
ms_factory_destroy
(
MSFactory
*
factory
);
MS2_PUBLIC
void
ms_factory_register_filter
(
MSFactory
*
factory
,
MSFilterDesc
*
desc
);
/**
* Retrieve capture filter that supports encoding to codec name.
*
* @param mime A string indicating the codec.
*
* Returns: a MSFilterDesc if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilterDesc
*
ms_factory_get_encoding_capturer
(
MSFactory
*
factory
,
const
char
*
mime
);
/**
* Retrieve render filter that supports decoding to codec name.
*
* @param mime A string indicating the codec.
*
* Returns: a MSFilterDesc if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilterDesc
*
ms_factory_get_decoding_renderer
(
MSFactory
*
factory
,
const
char
*
mime
);
/**
* Retrieve encoders according to codec name.
*
* Internal supported codecs:
* PCMU, PCMA, speex, gsm
* Existing Public plugins:
* iLBC
*
* @param mime A string indicating the codec.
*
* Returns: a MSFilterDesc if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilterDesc
*
ms_factory_get_encoder
(
MSFactory
*
factory
,
const
char
*
mime
);
/**
* Retrieve decoders according to codec name.
*
* Internal supported codecs:
* PCMU, PCMA, speex, gsm
* Existing Public plugins:
* iLBC
*
* @param mime A string indicating the codec.
*
* Returns: a MSFilterDesc if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilterDesc
*
ms_factory_get_decoder
(
MSFactory
*
factory
,
const
char
*
mime
);
/**
* Lookup a mediastreamer2 filter using its name.
* If found, the descriptor (MSFilterDesc) is returned.
* This descriptor can be used to instanciate the filter using ms_filter_new_from_desc()
* This function can be useful to query the presence of a filter loaded as a plugin, for example.
*
* @param filter_name The filter name.
**/
MS2_PUBLIC
MSFilterDesc
*
ms_factory_lookup_filter_by_name
(
MSFactory
*
factory
,
const
char
*
filter_name
);
/**
* Lookup a mediastreamer2 filter using its id.
* If found, the descriptor (MSFilterDesc) is returned.
* This descriptor can be used to instanciate the filter using ms_filter_new_from_desc()
* This function can be useful to query the presence of a filter loaded as a plugin, for example.
*
* @param id The filter id.
**/
MS2_PUBLIC
MSFilterDesc
*
ms_factory_lookup_filter_by_id
(
MSFactory
*
factory
,
MSFilterId
id
);
/**
* Returns a list of filter descriptions implementing a given interface.
* The list itself must be freed by the caller of this function, but not the MSFilterDesc pointed by the list elements.
* @param id a filter interface id
* @returns a newly allocated MSList of #MSFilterDesc.
**/
MSList
*
ms_factory_lookup_filter_by_interface
(
MSFactory
*
factory
,
MSFilterInterfaceId
id
);
/**
* Create encoder filter according to codec name.
*
* Internal supported codecs:
* PCMU, PCMA, speex, gsm
* Existing Public plugins:
* iLBC
*
* @param mime A string indicating the codec.
*
* Returns: a MSFilter if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilter
*
ms_factory_create_encoder
(
MSFactory
*
factory
,
const
char
*
mime
);
/**
* Create decoder filter according to codec name.
*
* Internal supported codecs:
* PCMU, PCMA, speex, gsm
* Existing Public plugins:
* iLBC
*
* @param mime A string indicating the codec.
*
* Returns: a MSFilter if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilter
*
ms_factory_create_decoder
(
MSFactory
*
factory
,
const
char
*
mime
);
/**
* Check if a encode or decode filter exists for a codec name.
*
* Internal supported codecs:
* PCMU, PCMA, speex, gsm
* Existing Public plugins:
* iLBC
*
* @param mime A string indicating the codec.
*
* Returns: TRUE if successfull, FALSE otherwise.
*/
MS2_PUBLIC
bool_t
ms_factory_codec_supported
(
MSFactory
*
factory
,
const
char
*
mime
);
/**
* Create decoder filter according to a filter's MSFilterId.
*
* @param id A MSFilterId identifier for the filter.
*
* Returns: a MSFilter if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilter
*
ms_factory_create_filter
(
MSFactory
*
factory
,
MSFilterId
id
);
/**
* Create decoder filter according to a filter's name.
*
* @param name A name for the filter.
*
* Returns: a MSFilter if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilter
*
ms_factory_create_filter_from_name
(
MSFactory
*
factory
,
const
char
*
name
);
/**
* Create decoder filter according to a filter's description.
*
* The primary use is to create your own filter's in your
* application and avoid registration inside mediastreamer2.
*
* @param desc A MSFilterDesc for the filter.
*
* Returns: a MSFilter if successfull, NULL otherwise.
*/
MS2_PUBLIC
MSFilter
*
ms_factory_create_filter_from_desc
(
MSFactory
*
factory
,
MSFilterDesc
*
desc
);
MS2_PUBLIC
void
ms_factory_enable_statistics
(
MSFactory
*
obj
,
bool_t
enabled
);
MS2_PUBLIC
const
MSList
*
ms_factory_get_statistics
(
MSFactory
*
obj
);
MS2_PUBLIC
void
ms_factory_reset_statistics
(
MSFactory
*
obj
);
MS2_PUBLIC
void
ms_factory_log_statistics
(
MSFactory
*
obj
);
MS2_PUBLIC
unsigned
int
ms_factory_get_cpu_count
(
MSFactory
*
obj
);
MS2_PUBLIC
void
ms_factory_set_cpu_count
(
MSFactory
*
obj
,
unsigned
int
c
);
MS2_PUBLIC
void
ms_factory_init_plugins
(
MSFactory
*
obj
);
MS2_PUBLIC
void
ms_factory_set_plugins_dir
(
MSFactory
*
obj
,
const
char
*
path
);
MS2_PUBLIC
void
ms_factory_uninit_plugins
(
MSFactory
*
obj
);
MS2_PUBLIC
void
ms_factory_init_voip
(
MSFactory
*
obj
);
MS2_PUBLIC
void
ms_factory_uninit_voip
(
MSFactory
*
obj
);
MS2_PUBLIC
struct
_MSEventQueue
*
ms_factory_get_event_queue
(
MSFactory
*
obj
);
MS2_PUBLIC
void
ms_factory_set_event_queue
(
MSFactory
*
obj
,
struct
_MSEventQueue
*
q
);
MS2_PUBLIC
int
ms_factory_get_payload_max_size
(
MSFactory
*
factory
);
MS2_PUBLIC
void
ms_factory_set_payload_max_size
(
MSFactory
*
obj
,
int
size
);
MS2_PUBLIC
const
struct
_MSFmtDescriptor
*
ms_factory_get_audio_format
(
MSFactory
*
obj
,
const
char
*
mime
,
int
rate
,
int
channels
,
const
char
*
fmtp
);
MS2_PUBLIC
const
struct
_MSFmtDescriptor
*
ms_factory_get_video_format
(
MSFactory
*
obj
,
const
char
*
mime
,
const
MSVideoSize
*
size
,
const
char
*
fmtp
);
#endif
include/mediastreamer2/msfilter.h
View file @
c580962d
...
...
@@ -20,9 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef msfilter_h
#define msfilter_h
#include "mscommon.h"
#include "msqueue.h"
#include "allfilters.h"
#include "mediastreamer2/mscommon.h"
#include "mediastreamer2/msqueue.h"
#include "mediastreamer2/allfilters.h"
#include "mediastreamer2/formats.h"
/**
* @file msfilter.h
...
...
@@ -177,7 +178,8 @@ struct _MSFilter{
ms_mutex_t
lock
;
MSQueue
**
inputs
;
/**<Table of input queues.*/
MSQueue
**
outputs
;
/**<Table of output queues */
void
*
padding
[
2
];
/**Unused - to be reused later when new protected fields have to added*/
struct
_MSFactory
*
factory
;
/**<the factory that created this filter*/
void
*
padding
;
/**Unused - to be reused later when new protected fields have to added*/
void
*
data
;
/**< Pointer used by the filter for internal state and computations.*/
struct
_MSTicker
*
ticker
;
/**<Pointer to the ticker object. It is not NULL when being called process()*/
/*private attributes, they can be moved and changed at any time*/
...
...
@@ -441,7 +443,16 @@ MS2_PUBLIC bool_t ms_filter_has_method(MSFilter *f, unsigned int id);
*
* Returns TRUE if interface is implemented, FALSE, otherwise.
**/
bool_t
ms_filter_implements_interface
(
MSFilter
*
f
,
MSFilterInterfaceId
id
);
MS2_PUBLIC
bool_t
ms_filter_implements_interface
(
MSFilter
*
f
,
MSFilterInterfaceId
id
);
/**
* Returns whether a filter implements a given interface, based on the filter's descriptor.
* @param f a MSFilter object
* @param id an interface id.
*
* Returns TRUE if interface is implemented, FALSE, otherwise.
**/
MS2_PUBLIC
bool_t
ms_filter_desc_implements_interface
(
MSFilterDesc
*
desc
,
MSFilterInterfaceId
id
);
/**
* Set a callback on filter's to be informed of private filter's event.
...
...
@@ -455,7 +466,7 @@ bool_t ms_filter_implements_interface(MSFilter *f, MSFilterInterfaceId id);
* @deprecated use ms_filter_add_notify_callback()
*
*/
//MS2_PUBLIC void ms_filter_set_notify_callback(MSFilter *f, MSFilterNotifyFunc fn, void *userdata);
/**
* Set a callback on filter's to be informed of private filter's event.
...
...
@@ -587,6 +598,8 @@ MS2_PUBLIC const MSList * ms_filter_get_statistics(void);
MS2_PUBLIC
void
ms_filter_log_statistics
(
void
);
/* I define the id taking the lower bits of the address of the MSFilterDesc object,
the method index (_cnt_) and the argument size */
/* I hope using this to avoid type mismatch (calling a method on the wrong filter)*/
...
...
@@ -654,8 +667,30 @@ the method index (_cnt_) and the argument size */
/**Filters can return their latency in milliseconds (if known) using this method:*/
#define MS_FILTER_GET_LATENCY MS_FILTER_BASE_METHOD(11,int)
typedef
struct
_MSPinFormat
{
int
pin
;
const
MSFmtDescriptor
*
fmt
;
}
MSPinFormat
;
/* more specific methods: to be moved into implementation specific header files*/
/**
* Obtain the format of a filter on a given input
*/
#define MS_FILTER_GET_INPUT_FMT MS_FILTER_BASE_METHOD(30,MSPinFormat)
/**
* Set the format of a filter on a given input
*/
#define MS_FILTER_SET_INPUT_FMT MS_FILTER_BASE_METHOD(31,MSPinFormat)
/**
* Obtain the format of a filter on a given output
*/
#define MS_FILTER_GET_OUTPUT_FMT MS_FILTER_BASE_METHOD(32,MSPinFormat)
/**
* Set the format of a filter on a given output
*/
#define MS_FILTER_SET_OUTPUT_FMT MS_FILTER_BASE_METHOD(33,MSPinFormat)
/* DEPRECATED specific methods: to be moved into implementation specific header files - DO NOT USE IN NEW CODE*/
#define MS_FILTER_SET_FILTERLENGTH MS_FILTER_BASE_METHOD(12,int)
#define MS_FILTER_SET_OUTPUT_SAMPLE_RATE MS_FILTER_BASE_METHOD(13,int)
#define MS_FILTER_ENABLE_DIRECTMODE MS_FILTER_BASE_METHOD(14,int)
...
...
@@ -675,8 +710,6 @@ the method index (_cnt_) and the argument size */
#define MS_FILTER_SET_RTP_PAYLOAD_PICKER MS_FILTER_BASE_METHOD(27,void*)
#define MS_FILTER_SET_OUTPUT_NCHANNELS MS_FILTER_BASE_METHOD(28,int)
#define MS_CONF_SPEEX_PREPROCESS_MIC MS_FILTER_EVENT(MS_CONF_ID, 1, void*)
#define MS_CONF_CHANNEL_VOLUME MS_FILTER_EVENT(MS_CONF_ID, 3, void*)
/** @} */
...
...
@@ -710,8 +743,8 @@ MS2_PUBLIC void ms_filter_postpone_task(MSFilter *f, MSFilterFunc taskfunc);
}
#endif
#include "msinterfaces.h"
#include "
mediastreamer2/
msinterfaces.h"
#include "mediastreamer2/msfactory.h"
/* used by awk script in Makefile.am to generate alldescs.c */
#define MS_FILTER_DESC_EXPORT(desc)
...
...
include/mediastreamer2/msinterfaces.h
View file @
c580962d
...
...
@@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef msinterfaces_h
#define msinterfaces_h
#include "mediastreamer2/mscodecutils.h"
typedef
struct
_MSVideoCodecSLI
MSVideoCodecSLI
;
struct
_MSVideoCodecSLI
{
...
...
@@ -229,6 +231,9 @@ typedef enum _MSRecorderState MSRecorderState;
#define MS_DECODER_HAVE_PLC MS_AUDIO_DECODER_HAVE_PLC
/*for backward compatibility*/
#define MS_AUDIO_DECODER_SET_RTP_PAYLOAD_PICKER \
MS_FILTER_METHOD(MSFilterAudioDecoderInterface,1,MSRtpPayloadPickerContext*)
/**
* Interface definition for video encoders.
**/
...
...
include/mediastreamer2/msvideo.h
View file @
c580962d
...
...
@@ -126,11 +126,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_VIDEO_SIZE_UXGA_H 1200
/* those structs are part of the ABI: don't change their size otherwise binary plugins will be broken*/
typedef
struct
MSVideoSize
{
int
width
,
height
;
}
MSVideoSize
;
typedef
struct
MSRect
{
int
x
,
y
,
w
,
h
;
...
...
src/Makefile.am
View file @
c580962d
...
...
@@ -41,6 +41,7 @@ libmediastreamer_base_la_SOURCES= base/mscommon.c \
base/msticker.c
\
base/eventqueue.c
\
base/mssndcard.c
\
base/msfactory.c
\
otherfilters/tee.c
\
otherfilters/join.c
\
base/mswebcam.c
\
...
...
@@ -81,7 +82,6 @@ if MS2_FILTERS
libmediastreamer_voip_la_SOURCES
+=
audiofilters/alaw.c
\
audiofilters/ulaw.c
\
audiofilters/dtmfgen.c
\
audiofilters/msconf.c
\
audiofilters/g711.c audiofilters/g711.h
\
audiofilters/msvolume.c
\
utils/dsptools.c
\
...
...
src/android/android-display-bad.cpp
View file @
c580962d
...
...
@@ -262,7 +262,7 @@ static void *loadSymbol(void *handle, const char *symbol, int *error){
#define LIBSURFACE21_SO "libui.so"
extern
"C"
void
libmsandroiddisplaybad_init
(
void
){
extern
"C"
void
libmsandroiddisplaybad_init
(
MSFactory
*
factory
){
void
*
handle
=
dlopen
(
LIBSURFACE22_SO
,
RTLD_LAZY
);
if
(
handle
==
NULL
){
android_version
=
21
;
...
...
@@ -282,7 +282,7 @@ extern "C" void libmsandroiddisplaybad_init(void){
error
=
1
;
}
if
(
error
==
0
){
ms_f
ilter
_register
(
&
ms_android_display_bad_desc
);
ms_f
actory
_register
_filter
(
factory
,
&
ms_android_display_bad_desc
);
ms_message
(
"Android display filter (the bad one) loaded."
);
}
}
else
ms_message
(
"Could not load either "
LIBSURFACE22_SO
" or "
LIBSURFACE21_SO
);
...
...
src/android/android-display.c
View file @
c580962d
...
...
@@ -207,7 +207,7 @@ MSFilterDesc ms_android_display_desc={
};
bool_t
libmsandroiddisplay_init
(
void
){
bool_t
libmsandroiddisplay_init
(
MSFactory
*
factory
){
/*See if we can use AndroidBitmap_* symbols (only since android 2.2 normally)*/
void
*
handle
=
NULL
;
handle
=
dlopen
(
"libjnigraphics.so"
,
RTLD_LAZY
);
...
...
@@ -220,7 +220,7 @@ bool_t libmsandroiddisplay_init(void){
||
sym_AndroidBitmap_unlockPixels
==
NULL
){
ms_warning
(
"AndroidBitmap not available."
);
}
else
{
ms_f
ilter
_register
(
&
ms_android_display_desc
);
ms_f
actory
_register
_filter
(
factory
,
&
ms_android_display_desc
);
ms_message
(
"MSAndroidDisplay registered."
);
return
TRUE
;
}
...
...
src/android/android-opengl-display.c
View file @
c580962d
...
...
@@ -174,7 +174,7 @@ MSFilterDesc ms_android_opengl_display_desc={
.
methods
=
methods
};
void
libmsandroidopengldisplay_init
(
void
){
ms_f
ilter
_register
(
&
ms_android_opengl_display_desc
);
void
libmsandroidopengldisplay_init
(
MSFactory
*
factory
){
ms_f
actory
_register
_filter
(
factory
,
&
ms_android_opengl_display_desc
);