diff options
author | Benjamin Otte <otte@redhat.com> | 2010-03-21 21:39:18 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-03-21 21:39:18 +0100 |
commit | f96e4f15817974e8d3675bfe3980cdf02815bd74 (patch) | |
tree | 8eb2ba9bc6058e9a8d5ad2a46e6bd5034e3f3813 /ext/mythtv/gstmythtvsrc.c | |
parent | 46f4c7a6c127dbd20fd9f88a10518e084501cd36 (diff) | |
download | gstreamer-plugins-bad-f96e4f15817974e8d3675bfe3980cdf02815bd74.tar.gz |
Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
Diffstat (limited to 'ext/mythtv/gstmythtvsrc.c')
-rw-r--r-- | ext/mythtv/gstmythtvsrc.c | 59 |
1 files changed, 26 insertions, 33 deletions
diff --git a/ext/mythtv/gstmythtvsrc.c b/ext/mythtv/gstmythtvsrc.c index 5ec839786..c80bae86d 100644 --- a/ext/mythtv/gstmythtvsrc.c +++ b/ext/mythtv/gstmythtvsrc.c @@ -433,32 +433,6 @@ read_error: return GST_FLOW_ERROR; } -gint64 -gst_mythtv_src_get_position (GstMythtvSrc * src) -{ - gint64 size_tmp = 0; - guint max_tries = 2; - - if (src->live_tv == TRUE && - (abs (src->content_size - src->bytes_read) < - GMYTHTV_TRANSFER_MAX_BUFFER)) { - - get_file_pos: - g_usleep (10); - size_tmp = gmyth_recorder_get_file_position (src->spawn_livetv->recorder); - if (size_tmp > (src->content_size + GMYTHTV_TRANSFER_MAX_BUFFER)) - src->content_size = size_tmp; - else if (size_tmp > 0 && --max_tries > 0) - goto get_file_pos; - GST_LOG_OBJECT (src, "file_position = %" G_GINT64_FORMAT, size_tmp); - /* - * sets the last content size amount before it can be updated - */ - src->prev_content_size = src->content_size; - } - return src->content_size; -} - static gboolean gst_mythtv_src_do_seek (GstBaseSrc * base, GstSegment * segment) { @@ -729,6 +703,32 @@ gst_mythtv_src_stop (GstBaseSrc * bsrc) } #if 0 +static gint64 +gst_mythtv_src_get_position (GstMythtvSrc * src) +{ + gint64 size_tmp = 0; + guint max_tries = 2; + + if (src->live_tv == TRUE && + (abs (src->content_size - src->bytes_read) < + GMYTHTV_TRANSFER_MAX_BUFFER)) { + + get_file_pos: + g_usleep (10); + size_tmp = gmyth_recorder_get_file_position (src->spawn_livetv->recorder); + if (size_tmp > (src->content_size + GMYTHTV_TRANSFER_MAX_BUFFER)) + src->content_size = size_tmp; + else if (size_tmp > 0 && --max_tries > 0) + goto get_file_pos; + GST_LOG_OBJECT (src, "file_position = %" G_GINT64_FORMAT, size_tmp); + /* + * sets the last content size amount before it can be updated + */ + src->prev_content_size = src->content_size; + } + return src->content_size; +} + static gboolean gst_mythtv_src_handle_event (GstPad * pad, GstEvent * event) { @@ -1011,10 +1011,3 @@ gst_mythtv_src_uri_handler_init (gpointer g_iface, gpointer iface_data) iface->get_uri = gst_mythtv_src_uri_get_uri; iface->set_uri = gst_mythtv_src_uri_set_uri; } - -void -size_header_handler (void *src, const char *value) -{ - GST_DEBUG_OBJECT (src, "content size = %" G_GUINT64_FORMAT " bytes", - GST_MYTHTV_SRC (src)->content_size); -} |