[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:gst-droid.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,8 +2,8 @@
<service name="tar_git">
<param name="url">https://github.com/sailfishos/gst-droid.git</param>
<param name="branch">master</param>
- <param name="revision">2381132c01929946fd856d8508be79fe00ed35bb</param>
+ <param name="revision">d256c69c07eb33703dd7950a4a91fbf13e6a0b4b</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
-</service></services>
\ No newline at end of file
+</service></services>
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20180209.0.tar.gz/Makefile.am
^
|
@@ -1,3 +1,8 @@
SUBDIRS = common gst-libs gst tools
-EXTRA_DIST = autogen.sh
+EXTRA_DIST = autogen.sh \
+ gstreamer-droid-1.0.pc.in \
+ gstreamer-droid-1.0.pc
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gstreamer-droid-1.0.pc
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20180209.0.tar.gz/configure.ac
^
|
@@ -167,6 +167,7 @@
[GStreamer API Version])
AC_CONFIG_FILES([Makefile
+ gstreamer-droid-1.0.pc
common/Makefile
common/m4/Makefile
gst-libs/Makefile
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20180209.0.tar.gz/gst-libs/gst/droid/gstdroidcodec.c
^
|
@@ -31,7 +31,7 @@
#endif /* GST_USE_UNSTABLE_API */
#include <gst/codecparsers/gsth264parser.h>
-GST_DEBUG_CATEGORY_EXTERN (gst_droid_codec_debug);
+GST_DEBUG_CATEGORY (gst_droid_codec_debug);
#define GST_CAT_DEFAULT gst_droid_codec_debug
static GstBuffer *create_mpeg4venc_codec_data (DroidMediaData * data);
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20180209.0.tar.gz/gst-libs/gst/droid/gstdroidmediabuffer.h
^
|
@@ -23,7 +23,7 @@
#include <gst/gst.h>
#include <gst/video/video.h>
-#include "droidmedia.h"
+#include <droidmedia/droidmedia.h>
G_BEGIN_DECLS
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20180209.0.tar.gz/gst/droidcamsrc/gstdroidcamsrc.c
^
|
@@ -1615,9 +1615,7 @@
our_caps = gst_caps_make_writable (our_caps);
our_caps = gst_droidcamsrc_pick_largest_resolution (src, 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);
+ gst_droidcamsrc_params_choose_image_framerate (src->dev->params, our_caps);
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.20180209.0.tar.gz/gst/droidcamsrc/gstdroidcamsrcparams.c
^
|
@@ -485,17 +485,8 @@
gst_caps_unref (c);
- /* 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 */
+ /* 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;
}
@@ -545,17 +536,8 @@
gst_caps_unref (c);
- /* 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 */
+ /* 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;
}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20180209.0.tar.gz/gst/droidcodec/gstdroidvdec.c
^
|
@@ -215,6 +215,39 @@
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)
@@ -222,6 +255,7 @@
gsize height = info->height;
gsize width = info->width;
gsize size;
+ gboolean use_droid_convert;
gboolean use_external_buffer;
guint8 *data = NULL;
gboolean ret;
@@ -240,7 +274,8 @@
}
size = width * height * 3 / 2;
- use_external_buffer = gst_buffer_get_size (out) != size;
+ use_droid_convert = dec->convert;
+ use_external_buffer = use_droid_convert && gst_buffer_get_size (out) != size;
map_info.data = NULL;
if (!gst_buffer_map (out, &map_info, GST_MAP_WRITE)) {
@@ -249,52 +284,70 @@
goto out;
}
- if (use_external_buffer) {
- GST_DEBUG_OBJECT (dec, "using an external buffer for I420 conversion.");
- data = g_malloc (size);
- } else {
- data = map_info.data;
- }
+ if (use_droid_convert) {
+ if (use_external_buffer) {
+ GST_DEBUG_OBJECT (dec, "using an external buffer for I420 conversion.");
+ data = g_malloc (size);
+ } else {
+ data = map_info.data;
+ }
- if (droid_media_convert_to_i420 (dec->convert, in, data) != true) {
- GST_ELEMENT_ERROR (dec, LIBRARY, FAILED, (NULL),
- ("failed to convert frame"));
+ 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;
- }
+ 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;
+ 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) / 2 * width / 2;
+ 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;
@@ -653,14 +706,11 @@
dec->convert = droid_media_convert_create ();
}
- if (!dec->convert) {
- GST_ELEMENT_ERROR (dec, LIBRARY, INIT, (NULL),
- ("Failed to create I420 converter"));
- goto error;
+ 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");
}
-
- 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)) {
@@ -1018,9 +1068,8 @@
* 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
|
[-]
[+]
|
Added |
_service:tar_git:gstreamer1.0-droid-0.20180209.0.tar.gz/gstreamer-droid-1.0.pc.in
^
|
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/gstreamer-1.0
+
+Name: GstDroid library
+Description: GstDroid library
+Requires: gstreamer-1.0 gstreamer-base-1.0 android-headers
+Version: @VERSION@
+Libs: -L${libdir} -lgstdroid-1.0
+Cflags: -I${includedir}
|
[-]
[+]
|
Changed |
_service:tar_git:gstreamer1.0-droid-0.20180209.0.tar.gz/tools/gstdroidcamsrcconf.c
^
|
@@ -56,6 +56,7 @@
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", {
@@ -67,19 +68,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, NULL),
+ ADD_ENTRY (GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL, "manual"),
{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, NULL),
+ ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_SUNSET, "twilight"),
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, NULL),
- ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_SHADE, NULL),
+ ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_WARM_FLUORESCENT, "warm-fluorescent"),
+ ADD_ENTRY (GST_PHOTOGRAPHY_WB_MODE_SHADE, "shade"),
{NULL, -1}
}},
{"scene-mode-values", "scene-mode", {
|