[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:gst-droid.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,8 +1,8 @@
<services>
<service name="tar_git">
<param name="url">https://github.com/sailfishos/gst-droid.git</param>
- <param name="branch">master</param>
- <param name="revision">0.20210518.0</param>
+ <param name="branch">upgrade-4.2.0</param>
+ <param name="revision">HEAD</param>
<param name="token"></param>
<param name="debian"></param>
<param name="dumb"></param>
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20210518.1.tar.gz/gst-libs/gst/droid/gstdroidcodec.c
^
|
@@ -929,7 +929,7 @@
GST_WRITE_UINT16_BE (codec_data, codec_data_data);
- data = gst_buffer_new_and_alloc (2);
+ data = gst_buffer_new_allocate(NULL, 2, NULL);
gst_buffer_fill (data, 0, codec_data, 2);
ret = create_aacdec_codec_data_from_codec_data (codec, data, out);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20210518.1.tar.gz/gst/droidcamsrc/gstdroidcamsrc.c
^
|
@@ -454,7 +454,7 @@
new_caps = gst_caps_ref (new_caps);
}
- if (!gst_caps_is_equal (src->preview_caps, new_caps)) {
+ if (!src->preview_caps || !gst_caps_is_equal (src->preview_caps, new_caps)) {
gst_caps_replace (&src->preview_caps, new_caps);
if (src->preview_pipeline) {
@@ -1308,7 +1308,7 @@
GST_DEBUG_OBJECT (pad, "Pushing SEGMENT");
if (data->adjust_segment) {
- data->segment.start = GST_BUFFER_TIMESTAMP (buffer);
+ data->segment.start = GST_BUFFER_PTS (buffer);
}
event = gst_event_new_segment (&data->segment);
@@ -1705,7 +1705,7 @@
gst_droidcamsrc_params_choose_video_framerate (src->dev->params, our_caps);
}
- if (!gst_pad_set_caps (data->pad, our_caps)) {
+ if (!gst_pad_push_event (data->pad, gst_event_new_caps (our_caps))) {
GST_ERROR_OBJECT (src, "failed to set caps");
goto out;
}
@@ -1865,7 +1865,7 @@
our_caps = gst_droidcamsrc_pick_largest_resolution (src, our_caps);
gst_droidcamsrc_params_choose_image_framerate (src->dev->params, our_caps);
- if (!gst_pad_set_caps (data->pad, our_caps)) {
+ if (!gst_pad_push_event (data->pad, gst_event_new_caps (our_caps))) {
GST_ERROR_OBJECT (src, "failed to set caps");
goto out;
}
@@ -1937,14 +1937,9 @@
our_caps = gst_caps_make_writable (our_caps);
our_caps = gst_droidcamsrc_pick_largest_resolution (src, our_caps);
- /* just in case.
- * TODO: a better way of doing it is to get the current fps preview range and use its
- * upper bound
- */
- gst_structure_fixate_field_nearest_fraction (gst_caps_get_structure (our_caps,
- 0), "framerate", G_MAXINT, 1);
+ gst_droidcamsrc_params_choose_framerate (src->dev->params, our_caps, FALSE, NULL);
- if (!gst_pad_set_caps (data->pad, our_caps)) {
+ if (!gst_pad_push_event (data->pad, gst_event_new_caps (our_caps))) {
GST_ERROR_OBJECT (src, "failed to set caps");
goto out;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20210518.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcparams.c
^
|
@@ -465,8 +465,8 @@
}
void
-gst_droidcamsrc_params_choose_image_framerate (GstDroidCamSrcParams * params,
- GstCaps * caps)
+gst_droidcamsrc_params_choose_framerate (GstDroidCamSrcParams * params,
+ GstCaps * caps, gboolean widest, const char *set_param_name)
{
int x;
int target_min = -1, target_max = -1;
@@ -493,75 +493,50 @@
gst_caps_unref (c);
- /* the fps we have is valid. Select it if higher than our current target, or wider */
- if (max > target_max || (max == target_max && min < target_min)) {
- target_min = min;
- target_max = max;
+ if (widest) {
+ /* the fps we have is valid. Select it if higher than our current target, or wider */
+ if (max > target_max || (max == target_max && min < target_min)) {
+ target_min = min;
+ target_max = max;
+ }
+ } else {
+ /* the fps we have is valid. Select it if higher than our current target, or narrower */
+ if (max > target_max || (max == target_max && min > target_min)) {
+ target_min = min;
+ target_max = max;
+ }
}
}
if (target_min != -1 && target_max != -1) {
- gchar *var;
/* use the max */
gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION,
target_max / 1000, 1, NULL);
- var = g_strdup_printf ("%d,%d", target_min, target_max);
- gst_droidcamsrc_params_set_string_locked (params, "preview-fps-range", var);
- g_free (var);
+ if (set_param_name) {
+ gchar *var;
+ var = g_strdup_printf ("%d,%d", target_min, target_max);
+ gst_droidcamsrc_params_set_string_locked (params, "preview-fps-range", var);
+ g_free (var);
+ }
}
g_mutex_unlock (¶ms->lock);
}
void
-gst_droidcamsrc_params_choose_video_framerate (GstDroidCamSrcParams * params,
+gst_droidcamsrc_params_choose_image_framerate (GstDroidCamSrcParams * params,
GstCaps * caps)
{
- int x;
- int target_min = -1, target_max = -1;
-
- g_mutex_lock (¶ms->lock);
-
- for (x = 0; x < params->min_fps_range->len; x++) {
- int min = g_array_index (params->min_fps_range, gint, x);
- int max = g_array_index (params->max_fps_range, gint, x);
-
- GstCaps *c = gst_caps_copy (caps);
- if (min == max) {
- gst_caps_set_simple (c, "framerate", GST_TYPE_FRACTION, min / 1000, 1,
- NULL);
- } else {
- gst_caps_set_simple (c, "framerate", GST_TYPE_FRACTION_RANGE,
- min / 1000, 1, max / 1000, 1, NULL);
- }
-
- if (!gst_caps_can_intersect (caps, c)) {
- gst_caps_unref (c);
- continue;
- }
-
- gst_caps_unref (c);
-
- /* the fps we have is valid. Select it if higher than our current target, or narrower */
- if (max > target_max || (max == target_max && min > target_min)) {
- target_min = min;
- target_max = max;
- }
- }
-
- if (target_min != -1 && target_max != -1) {
- gchar *var;
-
- /* use the max */
- gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION,
- target_max / 1000, 1, NULL);
-
- var = g_strdup_printf ("%d,%d", target_min, target_max);
- gst_droidcamsrc_params_set_string_locked (params, "preview-fps-range", var);
- g_free (var);
- }
+ gst_droidcamsrc_params_choose_framerate (params,
+ caps, TRUE, "preview-fps-range");
+}
- g_mutex_unlock (¶ms->lock);
+void
+gst_droidcamsrc_params_choose_video_framerate (GstDroidCamSrcParams * params,
+ GstCaps * caps)
+{
+ gst_droidcamsrc_params_choose_framerate (params,
+ caps, FALSE, "preview-fps-range");
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20210518.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcparams.h
^
|
@@ -55,6 +55,8 @@
int gst_droidcamsrc_params_get_int (GstDroidCamSrcParams * params, const char *key);
float gst_droidcamsrc_params_get_float (GstDroidCamSrcParams * params, const char *key);
+void gst_droidcamsrc_params_choose_framerate (GstDroidCamSrcParams * params,
+ GstCaps * caps, gboolean widest, const char *set_param);
void gst_droidcamsrc_params_choose_image_framerate (GstDroidCamSrcParams * params, GstCaps * caps);
void gst_droidcamsrc_params_choose_video_framerate (GstDroidCamSrcParams * params, GstCaps * caps);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20210518.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcrecorder.c
^
|
@@ -149,7 +149,7 @@
current = NULL;
gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, codec_data, NULL);
- ret = gst_pad_set_caps (recorder->vidsrc->pad, caps);
+ ret = gst_pad_push_event (recorder->vidsrc->pad, gst_event_new_caps (caps));
gst_caps_unref (caps);
if (!ret) {
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20210518.1.tar.gz/gst/droidcodec/gstdroidaenc.c
^
|
@@ -520,7 +520,7 @@
* encoder's clock, as some versions of libstagefright throw away frames if
* it doesn't increase
*/
- GstClockTime ts = GST_BUFFER_TIMESTAMP (buffer);
+ GstClockTime ts = GST_BUFFER_PTS (buffer);
if (!GST_CLOCK_TIME_IS_VALID (ts)) {
GST_DEBUG_OBJECT (enc, "Replacing invalid timestamp: %" GST_TIME_FORMAT,
GST_TIME_ARGS (ts));
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20210518.1.tar.gz/gst/droideglsink/gstdroidvideotexturesink.c
^
|
@@ -112,8 +112,8 @@
sink = GST_DROIDVIDEOTEXTURESINK (bsink);
- if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
- *start = GST_BUFFER_TIMESTAMP (buf);
+ if (GST_BUFFER_PTS_IS_VALID (buf)) {
+ *start = GST_BUFFER_PTS (buf);
if (GST_BUFFER_DURATION_IS_VALID (buf)) {
*end = *start + GST_BUFFER_DURATION (buf);
} else {
|