Monday, December 14, 2009

Getting Started With Silverlight

Hello To All.

As i always try to help my friends by giving them source code and links to tutorial
so that they can start doing work easily and more quickly.
Here i have i link of video in which you will come to know how to start with Silverlight application:

http://silverlight.net/learn/videos/silverlight-videos/getting-started-with-silverlight-development/

Thursday, November 5, 2009

The calling thread cannot access the object because different thread owns it

Hello Friends as i have mentioned the error in the Title has been solved.I m posting it on the net so that you can get help from it.Please also see the links given below.

///
/// This method is getting voice input from microphone
/// Hardeep Bhullar
/// 1/11/2009
///
///
/// Description Of Change
///

private void Voice_In()
{
try
{
bool firstTime = true;
_sendingPortText = (string)this.Dispatcher.Invoke(new Func(() => this.TextBoxSendingPort.Text));
byte[] br;
//this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(() =>
//{
_socket.Bind(new IPEndPoint(IPAddress.Any, int.Parse(_sendingPortText)));
//}));
while (true)
{
br = new byte[16384];
if (firstTime)
{
firstTime = false;
//Thread.Sleep(250);
}

_socket.Receive(br);
m_Fifo.Write(br, 0, br.Length);
}
}
catch (Exception ex) { }
}

///
/// This method is passing out the recorded voice to the speakers
/// Hardeep Bhullar
/// 1/11/2009
///
///
/// Description Of Change
///

private void Voice_Out(IntPtr data, int size)
{
try
{
string strOtherMachineIP = (string)this.Dispatcher.Invoke(new Func(() => this.TextBox1.Text));
//for Recorder
if (m_RecBuffer == null || m_RecBuffer.Length < size)
m_RecBuffer = new byte[size];
System.Runtime.InteropServices.Marshal.Copy(data, m_RecBuffer, 0, size);
IPEndPoint m_endPoint;
//this.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() =>
//{
//Microphone ==> data ==> m_RecBuffer ==> m_Fifo
//get the end point.
m_endPoint = new IPEndPoint(IPAddress.Parse(strOtherMachineIP), int.Parse(_sendingPortText));
// _socket.SendTo(m_RecBuffer, new IPEndPoint(IPAddress.Parse(strOtherMachineIP), int.Parse(sendingPortText)));
_socket.SendTo(m_RecBuffer, m_endPoint);
//}
//));
}
catch (Exception Ex) { }
}

http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/885d6b03-0699-472b-867b-e526c93d8fb8/

Tuesday, October 27, 2009

Peer To Peer Video Streaming C#

Hello To All,


This is my first blog on P2P Streaming.When i started working on it i found it very hard but later
i felt easy and continued my development.Now i m able to capture from webcam .I can broadcast my webcam to the persons who are in my mesh or group. But the problem comes when i try to view another webcam on my application ,Stream gets mixed it shows mixed stream of two webcam 's .I googled, researched and worked very hard to get a way but no gain.So i decided to post a blog on P2P Streaming.

I m developing my application in WPF Browser Application.
*Certificate problem is there it should be installed automatically right now i have to install it manually.
Please help me to get the best solution.

Thanks ans Best Regards
Hardeep Singh Bhullar