int result1 = streamState.packetout(packet); if (result1 == 0) {
result = streamState.packetout(packet);
result = streamState.packetout(packet);
result = streamState.packetout(packet);
result = streamState.packetout(packet);
/** * Reads a packet. * * @return true if a packet was read, false if we've reached the end of the stream. */ protected boolean readPacket () throws IOException { int result; while ((result = _stream.packetout(_packet)) != 1) { if (result == 0 && !readPage()) { return false; } } return true; }
/** * Reads a packet. * * @return true if a packet was read, false if we've reached the end of the stream. */ protected boolean readPacket () throws IOException { int result; while ((result = _stream.packetout(_packet)) != 1) { if (result == 0 && !readPage()) { return false; } } return true; }
private void processPackets (final ConverterData converterData) throws JorbisReadException { // Here is where we process the packets. boolean readingPacket = true; while (readingPacket) { switch (converterData.joggData.streamState.packetout (converterData.joggData.packet)) { // If we need more data, we break to get it. case PARTIAL_READ : readingPacket = false; break; // If we have the data we need, we decode the packet. case PAGE_READ : this.decodeCurrentPacket (converterData); break; case ERROR_WHILE_READING : default : throw new JorbisReadException ("There is a hole in a body packet."); } } }
public int getNextPacket() { while (os.packetout(packet) == 0) { int ret = getNextPage(1); if (ret < 0) return ret; os.pagein(page); } inputStream.add(packet.packet_base, packet.packet, packet.bytes); return 0; }
private void readAdditionalHeaderFromPage (final ConverterData converterData) throws JorbisReadException { // Share the page with the StreamState object. converterData.joggData.streamState.pagein (converterData.joggData.page); /* * Reading a page below. */ switch (converterData.joggData.streamState.packetout (converterData.joggData.packet)) { // If there is a hole in the data, we must exit. case ERROR_WHILE_READING : throw new JorbisReadException ("There is a hole in the first packet data."); // We got a packet, let's process it. case PAGE_READ : converterData.jorbisData.info.synthesis_headerin (converterData.jorbisData.comment, converterData.joggData.packet); break; default : break; } }
throw new IOException("Error reading first page of Ogg bitstream data."); if (_stream.packetout(_packet) != 1) { throw new IOException("Error reading initial header packet.");
throw new IOException("Error reading first page of Ogg bitstream data."); if (_stream.packetout(_packet) != 1) { throw new IOException("Error reading initial header packet.");
private void initConverterDataFromPage (final ConverterData converterData) throws JorbisReadException { // Initializes and resets StreamState. converterData.joggData.streamState.init (converterData.joggData.page.serialno ()); converterData.joggData.streamState.reset (); // Initializes the Info and Comment objects. converterData.jorbisData.info.init (); converterData.jorbisData.comment.init (); // Check the page (serial number and stuff). if (converterData.joggData.streamState.pagein (converterData.joggData.page) == -1) { throw new JorbisReadException ("We got an error while reading the first header page."); } /* * Try to extract a packet. All other return values than "1" indicates * there's something wrong. */ if (converterData.joggData.streamState.packetout (converterData.joggData.packet) != 1) { throw new JorbisReadException ("We got an error while reading the first header packet."); } /* * We give the packet to the Info object, so that it can extract the * Comment-related information, among other things. If this fails, it's * not Vorbis data. */ if (converterData.jorbisData.info.synthesis_headerin (converterData.jorbisData.comment, converterData.joggData.packet) < 0) { throw new JorbisReadException ("We got an error while interpreting the first packet. Apparantly, it's not Vorbis data."); } }
os.pagein(og_ptr); while(i<3){ int result=os.packetout(op); if(result==0) break;
os.pagein(og_ptr); while(i<3){ int result=os.packetout(op); if(result==0) break;