gst/qtdemux/qtdemux.c (gst_qtdemux_move_stream, gst_qtdemux_loop_state_header, gst_qtdemux_activate_segment, gst_qtde...

Original commit message from CVS:
* gst/qtdemux/qtdemux.c (gst_qtdemux_move_stream,
gst_qtdemux_loop_state_header, gst_qtdemux_activate_segment,
gst_qtdemux_prepare_current_sample, gst_qtdemux_combine_flows,
gst_qtdemux_loop_state_movie, gst_qtdemux_loop,
qtdemux_parse_segments, qtdemux_parse_trak):
* gst/rtpmanager/rtpsession.c (rtp_session_get_bandwidth,
rtp_session_get_rtcp_bandwidth, rtp_session_get_cname,
rtp_session_get_name, rtp_session_get_email, rtp_session_get_phone,
rtp_session_get_location, rtp_session_get_tool,
rtp_session_process_bye, session_report_blocks):
* gst/rtpmanager/rtpsource.c (rtp_source_process_rtp,
rtp_source_send_rtp, rtp_source_process_sr, rtp_source_process_rb):
More format arg fixing (spotted by Ali Sabil <ali.sabil@gmail.com>).
* gst/switch/Makefile.am:
Add require libraries(spotted by Ali Sabil <ali.sabil@gmail.com>).
This commit is contained in:
Stefan Kost 2007-05-10 14:02:07 +00:00
parent dc78134a6f
commit 28e982a9ad
5 changed files with 60 additions and 30 deletions

View File

@ -1,3 +1,22 @@
2007-05-10 Stefan Kost <ensonic@users.sf.net>
* gst/qtdemux/qtdemux.c (gst_qtdemux_move_stream,
gst_qtdemux_loop_state_header, gst_qtdemux_activate_segment,
gst_qtdemux_prepare_current_sample, gst_qtdemux_combine_flows,
gst_qtdemux_loop_state_movie, gst_qtdemux_loop,
qtdemux_parse_segments, qtdemux_parse_trak):
* gst/rtpmanager/rtpsession.c (rtp_session_get_bandwidth,
rtp_session_get_rtcp_bandwidth, rtp_session_get_cname,
rtp_session_get_name, rtp_session_get_email, rtp_session_get_phone,
rtp_session_get_location, rtp_session_get_tool,
rtp_session_process_bye, session_report_blocks):
* gst/rtpmanager/rtpsource.c (rtp_source_process_rtp,
rtp_source_send_rtp, rtp_source_process_sr, rtp_source_process_rb):
More format arg fixing (spotted by Ali Sabil <ali.sabil@gmail.com>).
* gst/switch/Makefile.am:
Add require libraries(spotted by Ali Sabil <ali.sabil@gmail.com>).
2007-05-10 Stefan Kost <ensonic@users.sf.net> 2007-05-10 Stefan Kost <ensonic@users.sf.net>
* gst/rtpmanager/async_jitter_queue.c (tail_buffer_duration, * gst/rtpmanager/async_jitter_queue.c (tail_buffer_duration,
@ -11,7 +30,7 @@
async_jitter_queue_pop_unlocked, async_jitter_queue_length_unlocked, async_jitter_queue_pop_unlocked, async_jitter_queue_length_unlocked,
async_jitter_queue_set_flushing_unlocked, async_jitter_queue_set_flushing_unlocked,
async_jitter_queue_unset_flushing_unlocked): async_jitter_queue_unset_flushing_unlocked):
Format arg fix (spotted by Ali Sabil <ali.sabil@gmail.com>) Format arg fix (spotted by Ali Sabil <ali.sabil@gmail.com>).
2007-05-10 Stefan Kost <ensonic@users.sf.net> 2007-05-10 Stefan Kost <ensonic@users.sf.net>

View File

@ -585,7 +585,7 @@ gst_qtdemux_move_stream (GstQTDemux * qtdemux, QtDemuxStream * str,
* streaming from the desired position. * streaming from the desired position.
* *
* Keyframe seeking is a little more complicated when dealing with * Keyframe seeking is a little more complicated when dealing with
* segments. Ideally we want to move to the previous keyframe in * segments. Ideally we want to move to the previous keyframe in
* the segment but there might not be a keyframe in the segment. In * the segment but there might not be a keyframe in the segment. In
* fact, none of the segments could contain a keyframe. We take a * fact, none of the segments could contain a keyframe. We take a
* practical approach: seek to the previous keyframe in the segment, * practical approach: seek to the previous keyframe in the segment,
@ -1024,7 +1024,7 @@ beach:
* @offset is an absolute global position over all the segments. * @offset is an absolute global position over all the segments.
* *
* This will push out a NEWSEGMENT event with the right values and * This will push out a NEWSEGMENT event with the right values and
* position the stream index to the first decodable sample before * position the stream index to the first decodable sample before
* @offset. * @offset.
*/ */
static gboolean static gboolean
@ -1107,7 +1107,7 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
} }
/* prepare to get the current sample of @stream, getting essential values. /* prepare to get the current sample of @stream, getting essential values.
* *
* This function will also prepare and send the segment when needed. * This function will also prepare and send the segment when needed.
* *
* Return FALSE if the stream is EOS. * Return FALSE if the stream is EOS.
@ -1142,6 +1142,9 @@ gst_qtdemux_prepare_current_sample (GstQTDemux * qtdemux,
if (stream->segment_index != seg_idx) if (stream->segment_index != seg_idx)
gst_qtdemux_activate_segment (qtdemux, stream, seg_idx, time_position); gst_qtdemux_activate_segment (qtdemux, stream, seg_idx, time_position);
GST_LOG_OBJECT (qtdemux, "segment active, index = %lu of %lu",
stream->sample_index, stream->n_samples);
if (stream->sample_index >= stream->n_samples) if (stream->sample_index >= stream->n_samples)
goto eos; goto eos;
@ -1248,6 +1251,7 @@ gst_qtdemux_combine_flows (GstQTDemux * demux, QtDemuxStream * stream,
/* if we get here, all other pads were unlinked and we return /* if we get here, all other pads were unlinked and we return
* NOT_LINKED then */ * NOT_LINKED then */
done: done:
GST_LOG_OBJECT (demux, "combined flow return: %s", gst_flow_get_name (ret));
return ret; return ret;
} }
@ -1350,8 +1354,9 @@ gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux)
GST_LOG_OBJECT (qtdemux, GST_LOG_OBJECT (qtdemux,
"Pushing buffer with time %" GST_TIME_FORMAT ", duration %" "Pushing buffer with time %" GST_TIME_FORMAT ", duration %"
GST_TIME_FORMAT " on pad %p", GST_TIME_ARGS (timestamp), GST_TIME_FORMAT " on pad %s",
GST_TIME_ARGS (duration), stream->pad); GST_TIME_ARGS (timestamp), GST_TIME_ARGS (duration),
GST_PAD_NAME (stream->pad));
ret = gst_pad_push (stream->pad, buf); ret = gst_pad_push (stream->pad, buf);
} else { } else {
ret = GST_FLOW_OK; ret = GST_FLOW_OK;
@ -1464,7 +1469,7 @@ pause:
/* /*
* next_entry_size * next_entry_size
* *
* Returns the size of the first entry at the current offset. * Returns the size of the first entry at the current offset.
* If -1, there are none (which means EOS or empty file). * If -1, there are none (which means EOS or empty file).
*/ */
@ -2613,7 +2618,7 @@ done:
/* parse the traks. /* parse the traks.
* With each track we associate a new QtDemuxStream that contains all the info * With each track we associate a new QtDemuxStream that contains all the info
* about the trak. * about the trak.
* traks that do not decode to something (like strm traks) will not have a pad. * traks that do not decode to something (like strm traks) will not have a pad.
*/ */
static gboolean static gboolean
@ -2667,7 +2672,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
stream->duration = QT_UINT32 ((guint8 *) mdhd->data + 24); stream->duration = QT_UINT32 ((guint8 *) mdhd->data + 24);
} }
GST_LOG_OBJECT (qtdemux, "track timescale: %" G_GUINT64_FORMAT, GST_LOG_OBJECT (qtdemux, "track timescale: %" G_GUINT32_FORMAT,
stream->timescale); stream->timescale);
GST_LOG_OBJECT (qtdemux, "track duration: %" G_GUINT64_FORMAT, GST_LOG_OBJECT (qtdemux, "track duration: %" G_GUINT64_FORMAT,
stream->duration); stream->duration);
@ -2685,7 +2690,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
* identify those yet, except for just looking at their duration. */ * identify those yet, except for just looking at their duration. */
if (tdur1 != 0 && (tdur2 * 10 / tdur1) < 2) { if (tdur1 != 0 && (tdur2 * 10 / tdur1) < 2) {
GST_WARNING_OBJECT (qtdemux, GST_WARNING_OBJECT (qtdemux,
"Track shorter than 20%% (%d/%d vs. %d/%d) of the stream " "Track shorter than 20%% (%" G_GUINT64_FORMAT "/%" G_GUINT32_FORMAT
" vs. %" G_GUINT32_FORMAT "/%" G_GUINT32_FORMAT ") of the stream "
"found, assuming preview image or something; skipping track", "found, assuming preview image or something; skipping track",
stream->duration, stream->timescale, qtdemux->duration, stream->duration, stream->timescale, qtdemux->duration,
qtdemux->timescale); qtdemux->timescale);

View File

@ -364,7 +364,7 @@ rtp_session_get_bandwidth (RTPSession * sess)
* @bandwidth: the RTCP bandwidth * @bandwidth: the RTCP bandwidth
* *
* Set the bandwidth that should be used for RTCP * Set the bandwidth that should be used for RTCP
* messages. * messages.
*/ */
void void
rtp_session_set_rtcp_bandwidth (RTPSession * sess, gdouble bandwidth) rtp_session_set_rtcp_bandwidth (RTPSession * sess, gdouble bandwidth)
@ -395,7 +395,7 @@ rtp_session_get_rtcp_bandwidth (RTPSession * sess)
* @sess: an #RTPSession * @sess: an #RTPSession
* @cname: a CNAME for the session * @cname: a CNAME for the session
* *
* Set the CNAME for the session. * Set the CNAME for the session.
*/ */
void void
rtp_session_set_cname (RTPSession * sess, const gchar * cname) rtp_session_set_cname (RTPSession * sess, const gchar * cname)
@ -427,7 +427,7 @@ rtp_session_get_cname (RTPSession * sess)
* @sess: an #RTPSession * @sess: an #RTPSession
* @name: a NAME for the session * @name: a NAME for the session
* *
* Set the NAME for the session. * Set the NAME for the session.
*/ */
void void
rtp_session_set_name (RTPSession * sess, const gchar * name) rtp_session_set_name (RTPSession * sess, const gchar * name)
@ -459,7 +459,7 @@ rtp_session_get_name (RTPSession * sess)
* @sess: an #RTPSession * @sess: an #RTPSession
* @email: an EMAIL for the session * @email: an EMAIL for the session
* *
* Set the EMAIL the session. * Set the EMAIL the session.
*/ */
void void
rtp_session_set_email (RTPSession * sess, const gchar * email) rtp_session_set_email (RTPSession * sess, const gchar * email)
@ -491,7 +491,7 @@ rtp_session_get_email (RTPSession * sess)
* @sess: an #RTPSession * @sess: an #RTPSession
* @phone: a PHONE for the session * @phone: a PHONE for the session
* *
* Set the PHONE the session. * Set the PHONE the session.
*/ */
void void
rtp_session_set_phone (RTPSession * sess, const gchar * phone) rtp_session_set_phone (RTPSession * sess, const gchar * phone)
@ -523,7 +523,7 @@ rtp_session_get_phone (RTPSession * sess)
* @sess: an #RTPSession * @sess: an #RTPSession
* @location: a LOCATION for the session * @location: a LOCATION for the session
* *
* Set the LOCATION the session. * Set the LOCATION the session.
*/ */
void void
rtp_session_set_location (RTPSession * sess, const gchar * location) rtp_session_set_location (RTPSession * sess, const gchar * location)
@ -555,7 +555,7 @@ rtp_session_get_location (RTPSession * sess)
* @sess: an #RTPSession * @sess: an #RTPSession
* @tool: a TOOL for the session * @tool: a TOOL for the session
* *
* Set the TOOL the session. * Set the TOOL the session.
*/ */
void void
rtp_session_set_tool (RTPSession * sess, const gchar * tool) rtp_session_set_tool (RTPSession * sess, const gchar * tool)
@ -587,7 +587,7 @@ rtp_session_get_tool (RTPSession * sess)
* @sess: an #RTPSession * @sess: an #RTPSession
* @note: a NOTE for the session * @note: a NOTE for the session
* *
* Set the NOTE the session. * Set the NOTE the session.
*/ */
void void
rtp_session_set_note (RTPSession * sess, const gchar * note) rtp_session_set_note (RTPSession * sess, const gchar * note)
@ -1228,7 +1228,7 @@ rtp_session_process_bye (RTPSession * sess, GstRTCPPacket * packet,
members = sess->stats.active_sources; members = sess->stats.active_sources;
if (!sess->source->received_bye && members < pmembers) { if (!sess->source->received_bye && members < pmembers) {
/* some members went away since the previous timeout estimate. /* some members went away since the previous timeout estimate.
* Perform reverse reconsideration but only when we are not scheduling a * Perform reverse reconsideration but only when we are not scheduling a
* BYE ourselves. */ * BYE ourselves. */
if (arrival->time < sess->next_rtcp_check_time) { if (arrival->time < sess->next_rtcp_check_time) {
@ -1612,7 +1612,8 @@ session_report_blocks (const gchar * key, RTPSource * source, ReportData * data)
extended_max = stats->cycles + stats->max_seq; extended_max = stats->cycles + stats->max_seq;
expected = extended_max - stats->base_seq + 1; expected = extended_max - stats->base_seq + 1;
GST_DEBUG ("ext_max %d, expected %d, received %d, base_seq %d", GST_DEBUG ("ext_max %" G_GUINT64_FORMAT ", expected %" G_GUINT64_FORMAT
", received %" G_GUINT64_FORMAT ", base_seq %" G_GUINT32_FORMAT,
extended_max, expected, stats->packets_received, stats->base_seq); extended_max, expected, stats->packets_received, stats->base_seq);
lost = expected - stats->packets_received; lost = expected - stats->packets_received;
@ -1632,7 +1633,8 @@ session_report_blocks (const gchar * key, RTPSource * source, ReportData * data)
GST_DEBUG ("add RR for SSRC %08x", source->ssrc); GST_DEBUG ("add RR for SSRC %08x", source->ssrc);
/* we scaled the jitter up for additional precision */ /* we scaled the jitter up for additional precision */
GST_DEBUG ("fraction %d, lost %d, extseq %u, jitter %d", fraction, lost, GST_DEBUG ("fraction %" G_GUINT32_FORMAT ", lost %" G_GINT64_FORMAT
", extseq %" G_GUINT64_FORMAT ", jitter %d", fraction, lost,
extended_max, stats->jitter >> 4); extended_max, stats->jitter >> 4);
if (rtp_source_get_last_sr (source, &ntptime, NULL, NULL, NULL, &time)) { if (rtp_source_get_last_sr (source, &ntptime, NULL, NULL, NULL, &time)) {

View File

@ -347,7 +347,7 @@ rtp_source_process_rtp (RTPSource * src, GstBuffer * buffer,
src->probation--; src->probation--;
src->stats.max_seq = seqnr; src->stats.max_seq = seqnr;
if (src->probation == 0) { if (src->probation == 0) {
GST_DEBUG ("probation done!", src->probation); GST_DEBUG ("probation done!");
init_seq (src, seqnr); init_seq (src, seqnr);
} else { } else {
GstBuffer *q; GstBuffer *q;
@ -470,7 +470,8 @@ rtp_source_send_rtp (RTPSource * src, GstBuffer * buffer)
/* push packet */ /* push packet */
if (src->callbacks.push_rtp) { if (src->callbacks.push_rtp) {
GST_DEBUG ("pushing RTP packet %u", src->stats.packets_sent); GST_DEBUG ("pushing RTP packet %" G_GUINT64_FORMAT,
src->stats.packets_sent);
result = src->callbacks.push_rtp (src, buffer, src->user_data); result = src->callbacks.push_rtp (src, buffer, src->user_data);
} else { } else {
GST_DEBUG ("no callback installed"); GST_DEBUG ("no callback installed");
@ -500,9 +501,10 @@ rtp_source_process_sr (RTPSource * src, guint64 ntptime, guint32 rtptime,
g_return_if_fail (RTP_IS_SOURCE (src)); g_return_if_fail (RTP_IS_SOURCE (src));
GST_DEBUG ("got SR packet: SSRC %08x, NTP %08x:%08x, RTP %u, PC %u, OC %u", GST_DEBUG ("got SR packet: SSRC %08x, NTP %08x:%08x, RTP %" G_GUINT32_FORMAT
src->ssrc, ntptime >> 32, ntptime & 0xffffffff, rtptime, packet_count, ", PC %" G_GUINT32_FORMAT ", OC %" G_GUINT32_FORMAT, src->ssrc,
octet_count); (guint32) (ntptime >> 32), (guint32) (ntptime & 0xffffffff), rtptime,
packet_count, octet_count);
curridx = src->stats.curr_sr ^ 1; curridx = src->stats.curr_sr ^ 1;
curr = &src->stats.sr[curridx]; curr = &src->stats.sr[curridx];
@ -543,9 +545,10 @@ rtp_source_process_rb (RTPSource * src, guint8 fractionlost, gint32 packetslost,
g_return_if_fail (RTP_IS_SOURCE (src)); g_return_if_fail (RTP_IS_SOURCE (src));
GST_DEBUG ("got RB packet %d: SSRC %08x, FL %u" GST_DEBUG ("got RB packet: SSRC %08x, FL %" G_GUINT32_FORMAT ""
", PL %u, HS %u, JITTER %u, LSR %08x, DLSR %08x", src->ssrc, fractionlost, ", PL %d, HS %" G_GUINT32_FORMAT ", JITTER %" G_GUINT32_FORMAT
packetslost, exthighestseq, jitter, lsr, dlsr); ", LSR %08x, DLSR %08x", src->ssrc, fractionlost, packetslost,
exthighestseq, jitter, lsr, dlsr);
curridx = src->stats.curr_rr ^ 1; curridx = src->stats.curr_rr ^ 1;
curr = &src->stats.rr[curridx]; curr = &src->stats.rr[curridx];

View File

@ -4,6 +4,6 @@ plugin_LTLIBRARIES = libgstswitch.la
libgstswitch_la_SOURCES = gstswitch.c libgstswitch_la_SOURCES = gstswitch.c
libgstswitch_la_CFLAGS = $(GST_CFLAGS) libgstswitch_la_CFLAGS = $(GST_CFLAGS)
libgstswitch_la_LIBADD = libgstswitch_la_LIBADD =
libgstswitch_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstswitch_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS)
noinst_HEADERS = gstswitch.h noinst_HEADERS = gstswitch.h