Spacer
Spacer

NGCODERS.COM

[ NEXT GENERATION CODERS ]

Spacer

Archive for the 'Uncategorized' Category

Slow Wifi Internet and Youtube on Iphone/Ipod touch

Ipod touch 32 GB 3G seem to have issues with Wifi for me , and after searching on Google it looks like a common issue. But a lot of solutions offered online did not work for me. Though the speedtest.net App reported 3 Mbps + of download speed , Apps took ages to install and Youtube simply refused to play and buffered forever.

After trying various methods found online esp changing Wifi from g to b , which i did not want and changing some wifi settings and packet sizes. It did not resolve.

What i found worked for me was using a simple Proxy on my PC and connecting my Iphone to internet using that proxy. Everything seemed to work fine through the proxy ( but i have to keep my PC on ). Youtube plays without buffering, apps install within a few seconds and surfing is really fast.

The proxy i used was free proxy .

Thought might help someone since other techniques online did not resolve the issue for me.

BTW launchcast plays well on my Ipod touch in India , while it does not on normal PC due to ip restriction :) .

Capturing Video on windows using C++

Using Webcam on windows should be easy, that is what i thought when i started out and wasted three days trying to get thing to work reliably. Most people used Video for Windows (VFW) in tutorials , but i found it very unreliable and crashing often, also when debugging it threw wired errors. Then I made up my mind to use the DirectX based DirectShow methods, Its needs DirectX SDK to build it and on downloading it and finally looking for the files i found that functionality have been moved to platform SDK. Anyhow i was not downloading another 4.5 GB of SDK to test if it worked. So after some Googling i found about the VideoInput library (uses DirectShow methods) which people sometimes use for OpenCV. I wished i had found it earlier , here is a small tutorial on hot to get started using it , since the original files which came with it did not work for me.There are a whole host of features supported so you can explore the documentation for more .

VideoInput Library homepage

How to use webcam/tv tuner/capture cards in VC++ to capture video and take pictures –

1. Create simple Dialog based MFC project.

2. In the dialog make a Picture control and a Button , Picture control will Display the Video stream and the button will be used to capture a snapshot.Change Picture control to type Bitmap and attach a CStatic variable to it.

3. Now we will use a simple timer ( WM_TIMER ) to update the image being captured there are better way but this should do for a tutorial. In OnInitDialog() set the timer to refresh at say 10 times a second,

SetTimer(NULL,100,NULL)

4. Include the video videoInput.h header file. Also add the videoinput.lib in the linker input and for ignore library atlthunk.lib ( if it causes errors ).

5. Initialize the device using VideoInput API .

// in header
int device,width,height,size;
videoInput VI;
unsigned char * captureBuffer;

// in InitDoalog
device = 0; // first webcam
VI.setupDevice(device,320,240); // 320 x 240 resolution

width = VI.getWidth(device);
height = VI.getHeight(device);
size = VI.getSize(device); // size to initialize buffer

captureBuffer = new unsigned char[size]; // our capturebuffer

6. Now lets capture video and display frame in the OnTimer

if(VI.isFrameNew(device))
{
VI.getPixels(device,captureBuffer, false, true);
DisplayImage(&m_webcam,height,width,captureBuffer);
}

7. There is also example of how to capture image using libjpeg, please download the source and check it out.