~ubuntu-branches/ubuntu/dapper/gst-plugins-good0.10/dapper-security

« back to all changes in this revision

Viewing changes to ext/cairo/gsttimeoverlay.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-05-05 19:10:19 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060505191019-mge3njl5173jfldb
Tags: 0.10.3-0ubuntu1
* New upstream version (Ubuntu: #43135):
  Changes since 0.10.2:
  - Annodex/CMML support
  - RTSP and RTP enhancements
  - HAL configured audio device support
  - FLAC, Matroska, AVI, WAV, ID3, APE, DV and JPEG plugin improvements
  - Recognise SSA/ASS and USF subtitles in Matroska files
  - Fixes for ESD and SunAudio output plugins
  - More uniform plugin descriptions
  - IceCast metadata reading plugin added
  - New plugins ported from 0.8: OSX audio, AVI muxer, X-Windows input,
    WAV encoder, Gdk-Pixbuf image decoder, Smoke decoder,
    Video colour balance
  - Lots of bug fixes
  Bugs fixed since 0.10.2:
  - RTSP src not working with WMServer servers
  - Replacing icy demuxing in gnomevfssrc
  - HAL sound device wrapper plugins
  - totem (gstreamer) crashes when playing an avi file (Ubuntu: #38800)
  - avidemux does not handle eos at end of seek-region
  - faulty GObject macros
  - [patch] Streaming support for wavparse
  - [pngdec] doesn't handle grayscale or paletted
  - Time slider does not work with avi videos from Cannon SD100
  - [auparse] .au files don't play in playbin
  - [wavparse] will not play DTS stream in malformed WAV
  - rtspsrc filter sometimes uses an odd port for rtp
  - annodex decoding and encoding support
  - [id3demux] read in replaygain information from RVA2 frame...
  - " Seek in ready " for dvdemux
  - problem with auparse or mulawdec, choppy esd playback
  - videobalance not ported to new GstVideoFilter
  - " Seek in ready " support for wavparse plugin
  - gst-plugins-good fail to compile with gcc 4.1
  - Profile support for gconfaudiosink
  - Crash playing any song from a particular album over rhyth...
  - Unable to play .fli files
  - Critical warnings when using cddacdiosrc
  - Gstreamer doesn't recognise tags
  - [alpha] state change function returns a constant
  - Another file that gstreamer can't read the tags on
  - [jpeg] smokedec not ported
  - [pngdec] does not support files with png streams
  - [PATCH] avimux ported to 0.10
  - [wavparse] does not support multichannel wavs
  - [id3demux] reads unicode tags incorrectly where .8 did it...
  - [apedemux] some WavPack files with APE tags fail to play ...
  - [sunaudio] unused variables break CVS build with -Werror
  - [PATCH] Fix gst_pad_new_from_template (gst_static_pad_tem...
  - invalid get_times implementation in gstdynudpsink
  - [patch] unref the result of gst_pad_get_parent
  - [jpegdec] wrong durations set on buffers after seeking in...
  - avi of mpeg4 video and adpcm audio from digital camera re...
  - [id3demux] mp3 fails to play because typefinding thinks i...
  - [goom] zoom filter leaked
  - [wavparse] incorrect way to calculate seek position with ...
  - rhythmbox import crasher - png?
  - Video playback out of sync (Ubuntu: #33073)
  - [speexenc] doesn't work (Ubuntu: #34904)
  - move taglib-based ID3 muxer to -good
  - plugins need better/univied descriptions
  - move ximagesrc to gst-plugins-good
  - index creation might fail with some non-indexe...
  - Problem playing some AVI file when splitting large chunks...
  - [speex] can't seek in speex-encoded audio (Ubuntu: #37552)
  - [matroska] " caps not real subset " when playing audio files
  - AVI files downloaded from vidoe.google.com won't play (Ubuntu: #30031)
  - [sunaudiosink] some fixes
  - [flacdec] can't play .flac files where header says total_...
  - [flacdec] segment seek not supported
  - [id3demux] TCO genre tags (id3v2.2) don't get read by gst...
  - [shout2send] fix crash on error and tags received before ...
  - [wavenc] " not negotiated " error with CVS core
  - [matroskademux] blocks on segmenting seek (and other seek...
  - [matroska] can't play file if details come before type in...
  - [matroska] enhancement for VfW compatibility cases
  - [matroskamux] wrong timestamps of B-frames
  - [matroskamux] blocks upon muxing video and vorbis-audio
  - rtpamrdec discards non-transmitted frames
  - use a duration based on the index if available (Ubuntu: #29962)
* debian/build-deps.in:
  - Build-Depends on libgtk2.0-dev libhal-dev libtag1-dev libxml2-dev
  - updated libgstreamer-plugins-base0.10-dev requirement
* debian/control.in:
  - gstreamer0.10-plugins-good Replaces gstreamer0.10-plugins-bad (<< 0.10.3)
* debian/gstreamer-plugins-good.install:
  - list new elements to install
* debian/rules:
  - updated libgstreamer0.10-dev requirement

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
#include <gst/video/video.h>
50
50
 
51
 
static GstElementDetails cairo_time_overlay_details =
52
 
GST_ELEMENT_DETAILS ("Time Overlay",
 
51
static const GstElementDetails cairo_time_overlay_details =
 
52
GST_ELEMENT_DETAILS ("Time overlay",
53
53
    "Filter/Editor/Video",
54
54
    "Overlays the time on a video stream",
55
55
    "David Schleef <ds@schleef.org>");
181
181
  int width;
182
182
  int height;
183
183
  int b_width;
 
184
  int stride_y, stride_u, stride_v;
184
185
  char *string;
185
186
  int i, j;
186
187
  unsigned char *image;
238
239
  if (b_width > width)
239
240
    b_width = width;
240
241
 
 
242
  stride_y = GST_VIDEO_I420_Y_ROWSTRIDE (width);
 
243
  stride_u = GST_VIDEO_I420_U_ROWSTRIDE (width);
 
244
  stride_v = GST_VIDEO_I420_V_ROWSTRIDE (width);
 
245
 
241
246
  memcpy (dest, src, GST_BUFFER_SIZE (in));
242
247
  for (i = 0; i < timeoverlay->text_height; i++) {
243
248
    for (j = 0; j < b_width; j++) {
244
 
      ((unsigned char *) dest)[i * width + j] = image[(i * width + j) * 4 + 0];
 
249
      ((unsigned char *) dest)[i * stride_y + j] =
 
250
          image[(i * width + j) * 4 + 0];
245
251
    }
246
252
  }
247
253
  for (i = 0; i < timeoverlay->text_height / 2; i++) {
248
 
    memset (dest + width * height + i * (width / 2), 128, b_width / 2);
249
 
    memset (dest + width * height + (width / 2) * (height / 2) +
250
 
        i * (width / 2), 128, b_width / 2);
 
254
    memset (dest + GST_VIDEO_I420_U_OFFSET (width, height) + i * stride_u, 128,
 
255
        b_width / 2);
 
256
    memset (dest + GST_VIDEO_I420_V_OFFSET (width, height) + i * stride_v, 128,
 
257
        b_width / 2);
251
258
  }
252
259
 
253
260
  cairo_destroy (text_cairo);