~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to cygnal/libamf/buffer.cpp

  • Committer: Package Import Robot
  • Author(s): Micah Gersten
  • Date: 2012-03-04 03:19:06 UTC
  • mfrom: (1.1.18) (3.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20120304031906-p6q5rnb0xhgpof7o
Tags: 0.8.10-3ubuntu1
* Merge from Debian testing (FFe: LP: #940876), remaining changes:
  - Use mozilla-flashplugin as the alternative for now
  - Change xulrunner-dev build dep to firefox-dev
* Drop the plugin API porting patch, this has been fixed upstream
  - drop debian/patches*
* Drop the following change as we want Adobe's player to take priority
  if it's installed
  - Set alternative priority to 50 so that it matches Adobe Flash's priority

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// 
2
 
//   Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
2
//   Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
3
3
// 
4
4
// This program is free software; you can redistribute it and/or modify
5
5
// it under the terms of the GNU General Public License as published by
176
176
#ifdef USE_STATS_BUFFERS
177
177
        struct timespec now;
178
178
        clock_gettime (CLOCK_REALTIME, &now);
179
 
        log_debug("Buffer %x (%d) stayed in queue for %f seconds",
 
179
        log_debug(_("Buffer %x (%d) stayed in queue for %f seconds"),
180
180
                  (void *)_data.get(), _nbytes,
181
181
                  (float)((now.tv_sec - _stamp.tv_sec) + ((now.tv_nsec - _stamp.tv_nsec)/1e9)));
182
182
#endif
708
708
        // deleted when this method returns.
709
709
        // We loose data if we resize smaller than the data currently held.
710
710
        if (size < used) {
711
 
            gnash::log_error("cygnal::Buffer::resize(%d): Truncating data (%d bytes) while resizing!", size, used - size);
 
711
            gnash::log_error(_("cygnal::Buffer::resize(%d): Truncating data (%d bytes) while resizing!"), size, used - size);
712
712
            used = size;
713
713
        }
714
714
        boost::uint8_t *newptr = new boost::uint8_t[size];
763
763
    // Pick the number of errors to create based on the Buffer's data size
764
764
    boost::uniform_int<> errs(1, (_nbytes/factor));
765
765
    int errors = errs(seed);
766
 
    gnash::log_debug("Creating %d errors in the buffer", errors);
 
766
    gnash::log_debug(_("Creating %d errors in the buffer"), errors);
767
767
    
768
768
    for (int i=0; i<errors; i++) {
769
769
        // find a location someplace within the file.
785
785
 
786
786
// local Variables:
787
787
// mode: C++
788
 
// indent-tabs-mode: t
 
788
// indent-tabs-mode: nil
789
789
// End: