Commit 59241d5e authored by Wim Taymans's avatar Wim Taymans
Browse files

ext/ogg/: Ported ogg muxer.

Original commit message from CVS:
* ext/ogg/Makefile.am:
* ext/ogg/README:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind),
(gst_ogg_pad_submit_packet), (gst_ogg_demux_sink_activate),
(gst_ogg_print):
* ext/ogg/gstoggmux.c: (gst_ogg_mux_init),
(gst_ogg_mux_request_new_pad), (gst_ogg_mux_next_buffer),
(gst_ogg_mux_push_page), (gst_ogg_mux_queue_pads),
(gst_ogg_mux_get_headers), (gst_ogg_mux_set_header_on_caps),
(gst_ogg_mux_send_headers), (gst_ogg_mux_collected),
(gst_ogg_mux_change_state):
Ported ogg muxer.
parent 658bd2ca
2005-05-05 Wim Taymans <wim@fluendo.com>
* ext/ogg/Makefile.am:
* ext/ogg/README:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind),
(gst_ogg_pad_submit_packet), (gst_ogg_demux_sink_activate),
(gst_ogg_print):
* ext/ogg/gstoggmux.c: (gst_ogg_mux_init),
(gst_ogg_mux_request_new_pad), (gst_ogg_mux_next_buffer),
(gst_ogg_mux_push_page), (gst_ogg_mux_queue_pads),
(gst_ogg_mux_get_headers), (gst_ogg_mux_set_header_on_caps),
(gst_ogg_mux_send_headers), (gst_ogg_mux_collected),
(gst_ogg_mux_change_state):
Ported ogg muxer.
2005-05-05 Wim Taymans <wim@fluendo.com>
* docs/design-audiosinks.txt:
......
......@@ -10,6 +10,6 @@ libgstogg_la_SOURCES = \
libgstogg_la_CFLAGS = $(GST_CFLAGS) $(OGG_CFLAGS)
libgstogg_la_LIBADD = $(OGG_LIBS) \
$(top_builddir)/gst-libs/gst/riff/libgstriff-@GST_MAJORMINOR@.la
$(top_builddir)/gst-libs/gst/riff/libgstriff-@GST_MAJORMINOR@.la $(GST_BASE_LIBS)
libgstogg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
......@@ -125,6 +125,8 @@ unique correct timestamp and a framenumber.
in a raw theroa stream we use the granulepos as the offset field.
The granulepos of an ogg page is the framenumber of the last frame in the page.
vorbis and granulepos
---------------------
......@@ -134,6 +136,8 @@ from granulepos is therefore easy.
in a raw vorbis stream we use the granulepos as the offset field.
The granulepos of an ogg page is the sample number of the next page in the ogg stream.
What can ogg do?
----------------
......@@ -183,4 +187,3 @@ TODO
- use the OFFSET field in the GstBuffer to store/read the granulepos as
opposed to the OFFSET_END field.
- Seeking should be implemented with a binary search.
......@@ -703,6 +703,9 @@ gst_ogg_pad_submit_packet (GstOggPad * pad, ogg_packet * packet)
ret = GST_RPAD_CHAINFUNC (pad->elem_pad) (pad->elem_pad, buf);
}
#if 0
done:
#endif
pad->packetno++;
return ret;
......@@ -1975,7 +1978,7 @@ gst_ogg_demux_sink_activate (GstPad * sinkpad, GstActivateMode mode)
ogg->seekable = FALSE;
result = TRUE;
break;
case GST_ACTIVATE_PULL:
case GST_ACTIVATE_PULL_RANGE:
/* if we have a scheduler we can start the task */
if (GST_ELEMENT_SCHEDULER (ogg)) {
gst_pad_peer_set_active (sinkpad, mode);
......@@ -2007,6 +2010,9 @@ gst_ogg_demux_sink_activate (GstPad * sinkpad, GstActivateMode mode)
result = TRUE;
break;
case GST_ACTIVATE_PULL:
result = FALSE;
break;
}
return result;
}
......@@ -2142,7 +2148,7 @@ gst_ogg_print (GstOggDemux * ogg)
{
guint j, i;
GST_INFO_OBJECT (ogg, "%u chains, total time %" GST_TIME_FORMAT ":",
GST_INFO_OBJECT (ogg, "%u chains, total time: %" GST_TIME_FORMAT,
ogg->chains->len, GST_TIME_ARGS (ogg->total_time));
for (i = 0; i < ogg->chains->len; i++) {
......@@ -2158,17 +2164,17 @@ gst_ogg_print (GstOggDemux * ogg)
GstOggPad *stream = g_array_index (chain->streams, GstOggPad *, j);
GST_INFO_OBJECT (ogg, " stream %08lx:", stream->serialno);
GST_INFO_OBJECT (ogg, " start time %" GST_TIME_FORMAT ":",
GST_INFO_OBJECT (ogg, " start time: %" GST_TIME_FORMAT,
GST_TIME_ARGS (stream->start_time));
GST_INFO_OBJECT (ogg, " first granulepos %" G_GINT64_FORMAT ":",
GST_INFO_OBJECT (ogg, " first granulepos: %" G_GINT64_FORMAT,
stream->first_granule);
GST_INFO_OBJECT (ogg, " first time %" GST_TIME_FORMAT ":",
GST_INFO_OBJECT (ogg, " first time: %" GST_TIME_FORMAT,
GST_TIME_ARGS (stream->first_time));
GST_INFO_OBJECT (ogg, " last granulepos %" G_GINT64_FORMAT ":",
GST_INFO_OBJECT (ogg, " last granulepos: %" G_GINT64_FORMAT,
stream->last_granule);
GST_INFO_OBJECT (ogg, " last time %" GST_TIME_FORMAT ":",
GST_INFO_OBJECT (ogg, " last time: %" GST_TIME_FORMAT,
GST_TIME_ARGS (stream->last_time));
GST_INFO_OBJECT (ogg, " total time %" GST_TIME_FORMAT ":",
GST_INFO_OBJECT (ogg, " total time: %" GST_TIME_FORMAT,
GST_TIME_ARGS (stream->total_time));
}
}
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment