android Programming Glossary: headerlen
Android ICS and MJPEG using AsyncTask http://stackoverflow.com/questions/10550139/android-ics-and-mjpeg-using-asynctask props.getProperty CONTENT_LENGTH public Bitmap readMjpegFrame throws IOException mark FRAME_MAX_LENGTH int headerLen getStartOfSequence this SOI_MARKER reset byte header new byte headerLen readFully header try mContentLength parseContentLength.. throws IOException mark FRAME_MAX_LENGTH int headerLen getStartOfSequence this SOI_MARKER reset byte header new byte headerLen readFully header try mContentLength parseContentLength header catch NumberFormatException nfe nfe.getStackTrace Log.d.. hit nfe mContentLength getEndOfSeqeunce this EOF_MARKER reset byte frameData new byte mContentLength skipBytes headerLen readFully frameData return BitmapFactory.decodeStream new ByteArrayInputStream frameData MjpegView.java package com.demo.mjpeg.MjpegView..
Android and MJPEG http://stackoverflow.com/questions/3205191/android-and-mjpeg props.getProperty CONTENT_LENGTH public Bitmap readMjpegFrame throws IOException mark FRAME_MAX_LENGTH int headerLen getStartOfSequence this SOI_MARKER reset byte header new byte headerLen readFully header try mContentLength parseContentLength.. throws IOException mark FRAME_MAX_LENGTH int headerLen getStartOfSequence this SOI_MARKER reset byte header new byte headerLen readFully header try mContentLength parseContentLength header catch NumberFormatException nfe mContentLength getEndOfSeqeunce.. nfe mContentLength getEndOfSeqeunce this EOF_MARKER reset byte frameData new byte mContentLength skipBytes headerLen readFully frameData return BitmapFactory.decodeStream new ByteArrayInputStream frameData If you need any more info let..
|