pHash 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/phash/audio.rb +1 -2
- data/lib/phash/text.rb +1 -2
- data/lib/phash/video.rb +1 -2
- data/pHash.gemspec +1 -1
- metadata +3 -3
data/lib/phash/audio.rb
CHANGED
@@ -49,9 +49,8 @@ module Phash
|
|
49
49
|
#
|
50
50
|
attach_function :ph_audio_distance_ber, [:pointer, :int, :pointer, :int, :float, :int, :pointer], :pointer, :blocking => true
|
51
51
|
|
52
|
+
class AudioHash < HashData; end
|
52
53
|
class << self
|
53
|
-
class AudioHash < HashData; end
|
54
|
-
|
55
54
|
# Read audio file specified by path and optional length using <tt>ph_readaudio</tt> and get its hash using <tt>ph_audiohash</tt>
|
56
55
|
def audio_hash(path, length = 0)
|
57
56
|
sample_rate = 8000
|
data/lib/phash/text.rb
CHANGED
@@ -35,9 +35,8 @@ module Phash
|
|
35
35
|
#
|
36
36
|
attach_function :ph_compare_text_hashes, [:pointer, :int, :pointer, :int, :pointer], :pointer, :blocking => true
|
37
37
|
|
38
|
+
class TextHash < HashData; end
|
38
39
|
class << self
|
39
|
-
class TextHash < HashData; end
|
40
|
-
|
41
40
|
# Get text file hash using <tt>ph_texthash</tt>
|
42
41
|
def text_hash(path)
|
43
42
|
hash_data_length_p = FFI::MemoryPointer.new :int
|
data/lib/phash/video.rb
CHANGED
@@ -13,9 +13,8 @@ module Phash
|
|
13
13
|
#
|
14
14
|
attach_function :ph_dct_videohash_dist, [:pointer, :int, :pointer, :int, :int], :double, :blocking => true
|
15
15
|
|
16
|
+
class VideoHash < HashData; end
|
16
17
|
class << self
|
17
|
-
class VideoHash < HashData; end
|
18
|
-
|
19
18
|
# Get video hash using <tt>ph_dct_videohash</tt>
|
20
19
|
def video_hash(path)
|
21
20
|
hash_data_length_p = FFI::MemoryPointer.new :int
|
data/pHash.gemspec
CHANGED
metadata
CHANGED