Package de.fu_berlin.inf.dpp.videosharing.exceptions

Examples of de.fu_berlin.inf.dpp.videosharing.exceptions.DecodingException


                    .getStreamCoder();
                if (newCoder.getCodecType() == ICodec.Type.CODEC_TYPE_VIDEO) {
                    videoStreamIndex = streamIndex;
                    coder = newCoder;
                    if ((errorNumber = coder.open()) < 0) {
                        videoSharingSession.reportError(new DecodingException(
                            IError.make(errorNumber).getDescription()));
                        return;
                    }
                }
                if (coder == null)
                    // coder not properly set up yet
                    continue;
            }

            if (packet.getStreamIndex() == videoStreamIndex) {
                // one of the pictures in this packet
                IVideoPicture picture = IVideoPicture.make(
                    coder.getPixelType(), coder.getWidth(), coder.getHeight());

                // offset for already processed data in package
                int offset = 0;
                // fetch every frame from the packet
                while (offset < packet.getSize()) {
                    int bytesDecoded = coder.decodeVideo(picture, packet,
                        offset);

                    if (bytesDecoded < 0) {
                        videoSharingSession.reportError(new DecodingException(
                            IError.make(bytesDecoded).getDescription()));
                        return;
                    }

                    offset += bytesDecoded;
View Full Code Here


                if (e instanceof EOFException)
                    // closed
                    break;
                if (!(e instanceof InterruptedIOException)) {
                    log.error(e.getMessage(), e);
                    videoSharingSession.reportError(new DecodingException(e));
                }
                break;
            } catch (Exception e) {
                // should not happen
                log.error(e.getMessage(), e);
                videoSharingSession.reportError(new DecodingException(e));
                break;
            }
        }
    }
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.videosharing.exceptions.DecodingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.