* #36737: switch back to svn repo, remove assert in sip_transaction.c
diff --git a/jni/pjproject-android/.svn/pristine/a3/a3bf29473aaf4a239c1d1cd2d42cead1a190dcfc.svn-base b/jni/pjproject-android/.svn/pristine/a3/a3bf29473aaf4a239c1d1cd2d42cead1a190dcfc.svn-base
new file mode 100644
index 0000000..d1df5b2
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a3/a3bf29473aaf4a239c1d1cd2d42cead1a190dcfc.svn-base
@@ -0,0 +1,162 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * 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 __PJSIP_SIP_UA_LAYER_H__
+#define __PJSIP_SIP_UA_LAYER_H__
+
+/**
+ * @file sip_ua_layer.h
+ * @brief SIP User Agent Layer Module
+ */
+#include <pjsip/sip_types.h>
+
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_UA Base User Agent Layer/Common Dialog Layer
+ * @brief Dialog management.
+ *
+ * This module provides basic dialog management, which is used by higher
+ * layer dialog usages such as INVITE sessions and SIP Event Subscription
+ * framework (RFC 3265). Application should link with <b>pjsip-core</b>
+ * library to use this base UA layer. The base UA layer module is initialized
+ * with #pjsip_ua_init_module().
+ */
+
+/**
+ * @defgroup PJSUA_UA SIP User Agent Module
+ * @ingroup PJSIP_UA
+ * @brief Provides dialog management.
+ * @{
+ *
+ * Application MUST initialize the user agent layer module by calling
+ * #pjsip_ua_init_module() before using any of the dialog API, and link
+ * the application with with <b>pjsip-core</b> library.
+ */
+
+/** User agent initialization parameter. */
+typedef struct pjsip_ua_init_param
+{
+ /** Callback to be called when the UA layer detects that outgoing
+ * dialog has forked.
+ */
+ pjsip_dialog* (*on_dlg_forked)(pjsip_dialog *first_set, pjsip_rx_data *res);
+} pjsip_ua_init_param;
+
+/**
+ * Initialize user agent layer and register it to the specified endpoint.
+ *
+ * @param endpt The endpoint where the user agent will be
+ * registered.
+ * @param prm UA initialization parameter.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_ua_init_module(pjsip_endpoint *endpt,
+ const pjsip_ua_init_param *prm);
+
+/**
+ * Get the instance of the user agent.
+ *
+ * @return The user agent module instance.
+ */
+PJ_DECL(pjsip_user_agent*) pjsip_ua_instance(void);
+
+
+/**
+ * Retrieve the current number of dialog-set currently registered
+ * in the hash table. Note that dialog-set is different than dialog
+ * when the request forks. In this case, all dialogs created from
+ * the original request will belong to the same dialog set. When
+ * no forking occurs, the number of dialog sets will be equal to
+ * the number of dialogs.
+ *
+ * @return Number of dialog sets.
+ */
+PJ_DECL(pj_uint32_t) pjsip_ua_get_dlg_set_count(void);
+
+
+/**
+ * Find a dialog with the specified Call-ID and tags properties. This
+ * function may optionally lock the matching dialog instance before
+ * returning it back to the caller.
+ *
+ * @param call_id The call ID to be matched.
+ * @param local_tag The local tag to be matched.
+ * @param remote_tag The remote tag to be matched.
+ * @param lock_dialog If non-zero, instruct the function to lock the
+ * matching dialog with #pjsip_dlg_inc_lock().
+ * Application is responsible to release the dialog's
+ * lock after it has finished manipulating the dialog,
+ * by calling #pjsip_dlg_dec_lock().
+ *
+ * @return The matching dialog instance, or NULL if no matching
+ * dialog is found.
+ */
+PJ_DECL(pjsip_dialog*) pjsip_ua_find_dialog(const pj_str_t *call_id,
+ const pj_str_t *local_tag,
+ const pj_str_t *remote_tag,
+ pj_bool_t lock_dialog);
+
+/**
+ * Destroy the user agent layer.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_ua_destroy(void);
+
+/**
+ * Dump user agent contents (e.g. all dialogs).
+ *
+ * @param detail If non-zero, list of dialogs will be printed.
+ */
+PJ_DECL(void) pjsip_ua_dump(pj_bool_t detail);
+
+/**
+ * Get the endpoint instance of a user agent module.
+ *
+ * @param ua The user agent instance.
+ *
+ * @return The endpoint instance where the user agent is
+ * registered.
+ */
+PJ_DECL(pjsip_endpoint*) pjsip_ua_get_endpt(pjsip_user_agent *ua);
+
+
+/**
+ * @}
+ */
+
+
+/*
+ * Internal (called by sip_dialog.c).
+ */
+
+PJ_DECL(pj_status_t) pjsip_ua_register_dlg( pjsip_user_agent *ua,
+ pjsip_dialog *dlg );
+PJ_DECL(pj_status_t) pjsip_ua_unregister_dlg(pjsip_user_agent *ua,
+ pjsip_dialog *dlg );
+
+
+PJ_END_DECL
+
+
+#endif /* __PJSIP_SIP_UA_LAYER_H__ */
+
diff --git a/jni/pjproject-android/.svn/pristine/a3/a3d5bf2a2b910c19fa6ae93d5420fe1ed8dab942.svn-base b/jni/pjproject-android/.svn/pristine/a3/a3d5bf2a2b910c19fa6ae93d5420fe1ed8dab942.svn-base
new file mode 100644
index 0000000..60fcfd8
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a3/a3d5bf2a2b910c19fa6ae93d5420fe1ed8dab942.svn-base
@@ -0,0 +1 @@
+#include "../../../portaudio/src/common/pa_endianness.h"
diff --git a/jni/pjproject-android/.svn/pristine/a3/a3db0d40d9893ef404a6811ee9b4f371f113afa0.svn-base b/jni/pjproject-android/.svn/pristine/a3/a3db0d40d9893ef404a6811ee9b4f371f113afa0.svn-base
new file mode 100644
index 0000000..1b5b335
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a3/a3db0d40d9893ef404a6811ee9b4f371f113afa0.svn-base
@@ -0,0 +1,152 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * 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 __PJ_SELECT_H__
+#define __PJ_SELECT_H__
+
+/**
+ * @file sock_select.h
+ * @brief Socket select().
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_SOCK_SELECT Socket select() API.
+ * @ingroup PJ_IO
+ * @{
+ * This module provides portable abstraction for \a select() like API.
+ * The abstraction is needed so that it can utilize various event
+ * dispatching mechanisms that are available across platforms.
+ *
+ * The API is very similar to normal \a select() usage.
+ *
+ * \section pj_sock_select_examples_sec Examples
+ *
+ * For some examples on how to use the select API, please see:
+ *
+ * - \ref page_pjlib_select_test
+ */
+
+/**
+ * Portable structure declarations for pj_fd_set.
+ * The implementation of pj_sock_select() does not use this structure
+ * per-se, but instead it will use the native fd_set structure. However,
+ * we must make sure that the size of pj_fd_set_t can accomodate the
+ * native fd_set structure.
+ */
+typedef struct pj_fd_set_t
+{
+ pj_sock_t data[PJ_IOQUEUE_MAX_HANDLES+ 4]; /**< Opaque buffer for fd_set */
+} pj_fd_set_t;
+
+
+/**
+ * Initialize the descriptor set pointed to by fdsetp to the null set.
+ *
+ * @param fdsetp The descriptor set.
+ */
+PJ_DECL(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp);
+
+
+/**
+ * This is an internal function, application shouldn't use this.
+ *
+ * Get the number of descriptors in the set. This is defined in sock_select.c
+ * This function will only return the number of sockets set from PJ_FD_SET
+ * operation. When the set is modified by other means (such as by select()),
+ * the count will not be reflected here.
+ *
+ * @param fdsetp The descriptor set.
+ *
+ * @return Number of descriptors in the set.
+ */
+PJ_DECL(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp);
+
+
+/**
+ * Add the file descriptor fd to the set pointed to by fdsetp.
+ * If the file descriptor fd is already in this set, there shall be no effect
+ * on the set, nor will an error be returned.
+ *
+ * @param fd The socket descriptor.
+ * @param fdsetp The descriptor set.
+ */
+PJ_DECL(void) PJ_FD_SET(pj_sock_t fd, pj_fd_set_t *fdsetp);
+
+/**
+ * Remove the file descriptor fd from the set pointed to by fdsetp.
+ * If fd is not a member of this set, there shall be no effect on the set,
+ * nor will an error be returned.
+ *
+ * @param fd The socket descriptor.
+ * @param fdsetp The descriptor set.
+ */
+PJ_DECL(void) PJ_FD_CLR(pj_sock_t fd, pj_fd_set_t *fdsetp);
+
+
+/**
+ * Evaluate to non-zero if the file descriptor fd is a member of the set
+ * pointed to by fdsetp, and shall evaluate to zero otherwise.
+ *
+ * @param fd The socket descriptor.
+ * @param fdsetp The descriptor set.
+ *
+ * @return Nonzero if fd is member of the descriptor set.
+ */
+PJ_DECL(pj_bool_t) PJ_FD_ISSET(pj_sock_t fd, const pj_fd_set_t *fdsetp);
+
+
+/**
+ * This function wait for a number of file descriptors to change status.
+ * The behaviour is the same as select() function call which appear in
+ * standard BSD socket libraries.
+ *
+ * @param n On Unices, this specifies the highest-numbered
+ * descriptor in any of the three set, plus 1. On Windows,
+ * the value is ignored.
+ * @param readfds Optional pointer to a set of sockets to be checked for
+ * readability.
+ * @param writefds Optional pointer to a set of sockets to be checked for
+ * writability.
+ * @param exceptfds Optional pointer to a set of sockets to be checked for
+ * errors.
+ * @param timeout Maximum time for select to wait, or null for blocking
+ * operations.
+ *
+ * @return The total number of socket handles that are ready, or
+ * zero if the time limit expired, or -1 if an error occurred.
+ */
+PJ_DECL(int) pj_sock_select( int n,
+ pj_fd_set_t *readfds,
+ pj_fd_set_t *writefds,
+ pj_fd_set_t *exceptfds,
+ const pj_time_val *timeout);
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+#endif /* __PJ_SELECT_H__ */
diff --git a/jni/pjproject-android/.svn/pristine/a3/a3f023e00e027b69290015ea4bed238c3d04ba35.svn-base b/jni/pjproject-android/.svn/pristine/a3/a3f023e00e027b69290015ea4bed238c3d04ba35.svn-base
new file mode 100644
index 0000000..c16a7a1
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a3/a3f023e00e027b69290015ea4bed238c3d04ba35.svn-base
Binary files differ
diff --git a/jni/pjproject-android/.svn/pristine/a3/a3f110234d57b62f378c741f85efdb4d993832ad.svn-base b/jni/pjproject-android/.svn/pristine/a3/a3f110234d57b62f378c741f85efdb4d993832ad.svn-base
new file mode 100644
index 0000000..830259d
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/a3/a3f110234d57b62f378c741f85efdb4d993832ad.svn-base
@@ -0,0 +1,242 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.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
+ */
+
+#include <pjmedia-videodev/config.h>
+
+
+#if defined(PJMEDIA_VIDEO_DEV_HAS_DSHOW) && PJMEDIA_VIDEO_DEV_HAS_DSHOW != 0
+
+
+#include <assert.h>
+#include <streams.h>
+
+typedef void (*input_callback)(void *user_data, IMediaSample *pMediaSample);
+
+const GUID CLSID_NullRenderer = {0xF9168C5E, 0xCEB2, 0x4FAA, {0xB6, 0xBF,
+ 0x32, 0x9B, 0xF3, 0x9F, 0xA1, 0xE4}};
+
+const GUID CLSID_SourceFilter = {0xF9168C5E, 0xCEB2, 0x4FAA, {0xB6, 0xBF,
+ 0x32, 0x9B, 0xF3, 0x9F, 0xA1, 0xE5}};
+
+class NullRenderer: public CBaseRenderer
+{
+public:
+ NullRenderer(HRESULT *pHr);
+ virtual ~NullRenderer();
+
+ virtual HRESULT CheckMediaType(const CMediaType *pmt);
+ virtual HRESULT DoRenderSample(IMediaSample *pMediaSample);
+
+ input_callback input_cb;
+ void *user_data;
+};
+
+class OutputPin: public CBaseOutputPin
+{
+public:
+ OutputPin(CBaseFilter *pFilter, CCritSec *pLock, HRESULT *pHr);
+ ~OutputPin();
+
+ HRESULT Push(void *buf, long size);
+
+ virtual HRESULT CheckMediaType(const CMediaType *pmt);
+ virtual HRESULT DecideBufferSize(IMemAllocator *pAlloc,
+ ALLOCATOR_PROPERTIES *ppropInputRequest);
+
+ CMediaType mediaType;
+ long bufSize;
+};
+
+class SourceFilter: public CBaseFilter
+{
+public:
+ SourceFilter();
+ ~SourceFilter();
+
+ int GetPinCount();
+ CBasePin* GetPin(int n);
+
+protected:
+ CCritSec lock;
+ OutputPin* outPin;
+};
+
+OutputPin::OutputPin(CBaseFilter *pFilter, CCritSec *pLock, HRESULT *pHr):
+ CBaseOutputPin("OutputPin", pFilter, pLock, pHr, L"OutputPin")
+{
+}
+
+OutputPin::~OutputPin()
+{
+}
+
+HRESULT OutputPin::CheckMediaType(const CMediaType *pmt)
+{
+ return S_OK;
+}
+
+HRESULT OutputPin::DecideBufferSize(IMemAllocator *pAlloc,
+ ALLOCATOR_PROPERTIES *ppropInputRequest)
+{
+ ALLOCATOR_PROPERTIES properties;
+
+ ppropInputRequest->cbBuffer = bufSize;
+ ppropInputRequest->cBuffers = 1;
+
+ /* First set the buffer descriptions we're interested in */
+ pAlloc->SetProperties(ppropInputRequest, &properties);
+
+ return S_OK;
+}
+
+HRESULT OutputPin::Push(void *buf, long size)
+{
+ HRESULT hr;
+ IMediaSample *pSample;
+ VIDEOINFOHEADER *vi;
+ AM_MEDIA_TYPE *pmt;
+ BYTE *dst_buf;
+
+ /**
+ * Hold the critical section here as the pin might get disconnected
+ * during the Deliver() method call.
+ */
+ m_pLock->Lock();
+
+ hr = GetDeliveryBuffer(&pSample, NULL, NULL, 0);
+ if (FAILED(hr))
+ goto on_error;
+
+ pSample->GetMediaType(&pmt);
+ if (pmt) {
+ mediaType.Set(*pmt);
+ bufSize = pmt->lSampleSize;
+ }
+
+ pSample->GetPointer(&dst_buf);
+ vi = (VIDEOINFOHEADER *)mediaType.pbFormat;
+ if (vi->rcSource.right == vi->bmiHeader.biWidth) {
+ assert(pSample->GetSize() >= size);
+ memcpy(dst_buf, buf, size);
+ } else {
+ unsigned i, bpp;
+ unsigned dststride, srcstride;
+ BYTE *src_buf = (BYTE *)buf;
+
+ bpp = size / abs(vi->bmiHeader.biHeight) / vi->rcSource.right;
+ dststride = vi->bmiHeader.biWidth * bpp;
+ srcstride = vi->rcSource.right * bpp;
+ for (i = abs(vi->bmiHeader.biHeight); i > 0; i--) {
+ memcpy(dst_buf, src_buf, srcstride);
+ dst_buf += dststride;
+ src_buf += srcstride;
+ }
+ }
+ pSample->SetActualDataLength(size);
+
+ hr = Deliver(pSample);
+
+ pSample->Release();
+
+on_error:
+ m_pLock->Unlock();
+ return hr;
+}
+
+SourceFilter::SourceFilter(): CBaseFilter("SourceFilter", NULL, &lock,
+ CLSID_SourceFilter)
+{
+ HRESULT hr;
+ outPin = new OutputPin(this, &lock, &hr);
+}
+
+SourceFilter::~SourceFilter()
+{
+}
+
+int SourceFilter::GetPinCount()
+{
+ return 1;
+}
+
+CBasePin* SourceFilter::GetPin(int n)
+{
+ return outPin;
+}
+
+NullRenderer::NullRenderer(HRESULT *pHr): CBaseRenderer(CLSID_NullRenderer,
+ "NullRenderer",
+ NULL, pHr)
+{
+ input_cb = NULL;
+}
+
+NullRenderer::~NullRenderer()
+{
+}
+
+HRESULT NullRenderer::CheckMediaType(const CMediaType *pmt)
+{
+ return S_OK;
+}
+
+HRESULT NullRenderer::DoRenderSample(IMediaSample *pMediaSample)
+{
+ if (input_cb)
+ input_cb(user_data, pMediaSample);
+
+ return S_OK;
+}
+
+extern "C" IBaseFilter* NullRenderer_Create(input_callback input_cb,
+ void *user_data)
+{
+ HRESULT hr;
+ NullRenderer *renderer = new NullRenderer(&hr);
+ renderer->AddRef();
+ renderer->input_cb = input_cb;
+ renderer->user_data = user_data;
+
+ return (CBaseFilter *)renderer;
+}
+
+extern "C" IBaseFilter* SourceFilter_Create(SourceFilter **pSrc)
+{
+ SourceFilter *src = new SourceFilter();
+ src->AddRef();
+ *pSrc = src;
+
+ return (CBaseFilter *)src;
+}
+
+extern "C" HRESULT SourceFilter_Deliver(SourceFilter *src,
+ void *buf, long size)
+{
+ return ((OutputPin *)src->GetPin(0))->Push(buf, size);
+}
+
+extern "C" void SourceFilter_SetMediaType(SourceFilter *src,
+ AM_MEDIA_TYPE *pmt)
+{
+ ((OutputPin *)src->GetPin(0))->mediaType.Set(*pmt);
+ ((OutputPin *)src->GetPin(0))->bufSize = pmt->lSampleSize;
+}
+
+
+#endif /* PJMEDIA_VIDEO_DEV_HAS_DSHOW */