Changeset 49021 in webkit


Ignore:
Timestamp:
Oct 2, 2009 4:32:40 AM (15 years ago)
Author:
eric@webkit.org
Message:

2009-10-02 Philippe Normand <pnormand@igalia.com>

Reviewed by Gustavo Noronha.

[GTK] missing support for anamorphic PAR video size
https://bugs.webkit.org/show_bug.cgi?id=29717

cleanup of caps handling in the video sink

  • platform/graphics/gtk/VideoSinkGStreamer.cpp: (webkit_video_sink_set_caps):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49020 r49021  
     12009-10-02  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GTK] missing support for anamorphic PAR video size
     6        https://bugs.webkit.org/show_bug.cgi?id=29717
     7
     8        cleanup of caps handling in the video sink
     9
     10        * platform/graphics/gtk/VideoSinkGStreamer.cpp:
     11        (webkit_video_sink_set_caps):
     12
    1132009-10-02  Prasanth Ullattil  <prasanth.ullattil@nokia.com>
    214
  • trunk/WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp

    r49019 r49021  
    180180    GstStructure* structure;
    181181    gboolean ret;
    182     const GValue* fps;
    183     const GValue* par;
    184     gint width, height;
     182    gint width, height, fps_n, fps_d;
    185183    int red_mask;
    186184
     
    196194    ret = gst_structure_get_int(structure, "width", &width);
    197195    ret &= gst_structure_get_int(structure, "height", &height);
    198     fps = gst_structure_get_value(structure, "framerate");
    199     ret &= (fps != 0);
    200 
    201     par = gst_structure_get_value(structure, "pixel-aspect-ratio");
    202 
    203     if (!ret)
    204         return FALSE;
     196
     197    /* We dont yet use fps but handy to have */
     198    ret &= gst_structure_get_fraction(structure, "framerate",
     199                                      &fps_n, &fps_d);
     200    g_return_val_if_fail(ret, FALSE);
    205201
    206202    priv->width = width;
    207203    priv->height = height;
    208 
    209     /* We dont yet use fps or pixel aspect into but handy to have */
    210     priv->fps_n = gst_value_get_fraction_numerator(fps);
    211     priv->fps_d = gst_value_get_fraction_denominator(fps);
    212 
    213     if (par) {
    214         priv->par_n = gst_value_get_fraction_numerator(par);
    215         priv->par_d = gst_value_get_fraction_denominator(par);
    216     } else
     204    priv->fps_n = fps_n;
     205    priv->fps_d = fps_d;
     206
     207    if (!gst_structure_get_fraction(structure, "pixel-aspect-ratio",
     208                                    &priv->par_n, &priv->par_d))
    217209        priv->par_n = priv->par_d = 1;
    218210
Note: See TracChangeset for help on using the changeset viewer.