Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8269147: Update GStreamer to version 1.18.4
Reviewed-by: kcr, sykora
  • Loading branch information
Alexander Matveev committed Jun 30, 2021
1 parent a1be1d5 commit 098c0f3
Show file tree
Hide file tree
Showing 18 changed files with 175 additions and 96 deletions.
6 changes: 3 additions & 3 deletions modules/javafx.media/src/main/legal/gstreamer.md
@@ -1,11 +1,11 @@
## GStreamer v1.18.3
## GStreamer v1.18.4

### GStreamer Notice
```
You are receiving a copy of GStreamer, Version: 1.18.3 in either source or
You are receiving a copy of GStreamer, Version: 1.18.4 in either source or
object code in the JavaFX runtime or JavaFX SDK. The terms of the
Oracle license do NOT apply to the GStreamer, Version: 1.18.3; it is
Oracle license do NOT apply to the GStreamer, Version: 1.18.4; it is
licensed under the following license, separately from the Oracle programs
you receive. If you do not wish to install this library, you may delete
this library:
Expand Down
Expand Up @@ -452,66 +452,67 @@ g_uri_unescape_segment @450 NONAME
g_uri_unescape_string @451 NONAME
g_utf16_to_utf8 @452 NONAME
g_utf8_strchr @453 NONAME
g_utf8_validate @454 NONAME
g_value_array_append @455 NONAME
g_value_array_get_nth @456 NONAME
g_value_array_get_type @457 NONAME
g_value_array_new @458 NONAME
g_value_copy @459 NONAME
g_value_dup_boxed @460 NONAME
g_value_dup_object @461 NONAME
g_value_dup_string @462 NONAME
g_value_get_boolean @463 NONAME
g_value_get_boxed @464 NONAME
g_value_get_double @465 NONAME
g_value_get_enum @466 NONAME
g_value_get_flags @467 NONAME
g_value_get_float @468 NONAME
g_value_get_gtype @469 NONAME
g_value_get_int @470 NONAME
g_value_get_int64 @471 NONAME
g_value_get_long @472 NONAME
g_value_get_object @473 NONAME
g_value_get_pointer @474 NONAME
g_value_get_string @475 NONAME
g_value_get_uchar @476 NONAME
g_value_get_uint @477 NONAME
g_value_get_uint64 @478 NONAME
g_value_get_ulong @479 NONAME
g_value_init @480 NONAME
g_value_peek_pointer @481 NONAME
g_value_register_transform_func @482 NONAME
g_value_reset @483 NONAME
g_value_set_boolean @484 NONAME
g_value_set_boxed @485 NONAME
g_value_set_double @486 NONAME
g_value_set_enum @487 NONAME
g_value_set_flags @488 NONAME
g_value_set_float @489 NONAME
g_value_set_gtype @490 NONAME
g_value_set_int @491 NONAME
g_value_set_int64 @492 NONAME
g_value_set_long @493 NONAME
g_value_set_object @494 NONAME
g_value_set_pointer @495 NONAME
g_value_set_static_boxed @496 NONAME
g_value_set_static_string @497 NONAME
g_value_set_string @498 NONAME
g_value_set_uchar @499 NONAME
g_value_set_uint @500 NONAME
g_value_set_uint64 @501 NONAME
g_value_set_ulong @502 NONAME
g_value_take_boxed @503 NONAME
g_value_take_object @504 NONAME
g_value_take_string @505 NONAME
g_value_transform @506 NONAME
g_value_type_compatible @507 NONAME
g_value_unset @508 NONAME
g_vasprintf @509 NONAME
g_warn_message @510 NONAME
g_weak_ref_clear @511 NONAME
g_weak_ref_get @512 NONAME
g_weak_ref_init @513 NONAME
g_weak_ref_set @514 NONAME
g_win32_error_message @515 NONAME
g_win32_get_package_installation_directory_of_module @516 NONAME
g_utf8_to_utf16 @454 NONAME
g_utf8_validate @455 NONAME
g_value_array_append @456 NONAME
g_value_array_get_nth @457 NONAME
g_value_array_get_type @458 NONAME
g_value_array_new @459 NONAME
g_value_copy @460 NONAME
g_value_dup_boxed @461 NONAME
g_value_dup_object @462 NONAME
g_value_dup_string @463 NONAME
g_value_get_boolean @464 NONAME
g_value_get_boxed @465 NONAME
g_value_get_double @466 NONAME
g_value_get_enum @467 NONAME
g_value_get_flags @468 NONAME
g_value_get_float @469 NONAME
g_value_get_gtype @470 NONAME
g_value_get_int @471 NONAME
g_value_get_int64 @472 NONAME
g_value_get_long @473 NONAME
g_value_get_object @474 NONAME
g_value_get_pointer @475 NONAME
g_value_get_string @476 NONAME
g_value_get_uchar @477 NONAME
g_value_get_uint @478 NONAME
g_value_get_uint64 @479 NONAME
g_value_get_ulong @480 NONAME
g_value_init @481 NONAME
g_value_peek_pointer @482 NONAME
g_value_register_transform_func @483 NONAME
g_value_reset @484 NONAME
g_value_set_boolean @485 NONAME
g_value_set_boxed @486 NONAME
g_value_set_double @487 NONAME
g_value_set_enum @488 NONAME
g_value_set_flags @489 NONAME
g_value_set_float @490 NONAME
g_value_set_gtype @491 NONAME
g_value_set_int @492 NONAME
g_value_set_int64 @493 NONAME
g_value_set_long @494 NONAME
g_value_set_object @495 NONAME
g_value_set_pointer @496 NONAME
g_value_set_static_boxed @497 NONAME
g_value_set_static_string @498 NONAME
g_value_set_string @499 NONAME
g_value_set_uchar @500 NONAME
g_value_set_uint @501 NONAME
g_value_set_uint64 @502 NONAME
g_value_set_ulong @503 NONAME
g_value_take_boxed @504 NONAME
g_value_take_object @505 NONAME
g_value_take_string @506 NONAME
g_value_transform @507 NONAME
g_value_type_compatible @508 NONAME
g_value_unset @509 NONAME
g_vasprintf @510 NONAME
g_warn_message @511 NONAME
g_weak_ref_clear @512 NONAME
g_weak_ref_get @513 NONAME
g_weak_ref_init @514 NONAME
g_weak_ref_set @515 NONAME
g_win32_error_message @516 NONAME
g_win32_get_package_installation_directory_of_module @517 NONAME
Expand Up @@ -290,6 +290,10 @@ gst_audio_buffer_truncate (GstBuffer * buffer, gint bpf, gsize trim,
if (samples == orig_samples)
return buffer;

GST_DEBUG ("Truncating %" G_GSIZE_FORMAT " to %" G_GSIZE_FORMAT
" (trim start %" G_GSIZE_FORMAT ", end %" G_GSIZE_FORMAT ")",
orig_samples, samples, trim, orig_samples - trim - samples);

if (!meta || meta->info.layout == GST_AUDIO_LAYOUT_INTERLEAVED) {
/* interleaved */
ret = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, trim * bpf,
Expand All @@ -301,7 +305,7 @@ gst_audio_buffer_truncate (GstBuffer * buffer, gint bpf, gsize trim,
} else {
/* non-interleaved */
ret = gst_buffer_make_writable (buffer);
meta = gst_buffer_get_audio_meta (buffer);
meta = gst_buffer_get_audio_meta (ret);
meta->samples = samples;
for (i = 0; i < meta->info.channels; i++) {
meta->offsets[i] += trim * bpf / meta->info.channels;
Expand Down
Expand Up @@ -109,7 +109,7 @@ id3v2_parse_frame (ID3TagsWorking * work)

if (work->frame_flags & (ID3V2_FRAME_FORMAT_COMPRESSION |
ID3V2_FRAME_FORMAT_DATA_LENGTH_INDICATOR)) {
if (work->hdr.frame_data_size <= 4)
if (frame_data_size <= 4)
return FALSE;
if (ID3V2_VER_MAJOR (work->hdr.version) == 3) {
work->parse_size = GST_READ_UINT32_BE (frame_data);
Expand Down
Expand Up @@ -4258,8 +4258,19 @@ gst_video_decoder_allocate_output_frame_with_params (GstVideoDecoder *
needs_reconfigure = gst_pad_check_reconfigure (decoder->srcpad);
if (G_UNLIKELY (decoder->priv->output_state_changed || needs_reconfigure)) {
if (!gst_video_decoder_negotiate_unlocked (decoder)) {
GST_DEBUG_OBJECT (decoder, "Failed to negotiate, fallback allocation");
gst_pad_mark_reconfigure (decoder->srcpad);
if (GST_PAD_IS_FLUSHING (decoder->srcpad)) {
GST_DEBUG_OBJECT (decoder,
"Failed to negotiate a pool: pad is flushing");
goto flushing;
} else if (!decoder->priv->pool || decoder->priv->output_state_changed) {
GST_DEBUG_OBJECT (decoder,
"Failed to negotiate a pool and no previous pool to reuse");
goto error;
} else {
GST_DEBUG_OBJECT (decoder,
"Failed to negotiate a pool, falling back to the previous pool");
}
}
}

Expand All @@ -4272,6 +4283,10 @@ gst_video_decoder_allocate_output_frame_with_params (GstVideoDecoder *

return flow_ret;

flushing:
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
return GST_FLOW_FLUSHING;

error:
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
return GST_FLOW_ERROR;
Expand Down
Expand Up @@ -2916,7 +2916,7 @@ do_upsample_lines (GstLineCache * cache, gint idx, gint out_line, gint in_line,
gst_line_cache_get_lines (cache->prev, idx, out_line, start_line,
n_lines);

if (convert->upsample) {
if (convert->upsample[idx]) {
GST_DEBUG ("doing upsample %d-%d %p", start_line, start_line + n_lines - 1,
lines[0]);
gst_video_chroma_resample (convert->upsample[idx], lines,
Expand Down Expand Up @@ -3117,7 +3117,7 @@ do_downsample_lines (GstLineCache * cache, gint idx, gint out_line,
gst_line_cache_get_lines (cache->prev, idx, out_line, start_line,
n_lines);

if (convert->downsample) {
if (convert->downsample[idx]) {
GST_DEBUG ("downsample line %d %d-%d %p", in_line, start_line,
start_line + n_lines - 1, lines[0]);
gst_video_chroma_resample (convert->downsample[idx], lines,
Expand All @@ -3140,7 +3140,7 @@ do_dither_lines (GstLineCache * cache, gint idx, gint out_line, gint in_line,
lines = gst_line_cache_get_lines (cache->prev, idx, out_line, in_line, 1);
destline = lines[0];

if (convert->dither) {
if (convert->dither[idx]) {
GST_DEBUG ("Dither line %d %p", in_line, destline);
gst_video_dither_line (convert->dither[idx], destline, 0, out_line,
convert->out_width);
Expand Down
Expand Up @@ -641,7 +641,7 @@ gst_video_info_is_equal (const GstVideoInfo * info, const GstVideoInfo * other)
* Returns: a new #GstCaps containing the info of @info.
*/
GstCaps *
gst_video_info_to_caps (GstVideoInfo * info)
gst_video_info_to_caps (const GstVideoInfo * info)
{
GstCaps *caps;
const gchar *format;
Expand Down Expand Up @@ -686,14 +686,14 @@ gst_video_info_to_caps (GstVideoInfo * info)

if (GST_VIDEO_INFO_MULTIVIEW_MODE (info) != GST_VIDEO_MULTIVIEW_MODE_NONE) {
const gchar *caps_str = NULL;
GstVideoMultiviewFlags multiview_flags =
GST_VIDEO_INFO_MULTIVIEW_FLAGS (info);

/* If the half-aspect flag is set, applying it into the PAR of the
* resulting caps now seems safe, and helps with automatic behaviour
* in elements that aren't explicitly multiview aware */
if (GST_VIDEO_INFO_MULTIVIEW_FLAGS (info) &
GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT) {
GST_VIDEO_INFO_MULTIVIEW_FLAGS (info) &=
~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT;
if (multiview_flags & GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT) {
multiview_flags &= ~GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT;
switch (GST_VIDEO_INFO_MULTIVIEW_MODE (info)) {
case GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE:
case GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX:
Expand All @@ -716,7 +716,7 @@ gst_video_info_to_caps (GstVideoInfo * info)
if (caps_str != NULL) {
gst_caps_set_simple (caps, "multiview-mode", G_TYPE_STRING,
caps_str, "multiview-flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGSET,
GST_VIDEO_INFO_MULTIVIEW_FLAGS (info), GST_FLAG_SET_MASK_EXACT, NULL);
multiview_flags, GST_FLAG_SET_MASK_EXACT, NULL);
}
}

Expand Down
Expand Up @@ -452,7 +452,7 @@ GST_VIDEO_API
gboolean gst_video_info_from_caps (GstVideoInfo *info, const GstCaps * caps);

GST_VIDEO_API
GstCaps * gst_video_info_to_caps (GstVideoInfo *info);
GstCaps * gst_video_info_to_caps (const GstVideoInfo *info);

GST_VIDEO_API
gboolean gst_video_info_convert (GstVideoInfo *info,
Expand Down
Expand Up @@ -1801,7 +1801,7 @@ gst_buffer_resize_range (GstBuffer * buffer, guint idx, gint length,
/**
* gst_buffer_map:
* @buffer: a #GstBuffer.
* @info: (out): info about the mapping
* @info: (out caller-allocates): info about the mapping
* @flags: flags for the mapping
*
* This function fills @info with the #GstMapInfo of all merged memory
Expand Down Expand Up @@ -1831,7 +1831,7 @@ gst_buffer_map (GstBuffer * buffer, GstMapInfo * info, GstMapFlags flags)
* @buffer: a #GstBuffer.
* @idx: an index
* @length: a length
* @info: (out): info about the mapping
* @info: (out caller-allocates): info about the mapping
* @flags: flags for the mapping
*
* This function fills @info with the #GstMapInfo of @length merged memory blocks
Expand Down
Expand Up @@ -642,6 +642,7 @@ gboolean gst_clock_periodic_id_reinit (GstClock * clock,
GstClockTime interval);

G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstClock, gst_object_unref)
G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GstClockID, gst_clock_id_unref, 0)

G_END_DECLS

Expand Down
Expand Up @@ -2370,6 +2370,8 @@ void
gst_debug_add_log_function (GstLogFunction func, gpointer user_data,
GDestroyNotify notify)
{
if (notify)
notify (user_data);
}

guint
Expand Down
Expand Up @@ -220,7 +220,7 @@ gst_memory_resize (GstMemory * mem, gssize offset, gsize size)
/**
* gst_memory_make_mapped:
* @mem: (transfer full): a #GstMemory
* @info: (out): pointer for info
* @info: (out caller-allocates): pointer for info
* @flags: mapping flags
*
* Create a #GstMemory object that is mapped with @flags. If @mem is mappable
Expand Down Expand Up @@ -270,7 +270,7 @@ gst_memory_make_mapped (GstMemory * mem, GstMapInfo * info, GstMapFlags flags)
/**
* gst_memory_map:
* @mem: a #GstMemory
* @info: (out): pointer for info
* @info: (out caller-allocates): pointer for info
* @flags: mapping flags
*
* Fill @info with the pointer and sizes of the memory in @mem that can be
Expand Down

1 comment on commit 098c0f3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.