[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:gst-droid.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,8 +1,7 @@
<services>
-<service name="tar_git">
- <param name="url">https://github.com/sailfishos/gst-droid.git</param>
- <param name="branch">master</param>
- <param name="token"/>
- <param name="debian">N</param>
- <param name="dumb">N</param>
-</service></services>
+ <service name="tar_git">
+ <param name="url">https://github.com/sailfishos/gst-droid.git</param>
+ <param name="branch">master</param>
+ <param name="revision">a6ff1ba94af70125e979d3401d6e3e806a3792a4</param>
+ </service>
+</services>
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20170120.1.tar.gz/gst-libs/gst/droid/gstdroidcodec.c
^
|
@@ -129,7 +129,7 @@
NULL, NULL, NULL, NULL, NULL, NULL},
{GST_DROID_CODEC_DECODER_VIDEO, "video/x-vp8", "video/x-vnd.on2.vp8",
- "video/x-vp8", TRUE, NULL, NULL, NULL, NULL,
+ "video/x-vp8", FALSE, NULL, NULL, NULL, NULL,
create_vp8vdec_codec_data_from_codec_data, NULL, NULL},
/* audio encoders */
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20170120.1.tar.gz/gst/droidcamsrc/gstdroidcamsrc.c
^
|
@@ -1712,10 +1712,7 @@
}
vid = g_strdup_printf ("%ix%i", info.width, info.height);
- gchar *key =
- src->dev->
- params->has_separate_video_size_values ? "video-size" : "preview-size";
- gst_droidcamsrc_params_set_string (src->dev->params, key, vid);
+ gst_droidcamsrc_params_set_string (src->dev->params, "video-size", vid);
/* Now we need to find a picture size that is equal to our video size.
* Some devices need to have a picture size otherwise the video mode viewfinder
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20170120.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcparams.c
^
|
@@ -195,8 +195,6 @@
gst_droidcamsrc_params_fill_fps_range_arrays_locked (params);
params->is_dirty = FALSE;
- params->has_separate_video_size_values =
- g_hash_table_lookup (params->params, "video-size-values") != NULL;
}
GstDroidCamSrcParams *
@@ -391,14 +389,8 @@
GstCaps *caps;
g_mutex_lock (¶ms->lock);
-
- gchar *key =
- params->has_separate_video_size_values ? "video-size-values" :
- "preview-size-values";
-
- caps = gst_droidcamsrc_params_get_caps_locked (params, key,
+ caps = gst_droidcamsrc_params_get_caps_locked (params, "video-size-values",
"video/x-raw", GST_CAPS_FEATURE_MEMORY_DROID_VIDEO_META_DATA, "YV12");
-
g_mutex_unlock (¶ms->lock);
return caps;
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20170120.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcparams.h
^
|
@@ -32,7 +32,6 @@
GHashTable *params;
gboolean is_dirty;
GArray *min_fps_range, *max_fps_range;
- gboolean has_separate_video_size_values;
GMutex lock;
};
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20170120.1.tar.gz/gst/droidcamsrc/gstdroidcamsrcrecorder.c
^
|
@@ -67,6 +67,9 @@
recorder->md.bitrate = target_bitrate;
+ /* set the color format */
+ recorder->md.color_format = droid_media_camera_get_video_color_format (cam);
+
recorder->recorder = droid_media_recorder_create (cam, &recorder->md);
if (!recorder->recorder) {
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20170120.1.tar.gz/gst/droidcodec/gstdroidvdec.c
^
|
@@ -215,39 +215,6 @@
GST_FIXME ("Not sure what to do here really");
}
-static void
-gst_droidvec_copy_plane (guint8 * out, gint stride_out, guint8 * in,
- gint stride_in, gint width, gint height)
-{
- int i;
- for (i = 0; i < height; i++) {
- orc_memcpy (out, in, width);
- out += stride_out;
- in += stride_in;
- }
-}
-
-static void
-gst_droidvec_copy_packed_planes (guint8 * out0, guint8 * out1, gint stride_out,
- guint8 * in, gint stride_in, gint width, gint height)
-{
- int x, y;
- for (y = 0; y < height; y++) {
- guint8 *row = in;
- for (x = 0; x < width; x++) {
- out0[x] = row[0];
- out1[x] = row[1];
- row += 2;
- }
-
- out0 += stride_out;
- out1 += stride_out;
- in += stride_in;
- }
-}
-
-#define ALIGN_SIZE(size, to) (((size) + to - 1) & ~(to - 1))
-
static gboolean
gst_droidvdec_convert_buffer (GstDroidVDec * dec,
GstBuffer * out, DroidMediaData * in, GstVideoInfo * info)
@@ -255,7 +222,8 @@
gsize height = info->height;
gsize width = info->width;
gsize size;
- gboolean use_droid_convert;
+ gboolean use_external_buffer;
+ guint8 *data = NULL;
gboolean ret;
GstMapInfo map_info;
@@ -272,7 +240,7 @@
}
size = width * height * 3 / 2;
- use_droid_convert = dec->convert && gst_buffer_get_size (out) == size;
+ use_external_buffer = gst_buffer_get_size (out) != size;
map_info.data = NULL;
if (!gst_buffer_map (out, &map_info, GST_MAP_WRITE)) {
@@ -281,35 +249,61 @@
goto out;
}
- if (use_droid_convert) {
- if (droid_media_convert_to_i420 (dec->convert, in, map_info.data) != true) {
- GST_ELEMENT_ERROR (dec, LIBRARY, FAILED, (NULL),
- ("failed to convert frame"));
+ if (use_external_buffer) {
+ GST_DEBUG_OBJECT (dec, "using an external buffer for I420 conversion.");
+ data = g_malloc (size);
+ } else {
+ data = map_info.data;
+ }
- ret = FALSE;
- goto out;
+ if (droid_media_convert_to_i420 (dec->convert, in, data) != true) {
+ GST_ELEMENT_ERROR (dec, LIBRARY, FAILED, (NULL),
+ ("failed to convert frame"));
+
+ ret = FALSE;
+ goto out;
+ }
+
+ if (use_external_buffer) {
+ /* fix up the buffer */
+ /* Code is based on gst-colorconv qcom backend */
+
+ gint stride = GST_VIDEO_INFO_COMP_STRIDE (info, 0);
+ gint strideUV = GST_VIDEO_INFO_COMP_STRIDE (info, 1);
+ guint8 *p = data;
+ guint8 *dst = map_info.data;
+ int i;
+ int x;
+
+ /* Y */
+ for (i = 0; i < info->height; i++) {
+ orc_memcpy (dst, p, info->width);
+ dst += stride;
+ p += width;
+ }
+
+ /* NOP if height == info->height */
+ p += (height - info->height) * width;
+ /* U and V */
+ for (x = 0; x < 2; x++) {
+ for (i = 0; i < info->height / 2; i++) {
+ orc_memcpy (dst, p, info->width / 2);
+ dst += strideUV;
+ p += width / 2;
+ }
+
+ /* NOP if height == info->height */
+ p += (height - info->height) / 2 * width / 2;
}
- } else {
- /* 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;
out:
+ if (use_external_buffer && data) {
+ g_free (data);
+ }
+
if (map_info.data) {
gst_buffer_unmap (out, &map_info);
}
@@ -659,11 +653,14 @@
dec->convert = droid_media_convert_create ();
}
- if (dec->convert) {
- droid_media_convert_set_crop_rect (dec->convert, rect, md.width,
- md.height);
- GST_INFO_OBJECT (dec, "using I420 conversion for output buffers");
+ if (!dec->convert) {
+ GST_ELEMENT_ERROR (dec, LIBRARY, INIT, (NULL),
+ ("Failed to create I420 converter"));
+ goto error;
}
+
+ droid_media_convert_set_crop_rect (dec->convert, rect, md.width, md.height);
+ GST_INFO_OBJECT (dec, "using I420 conversion for output buffers");
}
if (!gst_video_decoder_negotiate (decoder)) {
@@ -1021,8 +1018,9 @@
* which breaks timestamping.
*/
data.ts =
- GST_CLOCK_TIME_IS_VALID (frame->pts) ? GST_TIME_AS_USECONDS (frame->
- pts) : GST_TIME_AS_USECONDS (frame->dts);
+ GST_CLOCK_TIME_IS_VALID (frame->
+ pts) ? GST_TIME_AS_USECONDS (frame->pts) : GST_TIME_AS_USECONDS (frame->
+ dts);
data.sync = GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame) ? true : false;
/* This can deadlock if droidmedia/stagefright input buffer queue is full thus we
|