Hey sorry, i knew there was a reason behind that. Didn't see the use
of s->streams[PH_MSTREAM_AUDIO1].
I'm sorry, reverting it right now.
On Wed, Mar 01, 2006 at 03:34:18PM +0100, David Ferlier wrote:
> I forgot a part of the commit, which is replace :
>
> #define PH_MSTREAM_AUDIO1 0
> #define PH_MSTREAM_VIDEO1 1
> #define PH_MSTREAM_AUDIO2 2
> #define PH_MSTREAM_VIDEO2 3
>
> for :
>
> #define PH_MSTREAM_AUDIO1 (1 << 0)
> #define PH_MSTREAM_VIDEO1 (1 << 1)
> #define PH_MSTREAM_AUDIO2 (1 << 2)
> #define PH_MSTREAM_VIDEO2 (1 << 3)
>
> I know it's technically the same, but you see where i'm going with
> this, the shift is better placed in the define.
>
> How about i commit this too in phapi.h ?
>
> On Wed, Mar 01, 2006 at 01:52:27PM +0100, [EMAIL PROTECTED] wrote:
> > Please revert this patch , it will seriously screw things
> >
> > Vadim
> > [EMAIL PROTECTED] wrote:
> >
> > >Please, do not reply to this mailing list, use wengophone-devel instead.
> > >
> > >------------------------------------------------------------------------
> > >
> > >Author: krp
> > >Date: 2006-02-28 18:35:30 +0100 (Tue, 28 Feb 2006)
> > >New Revision: 4341
> > >
> > >Modified:
> > > wengophone-ng/trunk/wifo/phapi/phapi.c
> > > wengophone-ng/trunk/wifo/phapi/phmedia-audio.c
> > > wengophone-ng/trunk/wifo/phapi/phmedia-video.c
> > >Log:
> > >
> > >Remove the WEIRDO newstreams |= 1 << flag
> > >
> > >
> > >
> > >Modified: wengophone-ng/trunk/wifo/phapi/phapi.c
> > >===================================================================
> > >--- wengophone-ng/trunk/wifo/phapi/phapi.c 2006-02-28 16:20:32 UTC (rev
> > >4340)
> > >+++ wengophone-ng/trunk/wifo/phapi/phapi.c 2006-02-28 17:35:30 UTC (rev
> > >4341)
> > >@@ -673,7 +673,7 @@
> > >
> > >int ph_call_hasaudio(phcall_t *ca)
> > >{
> > >- if (ca->mses && (ca->mses->activestreams & (1 << PH_MSTREAM_AUDIO1)))
> > >+ if (ca->mses && (ca->mses->activestreams & (PH_MSTREAM_AUDIO1)))
> > > return 1;
> > >
> > > return 0;
> > >@@ -3134,7 +3134,7 @@
> > > struct ph_mstream_params_s *msp = &s->streams[PH_MSTREAM_VIDEO1];
> > > int ttype;
> > >
> > >- s->newstreams |= (1 << PH_MSTREAM_VIDEO1);
> > >+ s->newstreams |= (PH_MSTREAM_VIDEO1);
> > >
> > > ttype = ca->nego_mflags & (PH_STREAM_VIDEO_RX | PH_STREAM_VIDEO_RX);
> > >
> > >@@ -3176,7 +3176,7 @@
> > > {
> > > struct ph_mstream_params_s *msp = &s->streams[PH_MSTREAM_AUDIO1];
> > >
> > >- s->newstreams |= (1 << PH_MSTREAM_AUDIO1);
> > >+ s->newstreams |= (PH_MSTREAM_AUDIO1);
> > >
> > > s->dtmfCallback = ph_wegot_dtmf;
> > > s->endCallback = ph_stream_ended;
> > >
> > >Modified: wengophone-ng/trunk/wifo/phapi/phmedia-audio.c
> > >===================================================================
> > >--- wengophone-ng/trunk/wifo/phapi/phmedia-audio.c 2006-02-28 16:20:32
> > >UTC (rev 4340)
> > >+++ wengophone-ng/trunk/wifo/phapi/phmedia-audio.c 2006-02-28 17:35:30
> > >UTC (rev 4341)
> > >@@ -1715,7 +1715,7 @@
> > > newstreams = s->newstreams;
> > > s->newstreams = 0;
> > >
> > >- if (!(newstreams & (1 << PH_MSTREAM_AUDIO1)))
> > >+ if (!(newstreams & (PH_MSTREAM_AUDIO1)))
> > > {
> > > PH_MSESSION_AUDIO_UNLOCK();
> > > return 0;
> > >@@ -2054,7 +2054,7 @@
> > >
> > > sp->flags |= PH_MSTREAM_FLAG_RUNNING;
> > > sp->streamerData = stream;
> > >- s->activestreams |= (1 << PH_MSTREAM_AUDIO1);
> > >+ s->activestreams |= (PH_MSTREAM_AUDIO1);
> > >
> > > DBG4_MEDIA_ENGINE("ph_mession_audio_start: s=%08x.stream=%08x\n", s,
> > > stream,0);
> > >
> > >@@ -2294,7 +2294,7 @@
> > > phastream_t *stream = (phastream_t *) msp->streamerData;
> > > int confflags = s->confflags;
> > >
> > >- s->activestreams &= ~(1 << PH_MSTREAM_AUDIO1);
> > >+ s->activestreams &= ~(PH_MSTREAM_AUDIO1);
> > >
> > > if (confflags)
> > > ph_msession_audio_conf_stop(s->confsession, s);
> > >
> > >Modified: wengophone-ng/trunk/wifo/phapi/phmedia-video.c
> > >===================================================================
> > >--- wengophone-ng/trunk/wifo/phapi/phmedia-video.c 2006-02-28 16:20:32
> > >UTC (rev 4340)
> > >+++ wengophone-ng/trunk/wifo/phapi/phmedia-video.c 2006-02-28 17:35:30
> > >UTC (rev 4341)
> > >@@ -280,7 +280,7 @@
> > > ph_mstream_params_t *sp = &s->streams[PH_MSTREAM_VIDEO1];
> > >
> > >
> > >- if (!(s->newstreams & (1 << PH_MSTREAM_VIDEO1)))
> > >+ if (!(s->newstreams & (PH_MSTREAM_VIDEO1)))
> > > return 0;
> > >
> > > if (!sp->localport || !sp->remoteport)
> > >@@ -488,7 +488,7 @@
> > > video_stream->mbCounter = 0;
> > > video_stream->rxtstamp = 0;
> > > sp->flags |= PH_MSTREAM_FLAG_RUNNING;
> > >- s->activestreams |= (1 << PH_MSTREAM_VIDEO1);
> > >+ s->activestreams |= (PH_MSTREAM_VIDEO1);
> > >
> > >
> > >
> > >@@ -1083,10 +1083,10 @@
> > > struct ph_mstream_params_s *msp = &s->streams[PH_MSTREAM_VIDEO1];
> > > phvstream_t *stream = (phvstream_t *) msp->streamerData;
> > >
> > >- if (!(s->activestreams & (1 << PH_MSTREAM_VIDEO1)))
> > >+ if (!(s->activestreams & (PH_MSTREAM_VIDEO1)))
> > > return;
> > >
> > >- s->activestreams &= ~(1 << PH_MSTREAM_VIDEO1);
> > >+ s->activestreams &= ~(PH_MSTREAM_VIDEO1);
> > >
> > >
> > > if (!stream)
> > >
> > >
> > >
> > >------------------------------------------------------------------------
> > >
> > >_______________________________________________
> > >Wengophone-commit mailing list
> > >[EMAIL PROTECTED]
> > >http://dev.openwengo.com/mailman/listinfo/wengophone-commit
> > >
> > >
>
> > _______________________________________________
> > Wengophone-devel mailing list
> > [email protected]
> > http://dev.openwengo.com/mailman/listinfo/wengophone-devel
>
> --
> David Ferlier -- [EMAIL PROTECTED]
>
> "Humor is mankind's greatest blessing."
> -- Mark Twain
> _______________________________________________
> Wengophone-devel mailing list
> [email protected]
> http://dev.openwengo.com/mailman/listinfo/wengophone-devel
--
David Ferlier -- [EMAIL PROTECTED]
"Humor is mankind's greatest blessing."
-- Mark Twain
_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel