Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding support for decoder (60fps by default)

  • Loading branch information...
commit f1699788442660a5dab3e56963288ae49a6cb4d6 1 parent f98c522
bperez authored
Showing with 21 additions and 12 deletions.
  1. +4 −2 README
  2. +11 −5 omx/gstomx_base_videodec.c
  3. +6 −5 omx/gstomx_h264dec.c
6 README
View
@@ -112,9 +112,11 @@ Contents
- Modifying build system, new build system is based in the use of a shared
library called libOmx.
- - Adding support for omx_camera
+ - Adding support for omx_camera.
- - Adding support for omx_tvp
+ - Adding support for omx_tvp.
+
+ - Adding support for decoder, 60fps by default.
8. If something goes wrong
16 omx/gstomx_base_videodec.c
View
@@ -155,13 +155,19 @@ sink_setcaps (GstPad *pad,
{
self->framerate_num = gst_value_get_fraction_numerator (framerate);
self->framerate_denom = gst_value_get_fraction_denominator (framerate);
+ }
+ else
+ {
+ self->framerate_num = 60;
+ self->framerate_denom = 1;
- omx_base->duration = gst_util_uint64_scale_int(GST_SECOND,
- gst_value_get_fraction_denominator (framerate),
- gst_value_get_fraction_numerator (framerate));
- GST_DEBUG_OBJECT (self, "Nominal frame duration =%"GST_TIME_FORMAT,
- GST_TIME_ARGS (omx_base->duration));
}
+ omx_base->duration = gst_util_uint64_scale_int(GST_SECOND,
+ self->framerate_denom,
+ self->framerate_num);
+ GST_DEBUG_OBJECT (self, "Nominal frame duration =%"GST_TIME_FORMAT,
+ GST_TIME_ARGS (omx_base->duration));
+
}
/* check for pixel-aspect-ratio, to set to src caps */
{
11 omx/gstomx_h264dec.c
View
@@ -1,6 +1,9 @@
/*
* Copyright (C) 2007-2009 Nokia Corporation.
*
+ * Modified by: David Soto <david.soto@ridgerun.com>
+ * Copyright (C) 2011 RidgeRun
+
* Author: Felipe Contreras <felipe.contreras@nokia.com>
*
* This library is free software; you can redistribute it and/or
@@ -104,19 +107,17 @@ initialize_port (GstOmxBaseFilter *omx_base)
paramPort.format.video.nFrameHeight = height;
paramPort.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
paramPort.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar;
- paramPort.format.video.xFramerate = (60) << 16;
GST_DEBUG_OBJECT (self, "nFrameWidth = %ld, nFrameHeight = %ld, nBufferCountActual = %ld",
paramPort.format.video.nFrameWidth, paramPort.format.video.nFrameHeight,
paramPort.nBufferCountActual);
+ if(self->framerate_denom)
+ paramPort.format.video.xFramerate = (self->framerate_num/self->framerate_denom) << 16;
+
GST_DEBUG_OBJECT (self, "G_OMX_PORT_SET_DEFINITION (output)");
G_OMX_PORT_SET_DEFINITION (omx_base->out_port, &paramPort);
- G_OMX_PORT_GET_DEFINITION (omx_base->in_port, &paramPort);
- //paramPort.nBufferCountActual = 8;
- paramPort.format.video.xFramerate = (60) << 16;
- G_OMX_PORT_SET_DEFINITION (omx_base->in_port, &paramPort);
#if 0
port = g_omx_core_get_port (gomx, "input", 0);
Please sign in to comment.
Something went wrong with that request. Please try again.