• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GST_MAKE_FOURCC函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GST_MAKE_FOURCC函数的典型用法代码示例。如果您正苦于以下问题:C++ GST_MAKE_FOURCC函数的具体用法?C++ GST_MAKE_FOURCC怎么用?C++ GST_MAKE_FOURCC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GST_MAKE_FOURCC函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: generate_sink_template

static GstCaps *
generate_sink_template (void)
{
    GstCaps *caps;
    GstStructure *struc;

    caps = gst_caps_new_empty ();

    struc = gst_structure_new ("video/x-raw-yuv",
                               "width", GST_TYPE_INT_RANGE, 16, 4096,
                               "height", GST_TYPE_INT_RANGE, 16, 4096,
                               "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 30, 1,
                               NULL);

    {
        GValue list = { 0 };
        GValue val = { 0 };

        g_value_init (&list, GST_TYPE_LIST);
        g_value_init (&val, GST_TYPE_FOURCC);

        gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('I', '4', '2', '0'));
        gst_value_list_append_value (&list, &val);

        gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'));
        gst_value_list_append_value (&list, &val);

        gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'));
        gst_value_list_append_value (&list, &val);

        gst_structure_set_value (struc, "format", &list);

        g_value_unset (&val);
        g_value_unset (&list);
    }

    gst_caps_append_structure (caps, struc);

    return caps;
}
开发者ID:FrederikVernelen,项目名称:gst-openmax,代码行数:40,代码来源:gstomx_videosink.c


示例2: gst_vtenc_base_init

static void
gst_vtenc_base_init (GstVTEncClass * klass)
{
  const GstVTEncoderDetails *codec_details =
      GST_VTENC_CLASS_GET_CODEC_DETAILS (klass);
  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
  const int min_width = 1, max_width = G_MAXINT;
  const int min_height = 1, max_height = G_MAXINT;
  const int min_fps_n = 0, max_fps_n = G_MAXINT;
  const int min_fps_d = 1, max_fps_d = 1;
  GstPadTemplate *sink_template, *src_template;
  GstCaps *src_caps;
  GstElementDetails details;

  details.longname = g_strdup_printf ("%s encoder", codec_details->name);
  details.klass = g_strdup_printf ("Codec/Encoder/Video");
  details.description = g_strdup_printf ("%s encoder", codec_details->name);

  gst_element_class_set_details_simple (element_class,
      details.longname, details.klass, details.description,
      "Ole André Vadla Ravnås <[email protected]>");

  g_free (details.longname);
  g_free (details.klass);
  g_free (details.description);

  sink_template = gst_pad_template_new ("sink",
      GST_PAD_SINK,
      GST_PAD_ALWAYS,
      gst_caps_new_simple ("video/x-raw-yuv",
          "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('N', 'V', '1', '2'),
          "width", GST_TYPE_INT_RANGE, min_width, max_width,
          "height", GST_TYPE_INT_RANGE, min_height, max_height,
          "framerate", GST_TYPE_FRACTION_RANGE,
          min_fps_n, min_fps_d, max_fps_n, max_fps_d, NULL));
  gst_element_class_add_pad_template (element_class, sink_template);
  gst_object_unref (sink_template);

  src_caps = gst_caps_new_simple (codec_details->mimetype,
      "width", GST_TYPE_INT_RANGE, min_width, max_width,
      "height", GST_TYPE_INT_RANGE, min_height, max_height,
      "framerate", GST_TYPE_FRACTION_RANGE,
      min_fps_n, min_fps_d, max_fps_n, max_fps_d, NULL);
  if (codec_details->format_id == kVTFormatH264) {
    gst_structure_set (gst_caps_get_structure (src_caps, 0),
        "stream-format", G_TYPE_STRING, "avc", NULL);
  }
  src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
      src_caps);
  gst_element_class_add_pad_template (element_class, src_template);
  gst_object_unref (src_template);
}
开发者ID:dylansong77,项目名称:gstreamer,代码行数:52,代码来源:vtenc.c


示例3: generate_sink_template

static inline GstCaps *
generate_sink_template(void)
{
	GstCaps *caps;
	GstStructure *struc;

	caps = gst_caps_new_empty();

	struc = gst_structure_new("video/x-raw-yuv",
				  "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'),
				  NULL);

	gst_caps_append_structure(caps, struc);

	struc = gst_structure_new("video/x-raw-yuv",
				  "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('I', '4', '2', '0'),
				  NULL);

	gst_caps_append_structure(caps, struc);

	return caps;
}
开发者ID:EQ4,项目名称:gst-dsp,代码行数:22,代码来源:gstdspvenc.c


示例4: gst_aiff_parse_parse_file_header

static gboolean
gst_aiff_parse_parse_file_header (GstAiffParse * aiff, GstBuffer * buf)
{
  guint8 *data;
  guint32 header, type = 0;

  if (GST_BUFFER_SIZE (buf) < 12) {
    GST_WARNING_OBJECT (aiff, "Buffer too short");
    goto not_aiff;
  }

  data = GST_BUFFER_DATA (buf);

  header = GST_READ_UINT32_LE (data);
  type = GST_READ_UINT32_LE (data + 8);

  if (header != GST_MAKE_FOURCC ('F', 'O', 'R', 'M'))
    goto not_aiff;

  if (type == GST_MAKE_FOURCC ('A', 'I', 'F', 'F'))
    aiff->is_aifc = FALSE;
  else if (type == GST_MAKE_FOURCC ('A', 'I', 'F', 'C'))
    aiff->is_aifc = TRUE;
  else
    goto not_aiff;

  gst_buffer_unref (buf);
  return TRUE;

  /* ERRORS */
not_aiff:
  {
    GST_ELEMENT_ERROR (aiff, STREAM, WRONG_TYPE, (NULL),
        ("File is not an AIFF file: %" GST_FOURCC_FORMAT,
            GST_FOURCC_ARGS (type)));
    gst_buffer_unref (buf);
    return FALSE;
  }
}
开发者ID:PeterXu,项目名称:gst-mobile,代码行数:39,代码来源:aiffparse.c


示例5: gst_ivf_parse_handle_frame_start

static GstFlowReturn
gst_ivf_parse_handle_frame_start (GstIvfParse * ivf, GstBaseParseFrame * frame,
    gint * skipsize)
{
  GstBuffer *const buffer = frame->buffer;
  GstMapInfo map;
  GstFlowReturn ret = GST_FLOW_OK;

  gst_buffer_map (buffer, &map, GST_MAP_READ);
  if (map.size >= IVF_FILE_HEADER_SIZE) {
    guint32 magic = GST_READ_UINT32_LE (map.data);
    guint16 version = GST_READ_UINT16_LE (map.data + 4);
    guint16 header_size = GST_READ_UINT16_LE (map.data + 6);
    guint32 fourcc = GST_READ_UINT32_LE (map.data + 8);
    guint16 width = GST_READ_UINT16_LE (map.data + 12);
    guint16 height = GST_READ_UINT16_LE (map.data + 14);
    guint32 fps_n = GST_READ_UINT32_LE (map.data + 16);
    guint32 fps_d = GST_READ_UINT32_LE (map.data + 20);
#ifndef GST_DISABLE_GST_DEBUG
    guint32 num_frames = GST_READ_UINT32_LE (map.data + 24);
#endif

    if (magic != GST_MAKE_FOURCC ('D', 'K', 'I', 'F') ||
        version != 0 || header_size != 32 ||
        fourcc_to_media_type (fourcc) == NULL) {
      GST_ELEMENT_ERROR (ivf, STREAM, WRONG_TYPE, (NULL), (NULL));
      ret = GST_FLOW_ERROR;
      goto end;
    }

    ivf->fourcc = fourcc;

    gst_ivf_parse_set_size (ivf, width, height);
    gst_ivf_parse_set_framerate (ivf, fps_n, fps_d);

    GST_LOG_OBJECT (ivf, "Stream has %d frames", num_frames);

    /* move along */
    ivf->state = GST_IVF_PARSE_DATA;
    gst_base_parse_set_min_frame_size (GST_BASE_PARSE_CAST (ivf),
        IVF_FRAME_HEADER_SIZE);
    *skipsize = IVF_FILE_HEADER_SIZE;
  } else {
    GST_LOG_OBJECT (ivf, "Header data not yet available.");
    *skipsize = 0;
  }

end:
  gst_buffer_unmap (buffer, &map);
  return ret;
}
开发者ID:0p1pp1,项目名称:gst-plugins-bad,代码行数:51,代码来源:gstivfparse.c


示例6: gst_tiprepencbuf_transform_caps

/******************************************************************************
 * gst_tiprepencbuf_transform_caps
 *   Most platforms require that the exact same caps are used on both ends.
 *   DM6467 can also convert from Y8C8/NV16 to NV12.
 *****************************************************************************/
static GstCaps*
gst_tiprepencbuf_transform_caps(GstBaseTransform * trans,
    GstPadDirection direction, GstCaps * caps)
{
    GstTIPrepEncBuf *prepencbuf = GST_TIPREPENCBUF(trans);
    GstCaps         *supported_caps;
    GstStructure    *caps_struct;

    g_return_val_if_fail(GST_IS_CAPS(caps), NULL);

    /* We always support the same caps on both sides */
    supported_caps = gst_caps_copy(caps);

    /* On DM6467, we also support conversion from Y8C8/NV16 to NV12 */
    if (prepencbuf->device == Cpu_Device_DM6467) {
        switch (direction) {
            case GST_PAD_SINK:
                caps_struct =
                    gst_structure_copy(gst_caps_get_structure(caps, 0));
                gst_structure_set(caps_struct, "format", GST_TYPE_FOURCC,
                    GST_MAKE_FOURCC('N', 'V', '1', '2'), (gchar *) NULL);
                gst_caps_append_structure(supported_caps, caps_struct);
                break;
            case GST_PAD_SRC:
                caps_struct =
                    gst_structure_copy(gst_caps_get_structure(caps, 0));
                gst_structure_set(caps_struct, "format", GST_TYPE_FOURCC,
                    GST_MAKE_FOURCC('N', 'V', '1', '6'), (gchar *) NULL);
                gst_caps_append_structure(supported_caps, caps_struct);
                break;
            case GST_PAD_UNKNOWN:
                break;
        }
    }

    return supported_caps;
}
开发者ID:xieran1988,项目名称:parents,代码行数:42,代码来源:gsttiprepencbuf.c


示例7: gst_mio_video_device_format_basics_to_structure

static GstStructure *
gst_mio_video_device_format_basics_to_structure (GstMIOVideoDevice * self,
    GstMIOVideoFormat * format)
{
  GstStructure *s;

  switch (format->type) {
    case kCVPixelFormatType_422YpCbCr8:
    case kCVPixelFormatType_422YpCbCr8Deprecated:
    {
      guint fcc;

      if (format->type == kCVPixelFormatType_422YpCbCr8)
        fcc = GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y');
      else
        fcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');

      s = gst_structure_new ("video/x-raw-yuv",
          "format", GST_TYPE_FOURCC, fcc,
          "width", G_TYPE_INT, format->dim.width,
          "height", G_TYPE_INT, format->dim.height, NULL);
      break;
    }
    case kFigVideoCodecType_JPEG_OpenDML:
    {
      s = gst_structure_new ("image/jpeg",
          "width", G_TYPE_INT, format->dim.width,
          "height", G_TYPE_INT, format->dim.height, NULL);
      break;
    }
    default:
      s = NULL;
      break;
  }

  return s;
}
开发者ID:ConfusedReality,项目名称:pkg_multimedia_gst-plugins-bad,代码行数:37,代码来源:miovideodevice.c


示例8: gst_sdlvideosink_base_init

static void
gst_sdlvideosink_base_init (gpointer g_class)
{
  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
  GstCaps *capslist;
  gint i;
  guint32 formats[] = {
    GST_MAKE_FOURCC ('I', '4', '2', '0'),
    GST_MAKE_FOURCC ('Y', 'V', '1', '2'),
    GST_MAKE_FOURCC ('Y', 'U', 'Y', '2')
        /*
           GST_MAKE_FOURCC ('Y', 'V', 'Y', 'U'),
           GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y')
         */
  };

  /* make a list of all available caps */
  capslist = gst_caps_new_empty ();
  for (i = 0; i < G_N_ELEMENTS (formats); i++) {
    gst_caps_append_structure (capslist,
        gst_structure_new ("video/x-raw-yuv",
            "format", GST_TYPE_FOURCC, formats[i],
            "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
            "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
            "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, NULL));
  }

  sink_template = gst_pad_template_new ("sink",
      GST_PAD_SINK, GST_PAD_ALWAYS, capslist);

  gst_element_class_add_pad_template (element_class, sink_template);
  gst_element_class_set_details_simple (element_class, "SDL video sink",
      "Sink/Video", "An SDL-based videosink",
      "Ronald Bultje <[email protected]>, "
      "Edgard Lima <[email protected]>, "
      "Jan Schmidt <[email protected]>");
}
开发者ID:jonasl,项目名称:gst-svtplayer,代码行数:37,代码来源:sdlvideosink.c


示例9: gst_decklink_mode_get_structure

static GstStructure *
gst_decklink_mode_get_structure (GstDecklinkModeEnum e)
{
  const GstDecklinkMode *mode = &modes[e];

  return gst_structure_new ("video/x-raw-yuv",
      "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'),
      "width", G_TYPE_INT, mode->width,
      "height", G_TYPE_INT, mode->height,
      "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d,
      "interlaced", G_TYPE_BOOLEAN, mode->interlaced,
      "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
      "color-matrix", G_TYPE_STRING, mode->is_hdtv ? "hdtv" : "sdtv",
      "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
}
开发者ID:drothlis,项目名称:gst-plugins-bad,代码行数:15,代码来源:gstdecklink.cpp


示例10: gst_mim_enc_create_tcp_header

static void
gst_mim_enc_create_tcp_header (GstMimEnc * mimenc, guint8 * p,
    guint32 payload_size, GstClockTime ts, gboolean keyframe, gboolean paused)
{
  p[0] = 24;
  p[1] = paused ? 1 : 0;
  GST_WRITE_UINT16_LE (p + 2, mimenc->width);
  GST_WRITE_UINT16_LE (p + 4, mimenc->height);
  GST_WRITE_UINT16_LE (p + 6, keyframe ? 1 : 0);
  GST_WRITE_UINT32_LE (p + 8, payload_size);
  GST_WRITE_UINT32_LE (p + 12, paused ? 0 :
      GST_MAKE_FOURCC ('M', 'L', '2', '0'));
  GST_WRITE_UINT32_LE (p + 16, 0);
  GST_WRITE_UINT32_LE (p + 20, ts / GST_MSECOND);
}
开发者ID:collects,项目名称:gst-plugins-bad,代码行数:15,代码来源:gstmimenc.c


示例11: mxf_up_get_descriptor

static MXFMetadataFileDescriptor *
mxf_up_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
    MXFEssenceElementWriteFunc * handler, gpointer * mapping_data)
{
  GstStructure *s;

  s = gst_caps_get_structure (caps, 0);
  if (strcmp (gst_structure_get_name (s), "video/x-raw-rgb") == 0) {
    return mxf_up_get_rgba_descriptor (tmpl, caps, handler, mapping_data);
  } else if (strcmp (gst_structure_get_name (s), "video/x-raw-yuv") == 0) {
    guint32 fourcc;

    if (!gst_structure_get_fourcc (s, "format", &fourcc))
      return NULL;

    if (fourcc == GST_MAKE_FOURCC ('A', 'Y', 'U', 'V') ||
        fourcc == GST_MAKE_FOURCC ('v', '3', '0', '8'))
      return mxf_up_get_rgba_descriptor (tmpl, caps, handler, mapping_data);

    return mxf_up_get_cdci_descriptor (tmpl, caps, handler, mapping_data);
  }

  g_assert_not_reached ();
}
开发者ID:bilboed,项目名称:gst-plugins-bad,代码行数:24,代码来源:mxfup.c


示例12: gst_vdp_video_buffer_calculate_size

gboolean
gst_vdp_video_buffer_calculate_size (guint32 fourcc, gint width, gint height,
    guint * size)
{
  switch (fourcc) {
    case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
    {
      *size = gst_video_format_get_size (GST_VIDEO_FORMAT_YV12, width, height);
      break;
    }
    case GST_MAKE_FOURCC ('I', '4', '2', '0'):
    {
      *size = gst_video_format_get_size (GST_VIDEO_FORMAT_YV12, width, height);
      break;
    }
    case GST_MAKE_FOURCC ('N', 'V', '1', '2'):
    {
      *size = width * height + width * height / 2;
      break;
    }
    case GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'):
    {
      *size = gst_video_format_get_size (GST_VIDEO_FORMAT_UYVY, width, height);
      break;
    }
    case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
    {
      *size = gst_video_format_get_size (GST_VIDEO_FORMAT_YUY2, width, height);
      break;
    }
    default:
      return FALSE;
  }

  return TRUE;
}
开发者ID:collects,项目名称:gst-plugins-bad,代码行数:36,代码来源:gstvdpvideobuffer.c


示例13: tcam_gst_is_fourcc_rgb

bool tcam_gst_is_fourcc_rgb (const unsigned int fourcc)
{
    if (fourcc == GST_MAKE_FOURCC('R', 'G', 'B', 'x')
        || fourcc == GST_MAKE_FOURCC('x', 'R', 'G', 'B')
        || fourcc == GST_MAKE_FOURCC('B', 'G', 'R', 'x')
        || fourcc == GST_MAKE_FOURCC('x', 'B', 'G', 'R')
        || fourcc == GST_MAKE_FOURCC('R', 'G', 'B', 'A')
        || fourcc == GST_MAKE_FOURCC('A', 'R', 'G', 'B')
        || fourcc == GST_MAKE_FOURCC('B', 'G', 'R', 'A')
        || fourcc == GST_MAKE_FOURCC('A', 'B', 'G', 'R')
        || fourcc == FOURCC_BGR24
        || fourcc == FOURCC_RGB32
        || fourcc == FOURCC_RGB64)
    {
        return TRUE;
    }

    return FALSE;
}
开发者ID:TheImagingSource,项目名称:tiscamera,代码行数:19,代码来源:tcamgstbase.cpp


示例14: create_src_caps

static GstCaps * create_src_caps (GstOmxBaseFilter21 *omx_base)
{
    GstCaps *caps;    
    GstOmxBaseFilter21 *self;
    int width, height;
    GstStructure *struc;

    self = GST_OMX_BASE_FILTER21 (omx_base);
    caps = gst_pad_peer_get_caps (omx_base->srcpad);

    if (gst_caps_is_empty (caps))
    {

        width = 1920;
        height = 1088;

    }
    else
    {
        GstStructure *s;

        s = gst_caps_get_structure (caps, 0);

        if (!(gst_structure_get_int (s, "width", &width) &&
            gst_structure_get_int (s, "height", &height)))
        {

			width = 1920;
			height = 1088;

        }
    }

    caps = gst_caps_new_empty ();
    struc = gst_structure_new (("video/x-raw-yuv"),
            "width",  G_TYPE_INT, width,
            "height", G_TYPE_INT, height,
            "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'),
            NULL);


    gst_caps_append_structure (caps, struc);

    return caps;
}
开发者ID:skitlab,项目名称:gst-openmax-dm81xx,代码行数:45,代码来源:gstomx_videomixer_vodalys.c


示例15: transform_value

static void
transform_value (GValue * dest)
{
  GValue fourcc = { 0 };

  g_value_init (dest, GST_TYPE_LIST);
  g_value_init (&fourcc, GST_TYPE_FOURCC);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('I', '4', '2', '0'));
  gst_value_list_append_value (dest, &fourcc);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('Y', 'V', '1', '2'));
  gst_value_list_append_value (dest, &fourcc);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'));
  gst_value_list_append_value (dest, &fourcc);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'));
  gst_value_list_append_value (dest, &fourcc);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'));
  gst_value_list_append_value (dest, &fourcc);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('Y', '4', '2', 'B'));
  gst_value_list_append_value (dest, &fourcc);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('Y', '4', '4', '4'));
  gst_value_list_append_value (dest, &fourcc);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('v', '2', '1', '0'));
  gst_value_list_append_value (dest, &fourcc);

  gst_value_set_fourcc (&fourcc, GST_MAKE_FOURCC ('v', '2', '1', '6'));
  gst_value_list_append_value (dest, &fourcc);

  g_value_unset (&fourcc);
}
开发者ID:kanongil,项目名称:gst-plugins-bad,代码行数:37,代码来源:gstcogcolorspace.c


示例16: gst_csp_structure_is_alpha

static gboolean
gst_csp_structure_is_alpha (GstStructure * s)
{
  GQuark name;

  name = gst_structure_get_name_id (s);

  if (name == _QRAWRGB) {
    return gst_structure_id_has_field (s, _QALPHAMASK);
  } else if (name == _QRAWYUV) {
    guint32 fourcc;

    if (!gst_structure_get_fourcc (s, "format", &fourcc))
      return FALSE;

    return (fourcc == GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'));
  }

  return FALSE;
}
开发者ID:LCW523,项目名称:gst-plugins-bad,代码行数:20,代码来源:gstcolorspace.c


示例17: gst_ffmpegcsp_structure_is_alpha

static gboolean
gst_ffmpegcsp_structure_is_alpha (GstStructure * s)
{
  const gchar *name;

  name = gst_structure_get_name (s);

  if (g_str_equal (name, "video/x-raw-rgb")) {
    return gst_structure_has_field (s, "alpha_mask");
  } else if (g_str_equal (name, "video/x-raw-yuv")) {
    guint32 fourcc;

    if (!gst_structure_get_fourcc (s, "format", &fourcc))
      return FALSE;

    return (fourcc == GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'));
  }

  return FALSE;
}
开发者ID:zsx,项目名称:ossbuild,代码行数:20,代码来源:gstffmpegcolorspace.c


示例18: gss_adaptive_assemble_chunk

static guint8 *
gss_adaptive_assemble_chunk (GssTransaction * t, GssAdaptive * adaptive,
    GssAdaptiveLevel * level, GssIsomFragment * fragment)
{
  GError *error = NULL;
  guint8 *mdat_data;
  int fd;
  gboolean ret;

  g_return_val_if_fail (t != NULL, NULL);
  g_return_val_if_fail (adaptive != NULL, NULL);
  g_return_val_if_fail (level != NULL, NULL);
  g_return_val_if_fail (fragment != NULL, NULL);

  fd = open (level->filename, O_RDONLY);
  if (fd < 0) {
    GST_WARNING ("failed to open \"%s\", error=\"%s\", broken manifest?",
        level->filename, g_strerror (errno));
    gss_transaction_error_not_found (t,
        "failed to open file (broken manifest?)");
    return NULL;
  }

  mdat_data = g_malloc (fragment->mdat_size);

  GST_WRITE_UINT32_BE (mdat_data, fragment->mdat_size);
  GST_WRITE_UINT32_LE (mdat_data + 4, GST_MAKE_FOURCC ('m', 'd', 'a', 't'));

  ret = gss_sglist_load (fragment->sglist, fd, mdat_data + 8, &error);
  if (!ret) {
    gss_transaction_error_not_found (t, error->message);
    g_error_free (error);
    g_free (mdat_data);
    close (fd);
    return NULL;
  }

  close (fd);

  return mdat_data;
}
开发者ID:freedesktop-unofficial-mirror,项目名称:gstreamer__gst-streaming-server,代码行数:41,代码来源:gss-adaptive.c


示例19: gss_adaptive_convert_isoff_ondemand

void
gss_adaptive_convert_isoff_ondemand (GssAdaptive * adaptive,
    GssIsomMovie * movie, GssIsomTrack * track, GssDrmType drm_type)
{
  int i;
  guint64 offset = 0;
  gboolean is_video;

  is_video = (track->hdlr.handler_type == GST_MAKE_FOURCC ('v', 'i', 'd', 'e'));

  GST_DEBUG ("stsd entries %d", track->stsd.entry_count);

  if (drm_type != GSS_DRM_CLEAR) {
    movie->pssh.data = adaptive->drm_info.data;
    movie->pssh.len = adaptive->drm_info.data_len;
    memcpy (movie->pssh.uuid,
        gss_drm_get_drm_uuid (adaptive->drm_info.drm_type), 16);
    movie->pssh.present = TRUE;
  }

  if (drm_type == GSS_DRM_PLAYREADY) {
    track->is_encrypted = TRUE;
  }
  for (i = 0; i < track->n_fragments; i++) {
    GssIsomFragment *fragment = track->fragments[i];

    fragment->offset = offset;
    gss_isom_fragment_serialize (fragment, &fragment->moof_data,
        &fragment->moof_size, is_video);
    offset += fragment->moof_size;
    offset += fragment->mdat_header_size;
    offset += fragment->mdat_size;
  }
  track->dash_size = offset;

  gss_isom_movie_serialize_track_dash (movie, track,
      &track->dash_header_data, &track->dash_header_size,
      &track->dash_header_and_sidx_size);

  track->dash_size += track->dash_header_and_sidx_size;
}
开发者ID:freedesktop-unofficial-mirror,项目名称:gstreamer__gst-streaming-server,代码行数:41,代码来源:gss-adaptive.c


示例20: gst_vaapi_profile_get_codec

/**
 * gst_vaapi_profile_get_codec:
 * @profile: a #GstVaapiProfile
 *
 * Extracts the #GstVaapiCodec from @profile.
 *
 * Return value: the #GstVaapiCodec from @profile
 */
GstVaapiCodec
gst_vaapi_profile_get_codec(GstVaapiProfile profile)
{
    GstVaapiCodec codec;

    switch (profile) {
    case GST_VAAPI_PROFILE_VC1_SIMPLE:
    case GST_VAAPI_PROFILE_VC1_MAIN:
        codec = GST_VAAPI_CODEC_WMV3;
        break;
    case GST_VAAPI_PROFILE_VC1_ADVANCED:
        codec = GST_VAAPI_CODEC_VC1;
        break;
    case GST_VAAPI_PROFILE_JPEG_BASELINE:
        codec = GST_VAAPI_CODEC_JPEG;
        break;
    default:
        codec = (guint32)profile & GST_MAKE_FOURCC(0xff,0xff,0xff,0);
        break;
    }
    return codec;
}
开发者ID:shakin,项目名称:gstreamer-vaapi,代码行数:30,代码来源:gstvaapiprofile.c



注:本文中的GST_MAKE_FOURCC函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GST_MESSAGE_SRC函数代码示例发布时间:2022-05-30
下一篇:
C++ GST_LOG_OBJECT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap