[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:gst-droid.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,6 +1,6 @@
<services>
<service name="tar_git">
<param name="url">https://github.com/sailfishos/gst-droid.git</param>
- <param name="branch">upgrade-2.2.0</param>
+ <param name="branch">upgrade-2.1.4</param>
</service>
</services>
\ No newline at end of file
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/gst-libs/gst/droid/gstdroidcodec.c
^
|
@@ -1104,7 +1104,6 @@
goto out;
}
- codec->quirks = 0;
for (x = 0; x < quirks_length; x++) {
if (!g_strcmp0 (quirks_string[x], USE_CODEC_SUPPLIED_HEIGHT_NAME)) {
codec->quirks |= USE_CODEC_SUPPLIED_HEIGHT_VALUE;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/gst/droidcamsrc/gstdroidcamsrc.c
^
|
@@ -481,7 +481,8 @@
}
if (num > MAX_CAMERAS) {
- GST_WARNING_OBJECT (src, "cannot support %d cameras", num);
+ GST_ERROR_OBJECT (src, "cannot support %d cameras", num);
+ return FALSE;
}
src->info[0].num = src->info[1].num = -1;
@@ -1614,7 +1615,9 @@
our_caps = gst_caps_make_writable (our_caps);
our_caps = gst_droidcamsrc_pick_largest_resolution (src, our_caps);
- gst_droidcamsrc_params_choose_image_framerate (src->dev->params, our_caps);
+
+ /* imgsrc frame rate is not really important so we will just set it to 30 */
+ gst_caps_set_simple (our_caps, "framerate", G_TYPE_INT, 30, NULL);
if (!gst_pad_set_caps (data->pad, our_caps)) {
GST_ERROR_OBJECT (src, "failed to set caps");
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcparams.c
^
|
@@ -51,12 +51,6 @@
g_strfreev (parts);
}
-gboolean
-gst_droidcamsrc_has_param (GstDroidCamSrcParams * params, const char *key)
-{
- return g_hash_table_contains (params->params, key);
-}
-
static int
gst_droidcamsrc_params_get_int_locked (GstDroidCamSrcParams * params,
const char *key)
@@ -491,8 +485,17 @@
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) {
+ /* the fps we have is valid. We are trying to pick the widest range */
+ if (target_min == -1) {
+ target_min = min;
+ }
+
+ if (target_max == -1) {
+ target_max = max;
+ }
+
+ if (min <= target_min && max >= target_max) {
+ /* we need to pick the widest range */
target_min = min;
target_max = max;
}
@@ -542,8 +545,17 @@
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) {
+ /* the fps we have is valid. We are trying to pick the widest range */
+ if (target_min == -1) {
+ target_min = min;
+ }
+
+ if (target_max == -1) {
+ target_max = max;
+ }
+
+ if (min >= target_min && max <= target_max) {
+ /* we need to pick the narrowest range */
target_min = min;
target_max = max;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcparams.h
^
|
@@ -38,7 +38,6 @@
GstDroidCamSrcParams * gst_droidcamsrc_params_new (const gchar * params);
void gst_droidcamsrc_params_destroy (GstDroidCamSrcParams *params);
-gboolean gst_droidcamsrc_has_param (GstDroidCamSrcParams * params, const char *key);
void gst_droidcamsrc_params_reload (GstDroidCamSrcParams *params, const gchar * str);
gchar *gst_droidcamsrc_params_to_string (GstDroidCamSrcParams *params);
@@ -48,7 +47,8 @@
GstCaps *gst_droidcamsrc_params_get_video_caps (GstDroidCamSrcParams *params);
GstCaps *gst_droidcamsrc_params_get_image_caps (GstDroidCamSrcParams *params);
-void gst_droidcamsrc_params_set_string (GstDroidCamSrcParams *params, const gchar *key, const gchar *value);
+void gst_droidcamsrc_params_set_string (GstDroidCamSrcParams *params, const gchar *key,
+ const gchar *value);
const gchar *gst_droidcamsrc_params_get_string (GstDroidCamSrcParams * params, const char *key);
int gst_droidcamsrc_params_get_int (GstDroidCamSrcParams * params, const char *key);
float gst_droidcamsrc_params_get_float (GstDroidCamSrcParams * params, const char *key);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcphotography.c
^
|
@@ -76,7 +76,6 @@
GList *scene;
GList *wb;
GList *iso;
- gchar *iso_key;
GList *flicker;
};
@@ -1041,25 +1040,12 @@
GST_WARNING_OBJECT (src, "setting iso to %d is not supported", iso_speed);
return FALSE;
}
- // find iso param key if not set
- if (src->photo->iso_key == NULL) {
- if (src->dev == NULL || src->dev->params == NULL) {
- GST_WARNING_OBJECT (src, "Params are NULL! Cannot find iso param key.");
- return FALSE;
- }
- if (gst_droidcamsrc_has_param (src->dev->params, "iso")) {
- src->photo->iso_key = "iso";
- } else if (gst_droidcamsrc_has_param (src->dev->params, "iso-speed")) {
- src->photo->iso_key = "iso-speed";
- } else {
- GST_WARNING_OBJECT (src, "ISO setting param key not found. Cannot set");
- return FALSE;
- }
- }
+
GST_OBJECT_LOCK (src);
src->photo->settings.iso_speed = iso_speed;
GST_OBJECT_UNLOCK (src);
- return gst_droidcamsrc_set_and_apply (src, src->photo->iso_key, value);
+
+ return gst_droidcamsrc_set_and_apply (src, "iso", value);
}
static gboolean
@@ -1420,23 +1406,8 @@
src->photo->settings.iso_speed);
return;
}
- // find iso param key if not set
- if (src->photo->iso_key == NULL) {
- if (src->dev == NULL || src->dev->params == NULL) {
- GST_WARNING_OBJECT (src, "Params are NULL! Cannot find iso param key.");
- return FALSE;
- }
- if (gst_droidcamsrc_has_param (src->dev->params, "iso")) {
- src->photo->iso_key = "iso";
- } else if (gst_droidcamsrc_has_param (src->dev->params, "iso-speed")) {
- src->photo->iso_key = "iso-speed";
- } else {
- GST_WARNING_OBJECT (src, "ISO setting param key not found. Cannot set");
- return FALSE;
- }
- }
- gst_droidcamsrc_params_set_string (src->dev->params, src->photo->iso_key,
- value);
+
+ gst_droidcamsrc_params_set_string (src->dev->params, "iso", value);
}
static void
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/gst/droidcodec/gstdroidaenc.c
^
|
@@ -115,14 +115,6 @@
md.max_input_size = info.bpf * enc->rate;
enc->codec = droid_media_codec_create_encoder (&md);
- // Reset timestamp clock
- GstClock *clock = GST_ELEMENT_CLOCK (enc);
- if (clock) {
- gst_object_ref (clock);
- GST_ELEMENT_CAST (enc)->base_time = gst_clock_get_time (clock);
- gst_object_unref (clock);
- }
-
if (!enc->codec) {
GST_ELEMENT_ERROR (enc, LIBRARY, SETTINGS, NULL,
("Failed to create encoder"));
@@ -515,23 +507,8 @@
data.data.size = info.size;
data.data.data = g_malloc (info.size);
data.sync = false;
+ data.ts = GST_TIME_AS_USECONDS (buffer->pts);
-/* Check if the buffer has a valid timestamp, and if not then set it from the
- * encoder's clock, as some versions of libstagefright throw away frames if
- * it doesn't increase
- */
- GstClockTime ts = GST_BUFFER_TIMESTAMP (buffer);
- if (!GST_CLOCK_TIME_IS_VALID (ts)) {
- GST_DEBUG_OBJECT (enc, "Replacing invalid timestamp: %" GST_TIME_FORMAT,
- GST_TIME_ARGS (ts));
- GstClock *clock = gst_element_get_clock (enc);
- if (clock) {
- ts = gst_clock_get_time (clock) - GST_ELEMENT_CAST (enc)->base_time;
- GST_DEBUG_OBJECT (enc, "New timestamp: %" GST_TIME_FORMAT,
- GST_TIME_ARGS (ts));
- }
- }
- data.ts = GST_TIME_AS_USECONDS (ts);
memcpy (data.data.data, info.data, info.size);
gst_buffer_unmap (buffer, &info);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/gst/droidcodec/gstdroidvdec.c
^
|
@@ -27,7 +27,6 @@
#include "gst/droid/gstdroidmediabuffer.h"
#include "gst/droid/gstdroidbufferpool.h"
#include "plugin.h"
-#include "droidmediaconstants.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <string.h> /* memset() */
@@ -266,7 +265,7 @@
if (dec->codec_type->quirks & USE_CODEC_SUPPLIED_WIDTH_VALUE) {
width = dec->codec_reported_width;
- GST_INFO_OBJECT (dec, "using codec supplied width %d", width);
+ GST_INFO_OBJECT (dec, "using codec supplied width %d", height);
}
if (dec->codec_type->quirks & USE_CODEC_SUPPLIED_HEIGHT_VALUE) {
@@ -334,55 +333,21 @@
}
}
} else {
- DroidMediaColourFormatConstants c;
- droid_media_colour_format_constants_init (&c);
- if (dec->hal_format == c.OMX_COLOR_FormatYUV420Planar) {
- /* Buffer is already I420, so we can copy it straight over */
- /* though we need to handle the cropping */
-
- GST_DEBUG_OBJECT (dec, "Copying I420 buffer");
- gint top = dec->crop_rect.top;
- gint left = dec->crop_rect.left;
- gint crop_width = dec->crop_rect.right - left;
- gint crop_height = dec->crop_rect.bottom - top;
-
- guint8 *y = in->data + (top * width) + left;
- guint8 *u = in->data + (width * height) + (top * width / 2) + (left / 2);
- guint8 *v =
- in->data + (width * height) + (width * height / 4) +
- (top * width / 2) + (left / 2);
-
- gst_droidvec_copy_plane (map_info.data + info->offset[0],
- info->stride[0], y, width, crop_width, crop_height);
- gst_droidvec_copy_plane (map_info.data + info->offset[1],
- info->stride[1], u, width / 2, crop_width / 2, crop_height / 2);
- gst_droidvec_copy_plane (map_info.data + info->offset[2],
- info->stride[2], v, width / 2, crop_width / 2, crop_height / 2);
-
- } else if (dec->hal_format == c.QOMX_COLOR_FormatYUV420PackedSemiPlanar32m) {
- /* copy to the output buffer swapping the u and v planes and cropping if necessary */
- /* NV12 format with 128 byte alignment */
- GST_DEBUG_OBJECT (dec, "Converting from qcom NV12 semi planar");
- gint stride = ALIGN_SIZE (width, 128);
- gint slice_height = ALIGN_SIZE (height, 32);
- gint top = ALIGN_SIZE (dec->crop_rect.top, 2);
- gint left = ALIGN_SIZE (dec->crop_rect.left, 2);
-
- guint8 *y = in->data + (top * stride) + left;
- guint8 *uv =
- in->data + (stride * slice_height) + (top * stride / 2) + left;
-
- gst_droidvec_copy_plane (map_info.data + info->offset[0],
- info->stride[0], y, stride, info->width, info->height);
- gst_droidvec_copy_packed_planes (map_info.data + info->offset[1],
- map_info.data + info->offset[2], info->stride[1], uv, stride,
- info->width / 2, info->height / 2);
- } else {
- GST_ELEMENT_ERROR (dec, LIBRARY, FAILED, (NULL),
- ("Unknown codec colour format: %d", dec->hal_format));
- ret = FALSE;
- goto out;
- }
+ /* copy to the output buffer swapping the u and v planes and cropping if necessary */
+ /* this assumes a NV12 format with 128 byte alignment */
+ gint stride = ALIGN_SIZE (width, 128);
+ gint slice_height = ALIGN_SIZE (height, 32);
+ gint top = ALIGN_SIZE (dec->crop_rect.top, 2);
+ gint left = ALIGN_SIZE (dec->crop_rect.left, 2);
+
+ guint8 *y = in->data + (top * stride) + left;
+ guint8 *uv = in->data + (stride * slice_height) + (top * stride / 2) + left;
+
+ gst_droidvec_copy_plane (map_info.data + info->offset[0], info->stride[0],
+ y, stride, info->width, info->height);
+ gst_droidvec_copy_packed_planes (map_info.data + info->offset[1],
+ map_info.data + info->offset[2], info->stride[1], uv, stride,
+ info->width / 2, info->height / 2);
}
ret = TRUE;
@@ -709,13 +674,11 @@
droid_media_codec_get_output_info (dec->codec, &md, &rect);
GST_INFO_OBJECT (dec,
- "codec reported state: colour: %d, width: %d, height: %d, crop: %d,%d %d,%d",
- md.hal_format, md.width, md.height, rect.left, rect.top, rect.right,
- rect.bottom);
+ "codec reported state: width: %d, height: %d, crop: %d,%d %d,%d",
+ md.width, md.height, rect.left, rect.top, rect.right, rect.bottom);
dec->codec_reported_height = md.height;
dec->codec_reported_width = md.width;
- dec->hal_format = md.hal_format;
if (dec->format == GST_VIDEO_FORMAT_I420) {
width = rect.right - rect.left;
@@ -746,7 +709,7 @@
if (dec->convert) {
droid_media_convert_set_crop_rect (dec->convert, rect, md.width,
md.height);
- GST_INFO_OBJECT (dec, "using colour conversion for output buffers");
+ GST_INFO_OBJECT (dec, "using I420 conversion for output buffers");
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/gst/droidcodec/gstdroidvdec.h
^
|
@@ -81,7 +81,6 @@
GstVideoCodecState *in_state;
GstVideoCodecState *out_state;
DroidMediaConvert *convert;
- gint32 hal_format;
};
struct _GstDroidVDecClass
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20171129.1.tar.gz/tools/gstdroidcamsrcconf.c
^
|
@@ -56,7 +56,6 @@
ADD_ENTRY (GST_PHOTOGRAPHY_FLASH_MODE_AUTO, "auto"),
ADD_ENTRY (GST_PHOTOGRAPHY_FLASH_MODE_OFF, "off"),
ADD_ENTRY (GST_PHOTOGRAPHY_FLASH_MODE_ON, "on"),
- ADD_ENTRY (GST_PHOTOGRAPHY_FLASH_MODE_RED_EYE, "red-eye"),
{NULL, -1}
}},
{"focus-mode-values", "focus-mode", {
@@ -68,19 +67,19 @@
ADD_ENTRY (GST_PHOTOGRAPHY_FOCUS_MODE_EXTENDED, "edof"),
ADD_ENTRY (GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_NORMAL, "continuous"),
ADD_ENTRY (GST_PHOTOGRAPHY_FOCUS_MODE_CONTINUOUS_EXTENDED, "continuous"),
- ADD_ENTRY (GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL, "manual"),
+ ADD_ENTRY (GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL, NULL),
{NULL, -1}
}},
{"whitebalance-values", "white-balance-mode", {
ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_AUTO, "auto"),
ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_DAYLIGHT, "daylight"),
ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_CLOUDY, "cloudy-daylight"),
- ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_SUNSET, "twilight"),
+ ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_SUNSET, NULL),
ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_TUNGSTEN, "incandescent"),
ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_FLUORESCENT, "fluorescent"),
ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_MANUAL, NULL),
- ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_WARM_FLUORESCENT, "warm-fluorescent"),
- ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_SHADE, "shade"),
+ ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_WARM_FLUORESCENT, NULL),
+ ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_SHADE, NULL),
{NULL, -1}
}},
{"scene-mode-values", "scene-mode", {
@@ -123,7 +122,6 @@
ADD_ENTRY (GST_PHOTOGRAPHY_COLOR_TONE_MODE_AQUA, "aqua"),
{NULL, -1}
}},
- // Qualcomm ISO values (e.g. ISO100) and Intel (iso-100)
{"iso-values", "iso-speed", {
ADD_ENTRY (0, "auto"),
ADD_ENTRY (0, "iso-auto"),
@@ -139,16 +137,6 @@
ADD_ENTRY (3200, "ISO3200"),
{NULL, -1}
}},
- // Mediatek ISO values
- {"iso-speed-values", "iso-speed", {
- ADD_ENTRY (0, "auto"),
- ADD_ENTRY (100, "100"),
- ADD_ENTRY (200, "200"),
- ADD_ENTRY (400, "400"),
- ADD_ENTRY (800, "800"),
- ADD_ENTRY (1600, "1600"),
- {NULL, -1}
- }},
{"antibanding-values", "flicker-mode", {
ADD_ENTRY (GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF, "off"),
ADD_ENTRY (GST_PHOTOGRAPHY_FLICKER_REDUCTION_50HZ, "50hz"),
|