Commit df9cac52 authored by unknown's avatar unknown

vs project file rework

parent 429baf42
......@@ -64,8 +64,6 @@ MSFilterDesc * ms_filter_descs[]={
&ms_tee_desc,
&ms_void_sink_desc,
&ms_conf_desc,
&ms_v4w_desc,
&ms_video_out_desc,
&ms_h263_old_enc_desc,
&ms_h263_old_dec_desc,
&ms_h263_enc_desc,
......@@ -87,7 +85,6 @@ MSFilterDesc * ms_filter_descs[]={
&ms_volume_desc,
&ms_static_image_desc,
&ms_mire_desc,
&ms_vfw_desc,
&ms_ice_desc,
&ms_equalizer_desc,
&ms_dd_display_desc,
......
......@@ -65,11 +65,6 @@ EXPORTS
ms_load_plugins
ms_display_new
ms_display_set_window_id
ms_display_desc_set_default
ms_display_destroy
video_preview_stop
video_preview_start
video_stream_new
......

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mediastreamer2", "mediastreamer2.vcproj", "{4A07BB2B-F56E-4F1B-A729-D28B782AC128}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4A07BB2B-F56E-4F1B-A729-D28B782AC128}.Debug|Win32.ActiveCfg = Debug|Win32
{4A07BB2B-F56E-4F1B-A729-D28B782AC128}.Debug|Win32.Build.0 = Debug|Win32
{4A07BB2B-F56E-4F1B-A729-D28B782AC128}.Release|Win32.ActiveCfg = Release|Win32
{4A07BB2B-F56E-4F1B-A729-D28B782AC128}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="9,00"
Name="mediastreamer2"
ProjectGUID="{4A07BB2B-F56E-4F1B-A729-D28B782AC128}"
RootNamespace="mediastreamer2"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
......@@ -41,16 +42,16 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\portaudio\include;&quot;..\..\..\win32-bin\include\baseclasses&quot;;&quot;..\..\..\win32-bin\include&quot;;.;..\..\..\mediastreamer2\include;..\..\..\oRTP\include;..\..\..\codecs\speex\include;..\..\..\codecs\gsm\inc"
PreprocessorDefinitions="__DIRECTSOUND_ENABLED__;__STDC_CONSTANT_MACROS;HAVE_LIBSWSCALE_SWSCALE_H;HAVE_LIBAVCODEC_AVCODEC_H;HAVE_SPEEXDSP;HAVE_DIRECTSHOW;VIDEO_ENABLED;AMD_HACK;ORTP_INET6;WIN32;_DEBUG;_WINDOWS;_USRDLL;MEDIASTREAMER2_EXPORTS;WINDOW_NATIVE;_CRT_SECURE_NO_DEPRECATE"
AdditionalIncludeDirectories="..\..\include;..\..\..\oRTP\include;.;&quot;..\..\..\linphone-deps\include&quot;"
PreprocessorDefinitions="__STDC_CONSTANT_MACROS;HAVE_LIBSWSCALE_SWSCALE_H;HAVE_LIBAVCODEC_AVCODEC_H;HAVE_SPEEXDSP;HAVE_DIRECTSHOW;VIDEO_ENABLED;ORTP_INET6;WIN32;_DEBUG;_WINDOWS;_USRDLL;MEDIASTREAMER2_EXPORTS;WINDOW_NATIVE;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)/libmediastreamer2.pdb"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="2"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
......@@ -63,15 +64,17 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="swscale.lib avcodec-52.lib quartz.lib dmoguids.lib strmiids.lib strmbasd.lib libtheora.lib vfw32.lib Ws2_32.lib Winmm.lib ortp.lib libspeexd.lib libspeexdspd.lib libcmtd.lib"
AdditionalDependencies="libavcodec.dll.a libswscale.dll.a libogg.dll.a libtheora.a vfw32.lib Ws2_32.lib Winmm.lib ortp.lib libspeex.a libspeexdsp.a libgsm.a libmingw32.a libgcc.a"
OutputFile="$(IntDir)/mediastreamer2.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\..\win32-bin\lib,&quot;..\..\..\oRTP\build\win32native\debug&quot;,..\..\..\codecs\speex\lib"
IgnoreAllDefaultLibraries="true"
AdditionalLibraryDirectories="&quot;..\..\..\linphone-deps\lib&quot;;..\..\..\oRTP\build\win32native\debug"
IgnoreAllDefaultLibraries="false"
ModuleDefinitionFile="mediastreamer2.def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/mediastreamer2.pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(IntDir)/mediastreamer2.lib"
TargetMachine="1"
/>
......@@ -93,9 +96,6 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
......@@ -156,6 +156,8 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(IntDir)/mediastreamer2.lib"
TargetMachine="1"
/>
......@@ -177,9 +179,6 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
......@@ -221,10 +220,6 @@
RelativePath="..\..\src\dtmfgen.c"
>
</File>
<File
RelativePath="..\..\src\dxfilter.cpp"
>
</File>
<File
RelativePath="..\..\src\equalizer.c"
>
......@@ -265,6 +260,18 @@
RelativePath="..\..\src\msconf.c"
>
</File>
<File
RelativePath="..\..\src\msdscap-mingw.cc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\msfileplayer_win.c"
>
......@@ -361,10 +368,6 @@
RelativePath="..\..\src\videoenc.c"
>
</File>
<File
RelativePath="..\..\src\videoout.c"
>
</File>
<File
RelativePath="..\..\src\videostream.c"
>
......@@ -374,19 +377,7 @@
>
</File>
<File
RelativePath="..\..\src\winsnd2.c"
>
</File>
<File
RelativePath="..\..\src\winsndds.cpp"
>
</File>
<File
RelativePath="..\..\src\winvideo2.c"
>
</File>
<File
RelativePath="..\..\src\winvideods.c"
RelativePath="..\..\src\winsnd3.c"
>
</File>
</Filter>
......
......@@ -471,7 +471,7 @@ static void dd_display_process(MSFilter *f){
goto end;
}
if (GetClientRect(obj->window,&rect)==0
if (GetClientRect(obj->window,&rect)==0
|| rect.right<=32 || rect.bottom<=32) goto end;
wsize.width=rect.right;
......
......@@ -245,9 +245,9 @@ static void word16_to_int16(const ms_word16_t *w, int16_t *is, int l){
#endif
static void equalizer_state_run(EqualizerState *s, int16_t *samples, int nsamples){
ms_word16_t *w;
if (s->needs_update)
equalizer_state_compute_impulse_response(s);
ms_word16_t *w;
INT16_TO_WORD16(samples,w,nsamples);
ms_fir_mem16(w,s->fir,w,nsamples,s->fir_len,s->mem);
WORD16_TO_INT16(w,samples,nsamples);
......
......@@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer-config.h"
#endif
#include <ortp/port.h>
#if defined(HAVE_LIBAVCODEC_AVCODEC_H)
/* new layout */
# include <libavcodec/avcodec.h>
......
......@@ -88,10 +88,10 @@ static void enc_process(MSFilter *f){
ms_bufferizer_put(s->bufferizer,im);
}
while(ms_bufferizer_get_avail(s->bufferizer) >= buff_size) {
mblk_t *om=allocb(33*s->ptime/20,0);
buff = (int16_t *)alloca(buff_size);
ms_bufferizer_read(s->bufferizer,(uint8_t*)buff,buff_size);
mblk_t *om=allocb(33*s->ptime/20,0);
for (offset=0;offset<buff_size;offset+=unitary_buff_size) {
gsm_encode(s->state,(gsm_signal*)&buff[offset/sizeof(int16_t)],(gsm_byte*)om->b_wptr);
om->b_wptr+=33;
......
......@@ -479,11 +479,12 @@ extern MSWebCamDesc v4l2_card_desc;
#ifdef WIN32
extern MSWebCamDesc ms_vfw_cam_desc;
#endif
#if defined(WIN32) && defined(HAVE_DIRECTSHOW)
extern MSWebCamDesc ms_directx_cam_desc;
#endif
#ifdef __MINGW32__
#if defined(__MINGW32__) || defined (HAVE_DIRECTSHOW)
extern MSWebCamDesc ms_dshow_cam_desc;
#endif
......@@ -503,13 +504,10 @@ static MSWebCamDesc * ms_web_cam_descs[]={
#ifdef __linux
&v4l_desc,
#endif
#if defined(WIN32) && defined(HAVE_DIRECTSHOW)
&ms_directx_cam_desc,
#endif
#if defined(WIN32) && defined(HAVE_VFW)
&ms_vfw_cam_desc,
#endif
#ifdef __MINGW32__
#if defined(__MINGW32__) || defined (HAVE_DIRECTSHOW)
&ms_dshow_cam_desc,
#endif
#ifdef __APPLE__
......
......@@ -25,19 +25,14 @@ He wrote all the declarations missing to get directshow capture working
with mingw, and provided a demo code that worked great with minimal code.
*/
#include <windows.h>
#include <winnls.h>
#include <errors.h>
#include <initguid.h>
#include <ocidl.h>
#include <mediastreamer2/mswebcam.h>
#include <mediastreamer2/msfilter.h>
#include <mediastreamer2/msticker.h>
#include <mediastreamer2/msvideo.h>
#include <initguid.h>
#include <ocidl.h>
template <typename _ComT>
class ComPtr{
private:
......@@ -148,10 +143,23 @@ DEFINE_GUID( MEDIASUBTYPE_UYVY, 0x59565955, 0x0000, 0x0010,
DEFINE_GUID( MEDIASUBTYPE_RGB24, 0xe436eb7d, 0x524f, 0x11ce,
0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 );
using namespace std;
typedef LONGLONG REFERENCE_TIME;
#ifndef DECLARE_ENUMERATOR_
#define DECLARE_ENUMERATOR_(I,T) \
DECLARE_INTERFACE_(I,IUnknown) \
{ \
STDMETHOD(QueryInterface)(I*, REFIID,PVOID*); \
STDMETHOD_(ULONG,AddRef)(); \
STDMETHOD_(ULONG,Release)(); \
virtual HRESULT STDMETHODCALLTYPE Next(ULONG,T*,ULONG*);\
STDMETHOD(Skip)(I*, ULONG); \
STDMETHOD(Reset)(I*); \
STDMETHOD(Clone)(I*, I**); \
}
#endif
typedef struct tagVIDEOINFOHEADER {
RECT rcSource;
RECT rcTarget;
......@@ -524,7 +532,8 @@ public:
DSCapture(){
qinit(&_rq);
ms_mutex_init(&_mutex,NULL);
_vsize=MS_VIDEO_SIZE_CIF;
_vsize.width=MS_VIDEO_SIZE_CIF_W;
_vsize.height=MS_VIDEO_SIZE_CIF_H;
_fps=15;
_start_time=0;
_frame_count=0;
......@@ -675,7 +684,7 @@ static char * fourcc_to_char(char *str, uint32_t fcc){
static int find_best_format(ComPtr<IAMStreamConfig> streamConfig, int count, MSVideoSize *requested_size, MSPixFmt requested_fmt ){
int i;
MSVideoSize best_found=(MSVideoSize){32768,32768};
MSVideoSize best_found={32768,32768};
int best_index=-1;
char fccstr[5];
char selected_fcc[5];
......@@ -1022,7 +1031,7 @@ static MSFilter * ms_dshow_create_reader(MSWebCam *obj){
return f;
}
MSWebCamDesc ms_dshow_cam_desc={
extern "C" MSWebCamDesc ms_dshow_cam_desc={
"Directshow capture",
&ms_dshow_detect,
NULL,
......
......@@ -22,6 +22,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/msvideo.h"
#include <string.h>
#ifdef WIN32
#include <malloc.h> /* for alloca */
#endif
MSQueue * ms_queue_new(struct _MSFilter *f1, int pin1, struct _MSFilter *f2, int pin2 ){
MSQueue *q=(MSQueue*)ms_new(MSQueue,1);
qinit(&q->q);
......
......@@ -328,7 +328,7 @@ void ms_yuv_buf_mirror(YuvBuf *buf)
{
ms_swscale_desc.yuv_buf_mirror=(yuv_buf_mirrorFunc)yuv_buf_mirror;
}
return ms_swscale_desc.yuv_buf_mirror(buf);
ms_swscale_desc.yuv_buf_mirror(buf);
}
void ms_yuv_buf_copy(uint8_t *src_planes[], const int src_strides[],
......@@ -338,7 +338,7 @@ void ms_yuv_buf_copy(uint8_t *src_planes[], const int src_strides[],
{
ms_swscale_desc.yuv_buf_copy=(yuv_buf_copyFunc)yuv_buf_copy;
}
return ms_swscale_desc.yuv_buf_copy(src_planes, src_strides, dst_planes, dst_strides, roi);
ms_swscale_desc.yuv_buf_copy(src_planes, src_strides, dst_planes, dst_strides, roi);
}
void ms_video_set_video_func(struct ms_swscaleDesc *_ms_swscale_desc)
......
......@@ -1570,6 +1570,8 @@ mblk_t *ms_load_generate_yuv(MSVideoSize *reqsize)
{
YuvBuf buf;
mblk_t *m=NULL;
int ysize;
#ifndef MS2_MINIMAL_SIZE
m=jpeg2yuv((uint8_t*)&def_mire,sizeof(def_mire),reqsize);
if (m!=NULL)
......@@ -1579,7 +1581,7 @@ mblk_t *ms_load_generate_yuv(MSVideoSize *reqsize)
#endif
m = yuv_buf_alloc(&buf, reqsize->width, reqsize->height);
int ysize=buf.strides[0]*buf.h;
ysize=buf.strides[0]*buf.h;
memset(buf.planes[0],16,ysize);
memset(buf.planes[1],128,ysize/4);
memset(buf.planes[2],128,ysize/4);
......
......@@ -256,11 +256,12 @@ void rfc3984_unpack(Rfc3984Context *ctx, mblk_t *im, MSQueue *out){
if (im->b_cont) msgpullup(im,-1);
if (type==TYPE_STAP_A){
ms_debug("Receiving STAP-A");
/*split into nalus*/
uint16_t sz;
uint8_t *buf=(uint8_t*)&sz;
mblk_t *nal;
ms_debug("Receiving STAP-A");
for(p=im->b_rptr+1;p<im->b_wptr;){
buf[0]=p[0];
buf[1]=p[1];
......@@ -279,8 +280,8 @@ void rfc3984_unpack(Rfc3984Context *ctx, mblk_t *im, MSQueue *out){
}
freemsg(im);
}else if (type==TYPE_FU_A){
ms_debug("Receiving FU-A");
mblk_t *o=aggregate_fua(ctx,im);
ms_debug("Receiving FU-A");
if (o) ms_queue_put(&ctx->q,o);
}else{
if (ctx->m){
......
......@@ -21,11 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer-config.h"
#endif
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
#include <libavcodec/avcodec.h>
#else
#include <ffmpeg/avcodec.h>
#endif
#include "ffmpeg-priv.h"
#include "mediastreamer2/msfilter.h"
#include "mediastreamer2/msvideo.h"
......
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