[vlc-commits] macosx: remove unused stringWithTimeFromInput
Thomas Guillem
git at videolan.org
Mon Jun 3 16:16:33 CEST 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jun 3 07:59:12 2019 +0200| [9149090eb100fd2f4f2f20b9ad7c0491aae44927] | committer: Thomas Guillem
macosx: remove unused stringWithTimeFromInput
One could be created with a vlc_player instead.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9149090eb100fd2f4f2f20b9ad7c0491aae44927
---
modules/gui/macosx/extensions/NSString+Helpers.h | 11 -----------
modules/gui/macosx/extensions/NSString+Helpers.m | 20 --------------------
2 files changed, 31 deletions(-)
diff --git a/modules/gui/macosx/extensions/NSString+Helpers.h b/modules/gui/macosx/extensions/NSString+Helpers.h
index ddea76a610..1234747294 100644
--- a/modules/gui/macosx/extensions/NSString+Helpers.h
+++ b/modules/gui/macosx/extensions/NSString+Helpers.h
@@ -64,17 +64,6 @@ NSImage *imageFromRes(NSString *name);
@interface NSString (Helpers)
/**
- Creates an NSString with the current time of the \c input_thread_t
-
- This method allocates and initializes an NSString with the current
- elapsed or remaining time of the given input.
-
- \param negative If YES, calculate remaining instead of elapsed time
- */
-+ (instancetype)stringWithTimeFromInput:(input_thread_t *)input
- negative:(BOOL)negative;
-
-/**
Creates an NSString with the current time of the \c input_item_t
This method allocates and initializes an NSString with the current
diff --git a/modules/gui/macosx/extensions/NSString+Helpers.m b/modules/gui/macosx/extensions/NSString+Helpers.m
index cbb3cbb31d..057f6777cc 100644
--- a/modules/gui/macosx/extensions/NSString+Helpers.m
+++ b/modules/gui/macosx/extensions/NSString+Helpers.m
@@ -49,26 +49,6 @@ NSString *const kVLCMediaUnknown = @"Unknown";
@implementation NSString (Helpers)
-+ (instancetype)stringWithTimeFromInput:(input_thread_t *)input
- negative:(BOOL)negative
-{
- NSAssert(input != NULL, @"Input may not be NULL!");
-
- char psz_time[MSTRTIME_MAX_SIZE];
- vlc_tick_t t = var_GetInteger(input, "time");
-
- vlc_tick_t dur = input_item_GetDuration(input_GetItem(input));
- if (negative && dur > 0) {
- vlc_tick_t remaining = (dur > t) ? (dur - t) : 0;
-
- return [NSString stringWithFormat:@"-%s",
- secstotimestr(psz_time, (int)SEC_FROM_VLC_TICK(remaining))];
- } else {
- return [NSString stringWithUTF8String:
- secstotimestr(psz_time, (int)SEC_FROM_VLC_TICK(t))];
- }
-}
-
+ (instancetype)stringWithDuration:(vlc_tick_t)duration
currentTime:(vlc_tick_t)time
negative:(BOOL)negative
More information about the vlc-commits
mailing list