I'm not stuck by this subject, can you recommend a book really good on this?
UPDATE
Actually I tried using curl to fetch a snapshot out of mjpeg stream,but fails,the programe continues to output,can't stop:
curl_easy_setopt(curl, CURLOPT_URL, "network path to mjpeg");
res = curl_easy_perform(curl);
printf("%s", res);
curl_easy_cleanup(curl);
UPDATE2
Found a similar question here.