Commit Graph

744 Commits

Author SHA1 Message Date
Olivier Poitrey 10ff1892b4 Merge pull request #624 from akhenakh/620_move_categories
refs #620 move NSData+ImageContenttype to the SDWebImage subdirectory
2014-01-21 10:57:19 -08:00
Fabrice Aneche edc1d882e8 refs #620 move NSData+ImageContenttype to the SDWebImage subdirectory 2014-01-21 09:57:50 -08:00
Olivier Poitrey 4589e4a744 Merge pull request #616 from akhenakh/fix_demo
fix demo
2014-01-15 12:42:36 -08:00
Fabrice Aneche 8b16de2575 fix demo 2014-01-15 10:25:14 -08:00
Olivier Poitrey 42f9736972 Merge pull request #607 from akhenakh/reformat_code
Code standardization
2014-01-06 18:39:38 -08:00
Fabrice Aneche 03eeb5842f reformat a long method call 2014-01-06 17:37:52 -08:00
Fabrice Aneche bdea43aec1 Dot-notation should always be used for accessing and mutating properties. Bracket notation is preferred in all other instances 2014-01-06 17:30:34 -08:00
Fabrice Aneche 6d8133557c NS_ENUM & NS_OPTIONS 2014-01-06 17:13:30 -08:00
Fabrice Aneche 6dc02bd8f7 reformat code (appcode) 2014-01-06 17:12:24 -08:00
Olivier Poitrey c00c2e0ed4 Merge pull request #606 from akhenakh/64bits_support
use a NSInteger as size (was NSUInteger, was long long) cause we are using -1 (NSURLResponseUnknownLength) in progress callback
2014-01-06 16:32:43 -08:00
Fabrice Aneche 765a897120 more details about delegate call with -1 NSURLResponseUnknownLength 2014-01-06 16:22:07 -08:00
Fabrice Aneche 056e1e6562 use a NSInteger as size (cause we are using -1 as start indicator) 2014-01-06 16:14:32 -08:00
Olivier Poitrey 1e0af36f3f Merge pull request #605 from akhenakh/upgrade_webp
upgrade libwebp to 0.4.0
2014-01-06 15:06:32 -08:00
Olivier Poitrey 6aca6a2100 Merge pull request #604 from akhenakh/webp_detect
Webp detect
2014-01-06 15:04:08 -08:00
Fabrice Aneche 5e3384e77b upgrade libwebp to 0.4.0 2014-01-06 14:46:20 -08:00
Fabrice Aneche adffebc8fb reformat code 2014-01-06 13:14:10 -08:00
Fabrice Aneche 20bada38a0 fixed code format 2014-01-06 13:04:49 -08:00
Fabrice Aneche 6d6796c31a explicit webp detection 2014-01-06 13:00:13 -08:00
Olivier Poitrey 853ad83647 Merge pull request #603 from akhenakh/64bits_support
64bits support (fix #572, fix #504, fix #494)
2014-01-06 11:59:40 -08:00
Fabrice Aneche 77fad5cdf1 changed sizes to NSUInteger 2014-01-03 17:38:29 -08:00
Fabrice Aneche 21842747aa update documentation 2014-01-03 17:19:17 -08:00
Fabrice Aneche d3a9a57a0d support arm64 2014-01-03 17:14:13 -08:00
Olivier Poitrey 8f8228e2a6 Bump version to 3.5.2 2014-01-02 11:12:43 -08:00
Olivier Poitrey 48846851ee Merge pull request #591 from hsoi/downloader-timeout
Expose timeout property for the downloader.
2013-12-20 06:59:19 -08:00
John C. Daub f66b8b807e Expose timeout property for the downloader. 2013-12-20 08:24:33 -06:00
Olivier Poitrey 639aa643eb Merge pull request #588 from wishabi/master
Assign thread for downloada cancellation + minor doc fix
2013-12-16 12:41:21 -08:00
Erik Charlebois 00918d0908 Fix documentation param name mismatch 2013-12-16 14:45:30 -05:00
Erik Charlebois f8d26f5172 Track current thread in downloader operation 2013-12-16 14:41:35 -05:00
Olivier Poitrey 7ace0684f2 Merge branch 'master' of git://github.com/vincentjames501/SDWebImage into vincentjames501-master 2013-12-16 10:28:33 +01:00
Olivier Poitrey 25007e0b06 Merge branch 'master' of git://github.com/wishabi/SDWebImage into wishabi-master 2013-12-16 10:12:54 +01:00
Olivier Poitrey 616828b19b Merge pull request #587 from JaviSoto/master
Removing warnings in Xcode 5.1DP2
2013-12-15 03:08:46 -08:00
Javier Soto 2cbc5d71e0 Removing warning in 5.1DP2 by marking variable as unused 2013-12-13 17:05:36 -08:00
Javier Soto be4a9e0ac8 Removing warning in 5.1DP2 by removing “extern inline” (this doesn’t really make sense) 2013-12-13 17:04:57 -08:00
Olivier Poitrey 4382672c4a Merge pull request #582 from jenshandersson/master
Added new option to allow invalid SSL Certificates. Useful for testing
2013-12-11 07:49:17 -08:00
Jens Andersson 706c57308e Cleaned up code to follow project code style 2013-12-11 16:26:08 +01:00
Jens Andersson fbe3b95e8c Added new option to allow invalid SSL Certificates. Useful for testing 2013-12-11 13:31:03 +01:00
Bogdan Poplauschi b201e137d8 Added PNG detection to be able to determine at runtime if a downloaded image should be saved as PNG or as JPEG 2013-12-11 12:15:05 +01:00
Erik Charlebois 3f20a101c5 Fix race condition in image download cancellation
There are many race conditions around cancelling
SDWebImageDownloaderOperation instances from other threads. For example,
imageData may be set to nil and deallocated just as it is being appended
to, or the threading can interleave in such a way that messages are sent
to a deallocated connection. These were discovered using SDWebImage for
a Google Maps-style tiled mapping application where there is a lot of
download and cancellation if users pan rapidly.

This fix tracks the worker thread that the NSURLConnection instance runs on and
performs cancellation on the worker thread. The cancel and start methods need
to be synchronized to handle the case where cancellation happens before
start is called; since no thread has been assigned yet, cancellation is
performed on the calling thread.

Because cancellation is now scheduled on the same run loop as
NSURLConnectionDelegate callbacks, there is an added window of time that
a download can finish prior to cancellation. This means it's possible to
cancel an operation yet still get a successful completion callback. This
was always possible because of race conditions, but it is more
pronounced and predictable now. An application that relies on
a cancelled operation never calling its completion block (e.g. recycling
image views in a scrolling table view) must adopt some other mechanism
(e.g. a version number) to avoid running completion code for a stale operation.
2013-12-09 17:08:56 -05:00
Vincent Pizzo 8a541f6f31 bleh 2013-12-09 15:58:32 -06:00
Vincent Pizzo 716fc38c93 Updating podspec 2013-12-09 15:54:44 -06:00
Vincent Pizzo 4335fb7e41 Using webkit's method for determing frame durations of various gif images 2013-12-06 16:51:31 -06:00
Olivier Poitrey 3380e56a7d Merge pull request #577 from pieterclaerhout/master
Added a delegate for the web image prefetched.
2013-12-06 07:57:44 -08:00
Pieter Claerhout 51be4e298c Code cleanup. 2013-12-06 16:53:22 +01:00
Pieter Claerhout 1a917d8239 Added a delegate for the web image prefetched. 2013-12-06 16:21:00 +01:00
Olivier Poitrey 6878fba926 Bump version to 3.5.1 (fix #568) 2013-12-03 00:07:28 -08:00
Olivier Poitrey 1872fed8f0 Merge pull request #562 from mknippen/master
added currentDownload Count, to allow someone to see how many operations are left.
2013-11-26 19:34:49 -08:00
Matthew Knippen d0f8571dd2 matched coding conventions 2013-11-26 21:29:10 -06:00
Matthew Knippen d020aea02f added currentDownload Count, to allow someone to see how many operations are left. 2013-11-26 16:54:59 -06:00
Olivier Poitrey 75a76d983a Merge pull request #514 from crazytonyli/header-picking
Add HTTP header passing test to pick header for downloading request
2013-11-24 22:28:19 -08:00
Tony Li 597a70a8b6 Add HTTP header filter to pick headers for downloading request 2013-11-25 14:21:42 +08:00