mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +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
|
||||
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'
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<description>GStreamer core indexers</description>
|
||||
<filename>../../plugins/indexers/.libs/libgstcoreindexers.so</filename>
|
||||
<basename>libgstcoreindexers.so</basename>
|
||||
<version>0.10.35.1</version>
|
||||
<version>0.10.36.1</version>
|
||||
<license>LGPL</license>
|
||||
<source>gstreamer</source>
|
||||
<package>GStreamer git</package>
|
||||
<origin>Unknown package origin</origin>
|
||||
<elements>
|
||||
</elements>
|
||||
</plugin>
|
||||
</plugin>
|
|
@ -219,10 +219,11 @@ gst_registry_binary_cache_write (BinaryRegistryCache * cache,
|
|||
{
|
||||
long written;
|
||||
if (offset != cache->currentoffset) {
|
||||
if (lseek (cache->cache_fd, offset, SEEK_SET) != 0) {
|
||||
GST_ERROR ("Seeking to new offset failed");
|
||||
return FALSE;
|
||||
if (lseek (cache->cache_fd, offset, SEEK_SET) < 0) {
|
||||
GST_ERROR ("Seeking to new offset failed: %s", g_strerror (errno));
|
||||
return -1;
|
||||
}
|
||||
GST_LOG ("Seeked from offset %lu to %lu", offset, cache->currentoffset);
|
||||
cache->currentoffset = offset;
|
||||
}
|
||||
|
||||
|
@ -245,12 +246,13 @@ gst_registry_binary_cache_finish (BinaryRegistryCache * cache, gboolean success)
|
|||
if (close (cache->cache_fd) < 0)
|
||||
goto close_failed;
|
||||
|
||||
if (success) {
|
||||
/* Only do the rename if we wrote the entire file successfully */
|
||||
if (g_rename (cache->tmp_location, cache->location) < 0) {
|
||||
GST_ERROR ("g_rename() failed: %s", g_strerror (errno));
|
||||
goto rename_failed;
|
||||
}
|
||||
if (!success)
|
||||
goto fail_after_close;
|
||||
|
||||
/* Only do the rename if we wrote the entire file successfully */
|
||||
if (g_rename (cache->tmp_location, cache->location) < 0) {
|
||||
GST_ERROR ("g_rename() failed: %s", g_strerror (errno));
|
||||
goto rename_failed;
|
||||
}
|
||||
|
||||
g_free (cache->tmp_location);
|
||||
|
|
|
@ -277,10 +277,10 @@ gst_collect_pads2_finalize (GObject * object)
|
|||
*
|
||||
* Create a new instance of #GstCollectsPads.
|
||||
*
|
||||
* Returns: a new #GstCollectPads2, or NULL in case of an error.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: (transfer full): a new #GstCollectPads2, or NULL in case of an error.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
GstCollectPads2 *
|
||||
|
@ -306,7 +306,7 @@ gst_collect_pads2_set_buffer_function_locked (GstCollectPads2 * pads,
|
|||
* gst_collect_pads2_set_buffer_function:
|
||||
* @pads: the collectpads to use
|
||||
* @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
|
||||
* 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:
|
||||
* @pads: the pads to use
|
||||
* @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.
|
||||
*
|
||||
|
@ -515,7 +515,7 @@ gst_collect_pads2_set_clip_function (GstCollectPads2 * pads,
|
|||
/**
|
||||
* gst_collect_pads2_add_pad:
|
||||
* @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
|
||||
*
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: a new #GstCollectData2 to identify the new pad. Or NULL
|
||||
* if wrong parameters are supplied.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
GstCollectData2 *
|
||||
|
@ -548,7 +548,7 @@ gst_collect_pads2_add_pad (GstCollectPads2 * pads, GstPad * pad, guint size)
|
|||
/**
|
||||
* gst_collect_pads2_add_pad_full:
|
||||
* @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
|
||||
* @destroy_notify: function to be called before the returned #GstCollectData2
|
||||
* 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
|
||||
* started.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*
|
||||
* Returns: a new #GstCollectData2 to identify the new pad. Or NULL
|
||||
* if wrong parameters are supplied.
|
||||
*
|
||||
* MT safe.
|
||||
*/
|
||||
GstCollectData2 *
|
||||
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:
|
||||
* @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
|
||||
* 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.
|
||||
*
|
||||
* Returns: %TRUE if the pad could be removed.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: %TRUE if the pad could be removed.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
gboolean
|
||||
|
@ -741,10 +741,10 @@ unknown_pad:
|
|||
*
|
||||
* This function is currently not implemented.
|
||||
*
|
||||
* Returns: %TRUE if the pad is active.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: %TRUE if the pad is active.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
gboolean
|
||||
|
@ -769,10 +769,10 @@ gst_collect_pads2_is_active (GstCollectPads2 * pads, GstPad * pad)
|
|||
*
|
||||
* This function is currently not implemented.
|
||||
*
|
||||
* Returns: #GstFlowReturn of the operation.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: #GstFlowReturn of the operation.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
GstFlowReturn
|
||||
|
@ -797,10 +797,10 @@ gst_collect_pads2_collect (GstCollectPads2 * pads)
|
|||
*
|
||||
* This function is currently not implemented.
|
||||
*
|
||||
* Returns: #GstFlowReturn of the operation.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: #GstFlowReturn of the operation.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
GstFlowReturn
|
||||
|
@ -860,7 +860,6 @@ gst_collect_pads2_set_flushing_unlocked (GstCollectPads2 * pads,
|
|||
*
|
||||
* MT safe.
|
||||
*
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
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
|
||||
* handler.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: The buffer in @data or NULL if no buffer is queued.
|
||||
* should unref the buffer after usage.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
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
|
||||
* handler.
|
||||
*
|
||||
* Returns: The buffer in @data or NULL if no buffer was queued.
|
||||
* You should unref the buffer after usage.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
* in the callback.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: The maximum number of bytes queued on all pads. This function
|
||||
* returns 0 if a pad has no queued buffer.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
/* 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
|
||||
* in the callback.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Returns: The number of bytes flushed This can be less than @size and
|
||||
* is 0 if the pad was end-of-stream.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
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
|
||||
* callback.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* 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.
|
||||
* Unref the buffer after use.
|
||||
*
|
||||
* MT safe.
|
||||
*/
|
||||
GstBuffer *
|
||||
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
|
||||
* callback.
|
||||
*
|
||||
* MT safe.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*
|
||||
* 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.
|
||||
* Unref the buffer after use.
|
||||
*
|
||||
* MT safe.
|
||||
*/
|
||||
GstBuffer *
|
||||
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,
|
||||
GstBuffer * buffer);
|
||||
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 };
|
||||
|
||||
|
@ -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->preroll = GST_DEBUG_FUNCPTR (gst_fake_sink_preroll);
|
||||
gstbase_sink_class->render = GST_DEBUG_FUNCPTR (gst_fake_sink_render);
|
||||
gstbase_sink_class->query = GST_DEBUG_FUNCPTR (gst_fake_sink_query);
|
||||
}
|
||||
|
||||
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
|
||||
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);
|
||||
res = TRUE;
|
||||
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:
|
||||
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||
break;
|
||||
|
@ -384,6 +394,9 @@ gst_fd_sink_start (GstBaseSink * basesink)
|
|||
fdsink->bytes_written = 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;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
|
@ -59,6 +59,8 @@ struct _GstFdSink {
|
|||
int fd;
|
||||
guint64 bytes_written;
|
||||
guint64 current_pos;
|
||||
|
||||
gboolean seekable;
|
||||
};
|
||||
|
||||
struct _GstFdSinkClass {
|
||||
|
|
|
@ -482,6 +482,16 @@ gst_file_sink_query (GstBaseSink * bsink, GstQuery * query)
|
|||
res = TRUE;
|
||||
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:
|
||||
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue