mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
Merge remote-tracking branch 'origin/master' into 0.11
Conflicts: NEWS RELEASE configure.ac docs/plugins/gstreamer-plugins.hierarchy docs/plugins/inspect/plugin-coreelements.xml libs/gst/base/gstcollectpads.c libs/gst/base/gstcollectpads2.c plugins/elements/gstfdsink.c win32/common/config.h win32/common/gstenumtypes.c win32/common/gstversion.h
This commit is contained in:
commit
1fbcc71dbd
8 changed files with 100 additions and 47 deletions
|
@ -35,7 +35,9 @@ then
|
||||||
ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
|
ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# GNU gettext automake support doesn't get along with git.
|
||||||
|
# https://bugzilla.gnome.org/show_bug.cgi?id=661128
|
||||||
|
touch -t 200001010000 po/gstreamer-0.10.pot
|
||||||
|
|
||||||
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-failing-tests --enable-poisoning --enable-gtk-doc --enable-docbook'
|
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-failing-tests --enable-poisoning --enable-gtk-doc --enable-docbook'
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<description>GStreamer core indexers</description>
|
<description>GStreamer core indexers</description>
|
||||||
<filename>../../plugins/indexers/.libs/libgstcoreindexers.so</filename>
|
<filename>../../plugins/indexers/.libs/libgstcoreindexers.so</filename>
|
||||||
<basename>libgstcoreindexers.so</basename>
|
<basename>libgstcoreindexers.so</basename>
|
||||||
<version>0.10.35.1</version>
|
<version>0.10.36.1</version>
|
||||||
<license>LGPL</license>
|
<license>LGPL</license>
|
||||||
<source>gstreamer</source>
|
<source>gstreamer</source>
|
||||||
<package>GStreamer git</package>
|
<package>GStreamer git</package>
|
||||||
|
|
|
@ -219,10 +219,11 @@ gst_registry_binary_cache_write (BinaryRegistryCache * cache,
|
||||||
{
|
{
|
||||||
long written;
|
long written;
|
||||||
if (offset != cache->currentoffset) {
|
if (offset != cache->currentoffset) {
|
||||||
if (lseek (cache->cache_fd, offset, SEEK_SET) != 0) {
|
if (lseek (cache->cache_fd, offset, SEEK_SET) < 0) {
|
||||||
GST_ERROR ("Seeking to new offset failed");
|
GST_ERROR ("Seeking to new offset failed: %s", g_strerror (errno));
|
||||||
return FALSE;
|
return -1;
|
||||||
}
|
}
|
||||||
|
GST_LOG ("Seeked from offset %lu to %lu", offset, cache->currentoffset);
|
||||||
cache->currentoffset = offset;
|
cache->currentoffset = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,13 +246,14 @@ gst_registry_binary_cache_finish (BinaryRegistryCache * cache, gboolean success)
|
||||||
if (close (cache->cache_fd) < 0)
|
if (close (cache->cache_fd) < 0)
|
||||||
goto close_failed;
|
goto close_failed;
|
||||||
|
|
||||||
if (success) {
|
if (!success)
|
||||||
|
goto fail_after_close;
|
||||||
|
|
||||||
/* Only do the rename if we wrote the entire file successfully */
|
/* Only do the rename if we wrote the entire file successfully */
|
||||||
if (g_rename (cache->tmp_location, cache->location) < 0) {
|
if (g_rename (cache->tmp_location, cache->location) < 0) {
|
||||||
GST_ERROR ("g_rename() failed: %s", g_strerror (errno));
|
GST_ERROR ("g_rename() failed: %s", g_strerror (errno));
|
||||||
goto rename_failed;
|
goto rename_failed;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
g_free (cache->tmp_location);
|
g_free (cache->tmp_location);
|
||||||
g_slice_free (BinaryRegistryCache, cache);
|
g_slice_free (BinaryRegistryCache, cache);
|
||||||
|
|
|
@ -277,10 +277,10 @@ gst_collect_pads2_finalize (GObject * object)
|
||||||
*
|
*
|
||||||
* Create a new instance of #GstCollectsPads.
|
* Create a new instance of #GstCollectsPads.
|
||||||
*
|
*
|
||||||
* Returns: a new #GstCollectPads2, or NULL in case of an error.
|
|
||||||
*
|
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*
|
*
|
||||||
|
* Returns: (transfer full): a new #GstCollectPads2, or NULL in case of an error.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstCollectPads2 *
|
GstCollectPads2 *
|
||||||
|
@ -306,7 +306,7 @@ gst_collect_pads2_set_buffer_function_locked (GstCollectPads2 * pads,
|
||||||
* gst_collect_pads2_set_buffer_function:
|
* gst_collect_pads2_set_buffer_function:
|
||||||
* @pads: the collectpads to use
|
* @pads: the collectpads to use
|
||||||
* @func: the function to set
|
* @func: the function to set
|
||||||
* @user_data: user data passed to the function
|
* @user_data: (closure): user data passed to the function
|
||||||
*
|
*
|
||||||
* Set the callback function and user data that will be called with
|
* Set the callback function and user data that will be called with
|
||||||
* the oldest buffer when all pads have been collected.
|
* the oldest buffer when all pads have been collected.
|
||||||
|
@ -331,7 +331,7 @@ gst_collect_pads2_set_buffer_function (GstCollectPads2 * pads,
|
||||||
* gst_collect_pads2_set_compare_function:
|
* gst_collect_pads2_set_compare_function:
|
||||||
* @pads: the pads to use
|
* @pads: the pads to use
|
||||||
* @func: the function to set
|
* @func: the function to set
|
||||||
* @user_data: user data passed to the function
|
* @user_data: (closure): user data passed to the function
|
||||||
*
|
*
|
||||||
* Set the timestamp comparison function.
|
* Set the timestamp comparison function.
|
||||||
*
|
*
|
||||||
|
@ -515,7 +515,7 @@ gst_collect_pads2_set_clip_function (GstCollectPads2 * pads,
|
||||||
/**
|
/**
|
||||||
* gst_collect_pads2_add_pad:
|
* gst_collect_pads2_add_pad:
|
||||||
* @pads: the collectspads to use
|
* @pads: the collectspads to use
|
||||||
* @pad: the pad to add
|
* @pad: (transfer none): the pad to add
|
||||||
* @size: the size of the returned #GstCollectData2 structure
|
* @size: the size of the returned #GstCollectData2 structure
|
||||||
*
|
*
|
||||||
* Add a pad to the collection of collect pads. The pad has to be
|
* Add a pad to the collection of collect pads. The pad has to be
|
||||||
|
@ -529,14 +529,14 @@ gst_collect_pads2_set_clip_function (GstCollectPads2 * pads,
|
||||||
* The pad will be automatically activated in push mode when @pads is
|
* The pad will be automatically activated in push mode when @pads is
|
||||||
* started.
|
* started.
|
||||||
*
|
*
|
||||||
* This function calls gst_collect_pads2_add_pad() passing a value of NULL
|
* This function calls gst_collect_pads2_add_pad_full() passing a value of NULL
|
||||||
* for destroy_notify and TRUE for locked.
|
* for destroy_notify and TRUE for locked.
|
||||||
*
|
*
|
||||||
|
* MT safe.
|
||||||
|
*
|
||||||
* Returns: a new #GstCollectData2 to identify the new pad. Or NULL
|
* Returns: a new #GstCollectData2 to identify the new pad. Or NULL
|
||||||
* if wrong parameters are supplied.
|
* if wrong parameters are supplied.
|
||||||
*
|
*
|
||||||
* MT safe.
|
|
||||||
*
|
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstCollectData2 *
|
GstCollectData2 *
|
||||||
|
@ -548,7 +548,7 @@ gst_collect_pads2_add_pad (GstCollectPads2 * pads, GstPad * pad, guint size)
|
||||||
/**
|
/**
|
||||||
* gst_collect_pads2_add_pad_full:
|
* gst_collect_pads2_add_pad_full:
|
||||||
* @pads: the collectspads to use
|
* @pads: the collectspads to use
|
||||||
* @pad: the pad to add
|
* @pad: (transfer none): the pad to add
|
||||||
* @size: the size of the returned #GstCollectData2 structure
|
* @size: the size of the returned #GstCollectData2 structure
|
||||||
* @destroy_notify: function to be called before the returned #GstCollectData2
|
* @destroy_notify: function to be called before the returned #GstCollectData2
|
||||||
* structure is freed
|
* structure is freed
|
||||||
|
@ -578,12 +578,12 @@ gst_collect_pads2_add_pad (GstCollectPads2 * pads, GstPad * pad, guint size)
|
||||||
* The pad will be automatically activated in push mode when @pads is
|
* The pad will be automatically activated in push mode when @pads is
|
||||||
* started.
|
* started.
|
||||||
*
|
*
|
||||||
|
* MT safe.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*
|
*
|
||||||
* Returns: a new #GstCollectData2 to identify the new pad. Or NULL
|
* Returns: a new #GstCollectData2 to identify the new pad. Or NULL
|
||||||
* if wrong parameters are supplied.
|
* if wrong parameters are supplied.
|
||||||
*
|
|
||||||
* MT safe.
|
|
||||||
*/
|
*/
|
||||||
GstCollectData2 *
|
GstCollectData2 *
|
||||||
gst_collect_pads2_add_pad_full (GstCollectPads2 * pads, GstPad * pad,
|
gst_collect_pads2_add_pad_full (GstCollectPads2 * pads, GstPad * pad,
|
||||||
|
@ -646,7 +646,7 @@ find_pad (GstCollectData2 * data, GstPad * pad)
|
||||||
/**
|
/**
|
||||||
* gst_collect_pads2_remove_pad:
|
* gst_collect_pads2_remove_pad:
|
||||||
* @pads: the collectspads to use
|
* @pads: the collectspads to use
|
||||||
* @pad: the pad to remove
|
* @pad: (transfer none): the pad to remove
|
||||||
*
|
*
|
||||||
* Remove a pad from the collection of collect pads. This function will also
|
* Remove a pad from the collection of collect pads. This function will also
|
||||||
* free the #GstCollectData2 and all the resources that were allocated with
|
* free the #GstCollectData2 and all the resources that were allocated with
|
||||||
|
@ -654,10 +654,10 @@ find_pad (GstCollectData2 * data, GstPad * pad)
|
||||||
*
|
*
|
||||||
* The pad will be deactivated automatically when @pads is stopped.
|
* The pad will be deactivated automatically when @pads is stopped.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the pad could be removed.
|
|
||||||
*
|
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*
|
*
|
||||||
|
* Returns: %TRUE if the pad could be removed.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -741,10 +741,10 @@ unknown_pad:
|
||||||
*
|
*
|
||||||
* This function is currently not implemented.
|
* This function is currently not implemented.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the pad is active.
|
|
||||||
*
|
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*
|
*
|
||||||
|
* Returns: %TRUE if the pad is active.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -769,10 +769,10 @@ gst_collect_pads2_is_active (GstCollectPads2 * pads, GstPad * pad)
|
||||||
*
|
*
|
||||||
* This function is currently not implemented.
|
* This function is currently not implemented.
|
||||||
*
|
*
|
||||||
* Returns: #GstFlowReturn of the operation.
|
|
||||||
*
|
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*
|
*
|
||||||
|
* Returns: #GstFlowReturn of the operation.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstFlowReturn
|
GstFlowReturn
|
||||||
|
@ -797,10 +797,10 @@ gst_collect_pads2_collect (GstCollectPads2 * pads)
|
||||||
*
|
*
|
||||||
* This function is currently not implemented.
|
* This function is currently not implemented.
|
||||||
*
|
*
|
||||||
* Returns: #GstFlowReturn of the operation.
|
|
||||||
*
|
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*
|
*
|
||||||
|
* Returns: #GstFlowReturn of the operation.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstFlowReturn
|
GstFlowReturn
|
||||||
|
@ -860,7 +860,6 @@ gst_collect_pads2_set_flushing_unlocked (GstCollectPads2 * pads,
|
||||||
*
|
*
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
@ -987,11 +986,11 @@ gst_collect_pads2_stop (GstCollectPads2 * pads)
|
||||||
* should be called with the @pads STREAM_LOCK held, such as in the callback
|
* should be called with the @pads STREAM_LOCK held, such as in the callback
|
||||||
* handler.
|
* handler.
|
||||||
*
|
*
|
||||||
|
* MT safe.
|
||||||
|
*
|
||||||
* Returns: The buffer in @data or NULL if no buffer is queued.
|
* Returns: The buffer in @data or NULL if no buffer is queued.
|
||||||
* should unref the buffer after usage.
|
* should unref the buffer after usage.
|
||||||
*
|
*
|
||||||
* MT safe.
|
|
||||||
*
|
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstBuffer *
|
GstBuffer *
|
||||||
|
@ -1021,11 +1020,11 @@ gst_collect_pads2_peek (GstCollectPads2 * pads, GstCollectData2 * data)
|
||||||
* should be called with the @pads STREAM_LOCK held, such as in the callback
|
* should be called with the @pads STREAM_LOCK held, such as in the callback
|
||||||
* handler.
|
* handler.
|
||||||
*
|
*
|
||||||
* Returns: The buffer in @data or NULL if no buffer was queued.
|
|
||||||
* You should unref the buffer after usage.
|
|
||||||
*
|
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*
|
*
|
||||||
|
* Returns: (transfer full): The buffer in @data or NULL if no buffer was
|
||||||
|
* queued. You should unref the buffer after usage.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstBuffer *
|
GstBuffer *
|
||||||
|
@ -1075,11 +1074,11 @@ gst_collect_pads2_clear (GstCollectPads2 * pads, GstCollectData2 * data)
|
||||||
* This function should be called with @pads STREAM_LOCK held, such as
|
* This function should be called with @pads STREAM_LOCK held, such as
|
||||||
* in the callback.
|
* in the callback.
|
||||||
*
|
*
|
||||||
|
* MT safe.
|
||||||
|
*
|
||||||
* Returns: The maximum number of bytes queued on all pads. This function
|
* Returns: The maximum number of bytes queued on all pads. This function
|
||||||
* returns 0 if a pad has no queued buffer.
|
* returns 0 if a pad has no queued buffer.
|
||||||
*
|
*
|
||||||
* MT safe.
|
|
||||||
*
|
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
/* we might pre-calculate this in some struct field,
|
/* we might pre-calculate this in some struct field,
|
||||||
|
@ -1146,11 +1145,11 @@ not_filled:
|
||||||
* This function should be called with @pads STREAM_LOCK held, such as
|
* This function should be called with @pads STREAM_LOCK held, such as
|
||||||
* in the callback.
|
* in the callback.
|
||||||
*
|
*
|
||||||
|
* MT safe.
|
||||||
|
*
|
||||||
* Returns: The number of bytes flushed This can be less than @size and
|
* Returns: The number of bytes flushed This can be less than @size and
|
||||||
* is 0 if the pad was end-of-stream.
|
* is 0 if the pad was end-of-stream.
|
||||||
*
|
*
|
||||||
* MT safe.
|
|
||||||
*
|
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
guint
|
guint
|
||||||
|
@ -1194,13 +1193,13 @@ gst_collect_pads2_flush (GstCollectPads2 * pads, GstCollectData2 * data,
|
||||||
* This function should be called with @pads STREAM_LOCK held, such as in the
|
* This function should be called with @pads STREAM_LOCK held, such as in the
|
||||||
* callback.
|
* callback.
|
||||||
*
|
*
|
||||||
|
* MT safe.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*
|
*
|
||||||
* Returns: A sub buffer. The size of the buffer can be less that requested.
|
* Returns: (transfer full): A sub buffer. The size of the buffer can be less that requested.
|
||||||
* A return of NULL signals that the pad is end-of-stream.
|
* A return of NULL signals that the pad is end-of-stream.
|
||||||
* Unref the buffer after use.
|
* Unref the buffer after use.
|
||||||
*
|
|
||||||
* MT safe.
|
|
||||||
*/
|
*/
|
||||||
GstBuffer *
|
GstBuffer *
|
||||||
gst_collect_pads2_read_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
|
gst_collect_pads2_read_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
|
||||||
|
@ -1235,13 +1234,13 @@ gst_collect_pads2_read_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
|
||||||
* This function should be called with @pads STREAM_LOCK held, such as in the
|
* This function should be called with @pads STREAM_LOCK held, such as in the
|
||||||
* callback.
|
* callback.
|
||||||
*
|
*
|
||||||
|
* MT safe.
|
||||||
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*
|
*
|
||||||
* Returns: A sub buffer. The size of the buffer can be less that requested.
|
* Returns: A sub buffer. The size of the buffer can be less that requested.
|
||||||
* A return of NULL signals that the pad is end-of-stream.
|
* A return of NULL signals that the pad is end-of-stream.
|
||||||
* Unref the buffer after use.
|
* Unref the buffer after use.
|
||||||
*
|
|
||||||
* MT safe.
|
|
||||||
*/
|
*/
|
||||||
GstBuffer *
|
GstBuffer *
|
||||||
gst_collect_pads2_take_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
|
gst_collect_pads2_take_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
|
||||||
|
|
|
@ -131,6 +131,7 @@ static GstFlowReturn gst_fake_sink_preroll (GstBaseSink * bsink,
|
||||||
static GstFlowReturn gst_fake_sink_render (GstBaseSink * bsink,
|
static GstFlowReturn gst_fake_sink_render (GstBaseSink * bsink,
|
||||||
GstBuffer * buffer);
|
GstBuffer * buffer);
|
||||||
static gboolean gst_fake_sink_event (GstBaseSink * bsink, GstEvent * event);
|
static gboolean gst_fake_sink_event (GstBaseSink * bsink, GstEvent * event);
|
||||||
|
static gboolean gst_fake_sink_query (GstBaseSink * bsink, GstQuery * query);
|
||||||
|
|
||||||
static guint gst_fake_sink_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_fake_sink_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
@ -232,6 +233,7 @@ gst_fake_sink_class_init (GstFakeSinkClass * klass)
|
||||||
gstbase_sink_class->event = GST_DEBUG_FUNCPTR (gst_fake_sink_event);
|
gstbase_sink_class->event = GST_DEBUG_FUNCPTR (gst_fake_sink_event);
|
||||||
gstbase_sink_class->preroll = GST_DEBUG_FUNCPTR (gst_fake_sink_preroll);
|
gstbase_sink_class->preroll = GST_DEBUG_FUNCPTR (gst_fake_sink_preroll);
|
||||||
gstbase_sink_class->render = GST_DEBUG_FUNCPTR (gst_fake_sink_render);
|
gstbase_sink_class->render = GST_DEBUG_FUNCPTR (gst_fake_sink_render);
|
||||||
|
gstbase_sink_class->query = GST_DEBUG_FUNCPTR (gst_fake_sink_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -510,6 +512,29 @@ eos:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_fake_sink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
|
{
|
||||||
|
gboolean ret;
|
||||||
|
|
||||||
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
|
case GST_QUERY_SEEKING:{
|
||||||
|
GstFormat fmt;
|
||||||
|
|
||||||
|
/* we don't supporting seeking */
|
||||||
|
gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL);
|
||||||
|
gst_query_set_seeking (query, fmt, FALSE, 0, -1);
|
||||||
|
ret = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
ret = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
gst_fake_sink_change_state (GstElement * element, GstStateChange transition)
|
gst_fake_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
{
|
{
|
||||||
|
|
|
@ -208,6 +208,16 @@ gst_fd_sink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
gst_query_set_uri (query, fdsink->uri);
|
gst_query_set_uri (query, fdsink->uri);
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
break;
|
break;
|
||||||
|
case GST_QUERY_SEEKING:
|
||||||
|
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
|
||||||
|
if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
|
||||||
|
gst_query_set_seeking (query, GST_FORMAT_BYTES, fdsink->seekable, 0,
|
||||||
|
-1);
|
||||||
|
} else {
|
||||||
|
gst_query_set_seeking (query, format, FALSE, 0, -1);
|
||||||
|
}
|
||||||
|
res = TRUE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||||
break;
|
break;
|
||||||
|
@ -384,6 +394,9 @@ gst_fd_sink_start (GstBaseSink * basesink)
|
||||||
fdsink->bytes_written = 0;
|
fdsink->bytes_written = 0;
|
||||||
fdsink->current_pos = 0;
|
fdsink->current_pos = 0;
|
||||||
|
|
||||||
|
fdsink->seekable = gst_fd_sink_do_seek (fdsink, 0);
|
||||||
|
GST_INFO_OBJECT (fdsink, "seeking supported: %d", fdsink->seekable);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
|
|
@ -59,6 +59,8 @@ struct _GstFdSink {
|
||||||
int fd;
|
int fd;
|
||||||
guint64 bytes_written;
|
guint64 bytes_written;
|
||||||
guint64 current_pos;
|
guint64 current_pos;
|
||||||
|
|
||||||
|
gboolean seekable;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstFdSinkClass {
|
struct _GstFdSinkClass {
|
||||||
|
|
|
@ -482,6 +482,16 @@ gst_file_sink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case GST_QUERY_SEEKING:
|
||||||
|
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
|
||||||
|
if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
|
||||||
|
gst_query_set_seeking (query, GST_FORMAT_BYTES, self->seekable, 0, -1);
|
||||||
|
} else {
|
||||||
|
gst_query_set_seeking (query, format, FALSE, 0, -1);
|
||||||
|
}
|
||||||
|
res = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue