[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:47:13 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a057af1
The following commit has been merged in the master branch:
commit a057af1616d8f6f4d3695190e64cccf876efb929
Author: Robin Mills <robin at clanmills.com>
Date: Mon Oct 17 16:32:58 2016 +0000
#1244. Removing experimental APIs introduced by r4637. I submitted those APIs just to retain the code somewhere. I have no plan to release such as API.
---
include/exiv2/basicio.hpp | 25 ++++++-------------
include/exiv2/image.hpp | 3 ---
src/basicio.cpp | 61 ++++-------------------------------------------
src/image.cpp | 9 -------
src/tiffimage.cpp | 14 -----------
5 files changed, 11 insertions(+), 101 deletions(-)
diff --git a/include/exiv2/basicio.hpp b/include/exiv2/basicio.hpp
index 1c849f1..65f4936 100644
--- a/include/exiv2/basicio.hpp
+++ b/include/exiv2/basicio.hpp
@@ -206,6 +206,7 @@ namespace Exiv2 {
Nonzero if failure;
*/
virtual int munmap() =0;
+
//@}
//! @name Accessors
@@ -257,18 +258,6 @@ namespace Exiv2 {
virtual BasicIo::AutoPtr temporary() const = 0;
/*!
- @brief markBlocks that we know for certain are not metadata
- @note This method is designed to enable TIFF files to mark StripOffsets/StringByteCounts
- */
- virtual void markRead(long offset,long count);
-
- /*!
- @brief read all blocks that are not marked
- @note This method is designed to enable TIFF file to read everything except the markRead blocks!
- */
- virtual void readUnmarked();
-
- /*!
@brief Mark all the bNone blocks to bKnow. This avoids allocating memory
for parts of the file that contain image-date (non-metadata/pixel data)
@@ -276,6 +265,12 @@ namespace Exiv2 {
are all downloaded from the remote file to memory.
*/
virtual void populateFakeData() {}
+
+ /*!
+ @brief this is allocated and populated by mmap()
+ */
+ byte* bigBlock_;
+
//@}
protected:
@@ -955,12 +950,6 @@ namespace Exiv2 {
*/
virtual int open();
- virtual void markRead(long offset,long count);
-
- virtual void readUnmarked();
-
- byte* bigBlock_;
-
/*!
@brief Reset the IO position to the start. It does not release the data.
@return 0 if successful;<BR>
diff --git a/include/exiv2/image.hpp b/include/exiv2/image.hpp
index 8e26b13..7ba84b3 100644
--- a/include/exiv2/image.hpp
+++ b/include/exiv2/image.hpp
@@ -488,9 +488,6 @@ namespace Exiv2 {
int pixelHeight_; //!< image pixel height
NativePreviewList nativePreviews_; //!< list of native previews
- std::vector<long> stripOffsets; //!< StripOffset data
- std::vector<long> stripByteCounts ; //!< StripByteCount data
-
private:
//! @name NOT implemented
//@{
diff --git a/src/basicio.cpp b/src/basicio.cpp
index 9367753..dfd1e88 100644
--- a/src/basicio.cpp
+++ b/src/basicio.cpp
@@ -84,10 +84,6 @@ namespace Exiv2 {
{
}
- void BasicIo::markRead(long /*offset*/,long /*count*/) { return ; }
-
- void BasicIo::readUnmarked() { return ; }
-
//! Internal Pimpl structure of class FileIo.
class FileIo::Impl {
public:
@@ -1697,59 +1693,6 @@ namespace Exiv2 {
return 0; // means OK
}
- void RemoteIo::markRead(long offset,long count)
- {
- // std::cout << "RemoteIo::markRead offset = " << offset << " count = " << count << std::endl;
- int blockLow = (offset )/p_->blockSize_ ;
- int blockHigh = (offset + count )/p_->blockSize_ ;
- for ( int block = blockLow+1 ; block < blockHigh-1 ; block++ ) {
- p_->blocksMap_[block].markKnown(p_->blockSize_);
- }
- }
-
- void RemoteIo::readUnmarked()
- {
- long blockSize = p_->blockSize_;
- int nBlocks = (p_->size_ + blockSize -1) / blockSize ;
-#ifdef DEBUG
- int nRead = 0;
- int nHigh = 0;
- int nGulp = 0;
- int nBytes = 0;
- for ( int block = 0 ; block < nBlocks ; block++ ) {
- if ( p_->blocksMap_[block].isNone() ) {
- nRead++ ;
- nHigh = block;
- }
- }
- std::cerr << "RemoteIo::readUnmarked nBlocks = " << nBlocks << " nRead = " << nRead << " nHigh = " << nHigh << std::endl;
- for ( int block = 0 ; block < nBlocks ; block ++ ) {
- char x = 'X';
- if ( p_->blocksMap_[block].isNone() ) x='.';
- if ( p_->blocksMap_[block].isInMem() ) x='R';
- if ( p_->blocksMap_[block].isKnown() ) x='-';
- std::cerr << x ;
- }
- std::cerr << std::endl;
-#endif
- for ( int block = 0 ; block < nBlocks ; block ++ ) {
- if ( p_->blocksMap_[block].isNone() ) {
- int b = block;
- if ( b < (nBlocks -1)) while ( p_->blocksMap_[b+1].isNone() && b < nBlocks ) b++;
- seek(block*blockSize,BasicIo::beg);
- read(blockSize);
-#ifdef DEBUG
- nBytes += blockSize*(b-block+1);
- nGulp ++ ;
-#endif
- block = b ;
- }
- }
-#ifdef DEBUG
- std::cerr << "RemoteIo::readUnmarked nGulp = " << nGulp << " nBytes = " << nBytes << std::endl;
-#endif
- }
-
int RemoteIo::close()
{
if (p_->isMalloced_) {
@@ -1759,6 +1702,10 @@ namespace Exiv2 {
#ifdef DEBUG
std::cerr << "RemoteIo::close totalRead_ = " << p_->totalRead_ << std::endl;
#endif
+ if ( bigBlock_ ) {
+ delete [] bigBlock_;
+ bigBlock_=NULL;
+ }
return 0;
}
diff --git a/src/image.cpp b/src/image.cpp
index 621391e..b1f881b 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -402,15 +402,6 @@ namespace Exiv2 {
out << sp << byteSwap4(buf,k*size,bSwap);
sp = " ";
}
- // populate strips and bytes
- if ( tag == 0x0111 ) {
- for ( size_t k = 0 ; k < count ; k++ ) // stripOffsets
- stripOffsets.push_back(byteSwap4(buf,k*size,bSwap));
- }
- if ( tag == 0x0117 ) {
- for ( size_t k = 0 ; k < count ; k++ ) // stripByteCounts
- stripByteCounts.push_back(byteSwap4(buf,k*size,bSwap));
- }
} else if ( isRationalType(type) ){
for ( size_t k = 0 ; k < kount ; k++ ) {
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index ef78fa3..a61d2b5 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -189,20 +189,6 @@ namespace Exiv2 {
// must be recursive to handle NEFs which stores the raw image in a subIFDs
std::ofstream devnull;
printStructure(devnull,kpsRecursive,0);
-#ifdef DEBUG
- assert(stripOffsets.size() == stripByteCounts.size());
- int ignored =0 ;
- for ( int strip = 0 ; strip < stripOffsets.size() ; strip ++ )
- ignored += stripByteCounts[strip];
- std::cout << "TiffImage::readMetadata ignored = " << ignored << " size = " << io().size() << std::endl;
-#endif
-#if 0
- assert(stripOffsets.size() == stripByteCounts.size());
- // tell io_ to ignore the strips and read everything else into memory
- for ( size_t strip = 0 ; strip < stripOffsets.size() ; strip ++ )
- io_->markRead(stripOffsets[strip],stripByteCounts[strip]);
- io_->readUnmarked();
-#endif
ByteOrder bo = TiffParser::decode(exifData_,
iptcData_,
xmpData_,
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list