Mac OS icon progress bar

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
squal
Posts: 14
Joined: Sat Jun 30, 2012 4:37 pm

Mac OS icon progress bar

Post by squal »

Is anyone working on this? I could take that on, but the admin told me to ask here before anything. It might take me a couple of weeks to submit anything because I have some insane deadline right now, but I will eventually have that.

If all is good then I'll ask a couple of questions about the code.

Thanks.
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Mac OS icon progress bar

Post by s55 »

No-one has said anything, so if your interested, ask your questions.
squal
Posts: 14
Joined: Sat Jun 30, 2012 4:37 pm

Re: Mac OS icon progress bar

Post by squal »

Ok then, can you tell me where exactly (or at least in which class) does the progress or status gets pulled? Handbrake displays a progress bar of the video currently being encoded. I took a very quick look at the code and it wasn't obvious to me where it was. I could spend some time and I'll find it, but it would be helpful and easier if someone who's familiar with the code can point me to the right place.

I'm guessing the Obj C code is retrieving something from Handbrake's main code, which is probably C++?

Anyway, if there's a wiki for the Mac OS code then just point me there. I'll also document whatever gets done from side (once approved of course).

Thanks.
Deleted User 11865

Re: Mac OS icon progress bar

Post by Deleted User 11865 »

squal wrote:Ok then, can you tell me where exactly (or at least in which class) does the progress or status gets pulled? Handbrake displays a progress bar of the video currently being encoded. I took a very quick look at the code and it wasn't obvious to me where it was. I could spend some time and I'll find it, but it would be helpful and easier if someone who's familiar with the code can point me to the right place.
macosx/Controller.m - method name is UpdateDockIcon. Also look at the dockIconProgress variable.
squal wrote:I'm guessing the Obj C code is retrieving something from Handbrake's main code, which is probably C++?
No, libhb is written in plain old C.
squal
Posts: 14
Joined: Sat Jun 30, 2012 4:37 pm

Re: Mac OS icon progress bar

Post by squal »

Thanks very much!
Also look at the dockIconProgress variable.
Oh, so somebody started working on this, I guess.

Thanks again.
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Mac OS icon progress bar

Post by s55 »

squal, no-one is working on it. There is a very crude progress bar that already gets rendered on the icon, but it's meaning less.

The idea was to improve it to something more meaningful. viewtopic.php?f=22&t=22644
squal
Posts: 14
Joined: Sat Jun 30, 2012 4:37 pm

Re: Mac OS icon progress bar

Post by squal »

No problem. It just needs beautifying then. Even easier. ;-)
squal
Posts: 14
Joined: Sat Jun 30, 2012 4:37 pm

Re: Mac OS icon progress bar

Post by squal »

I posted an idea for the status / progress indicator for the dock in this other thread viewtopic.php?f=4&t=24639&p=113985#p113985.

Only concern I have is if you guys approve of me adding another class to the Xcode Project. I need to override the drawrect of the Dock Tile. This is all good with the versions of Mac Os Handbrake supports, but it's a newer SDK feature for the icon dock than the one Handbrake is using right now. I'm basically building a custom NSView where I'm using some paths to draw the fill of the cup. It could be a mask revealing something less flat than that example I sent.

Even if we don't go for this idea (if we use the regular progress bar), I'll still be using that custom view. That way we'll have good control to do whatever we want with the progress notification.

There is a progress bar which is part of the SDK that we can use instead, but that one's not too different from what you already have there. It doesn't display any text, as far as I know.
Post Reply