[xiph-commits] r10360 - trunk/xiph-rtp
lu_zero at svn.xiph.org
lu_zero at svn.xiph.org
Wed Nov 9 08:38:08 PST 2005
Author: lu_zero
Date: 2005-11-09 08:38:04 -0800 (Wed, 09 Nov 2005)
New Revision: 10360
Modified:
trunk/xiph-rtp/vorbisrtp-client.c
trunk/xiph-rtp/vorbisrtp.c
Log:
Yet another try to fix the granulepos without parsing the vorbis packets, doesn't work
Modified: trunk/xiph-rtp/vorbisrtp-client.c
===================================================================
--- trunk/xiph-rtp/vorbisrtp-client.c 2005-11-09 06:09:19 UTC (rev 10359)
+++ trunk/xiph-rtp/vorbisrtp-client.c 2005-11-09 16:38:04 UTC (rev 10360)
@@ -58,6 +58,7 @@
ogg_packet op;
ogg_stream_state os;
ogg_page og;
+ long long int last_gp;
vorbis_info vi;
vorbis_comment vc;
@@ -349,7 +350,10 @@
op->bytes += data[offset++];
op->packet = &data[offset];
//FIXME should be a better way
- op->granulepos+=timestamp*ogg->vi.rate/1000000L;
+ if (i == 0)
+ op->granulepos = ogg->last_gp+=timestamp*ogg->vi.rate/1000000L;
+ else
+ op->granulepos = -1;
op->packetno++;
count += pkt_repack(ogg,out);
offset += op->bytes;
@@ -373,7 +377,7 @@
main (int argc, char *argv[])
{
int RTPSocket, ret;
- FILE *file;
+ FILE *file=stdout;
int optval = 0, decode = 0, dump = 0, opt;
struct sockaddr_in us, them;
struct ip_mreq group;
@@ -474,7 +478,7 @@
file = stdout;
filename = "Standard Output";
}
-
+
fprintf (stderr, "Dumping the stream to %s\n", filename);
}
Modified: trunk/xiph-rtp/vorbisrtp.c
===================================================================
--- trunk/xiph-rtp/vorbisrtp.c 2005-11-09 06:09:19 UTC (rev 10359)
+++ trunk/xiph-rtp/vorbisrtp.c 2005-11-09 16:38:04 UTC (rev 10360)
@@ -71,6 +71,8 @@
struct sockaddr_in rtpsock;
int rtpsocket;
+#define BUFFER_SIZE 4096
+
/*****************************************************************************/
/* Vorbis packet header */
/* */
More information about the commits
mailing list