Page MenuHomePhabricator

Add support for video thumbnails...
ClosedPublic

Authored by netstar on Jan 13 2017, 10:31 AM.

Details

Reviewers
raster

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3090
Build 3155: arc lint + arc unit
netstar updated this revision to Diff 10524.Jan 13 2017, 10:31 AM
netstar updated this revision to Diff 10525.
netstar retitled this revision from to Add support for video thumbnails....
netstar updated this object.
netstar edited the test plan for this revision. (Show Details)

indent again

This adds support to the thumbnail generation.

Hi @raster

This code works.

There is an issue with the path here.

If I'm in the CWD of the file and run rage_thumb it'll get the album art work

Otherwise WHATEVER i do trying to get the program

With the above patch this works:

$ /opt/lib/rage/utils/rage_thumb "Alien 3.mp4" 10000 1
$ tycat /home/netstar/.cache/rage/albumart/8e/62635d6a7d9302ea99290b11e3d57041c093df.jpg

This on the other hand:

/opt/lib/rage/utils/rage_thumb "/home/netstar/Videos/Alien.mp4" 10000 1

Dosnt work it just generates an image from the file....!!!!

Am a bit confused looking at the path in thumb.c it looks ok???

That above BOGOSITY works it sort of emulates the weird behaviour from the shell...

Nightmare to debug that I must say!

Hope you can fix better!!!

raster edited edge metadata.Jan 13 2017, 5:55 PM

your path to the file for rage thumb is totally different... its missing " 3" ...

That is a bad example...

I've both films. The same happens with "Alien 3.m4v" and "Aliens.m4v" bad example on my part. Oops!!!

I don't understand but the Video thumbnails are only properly generated if I change the CWD of /usr/local/lib/rage/utils/rage_thumb when searching for video thumbnails to $HOME/Videos and then use just the filename - otherwise it'll fail.

well i can say for sure that CWD isnt changed to make rage_thumb work... cwd is whatever rage the process inherits... and generally for me cwd is $HOME but sometimes something else and it works... rage_thumb should be getting passed full paths by rage as we hash the full path to fighure out the thumb hash to use... as the same filename in 2 dirs may definitely not be the same file or movie or music etc. eg /home/user/Music/Smellyband/Albumofants/track1.mp3 ... the file is track1.mp3 but the file path really matters... :)

Hi it must be something to do with the mmap...in emotion we're using. I recall beforehand full path worked fie with memset...so the above code without the bogus chdir worked with a copy of data...

Wonder why this happens?

So with the mmap there is an image returned but it's some other image, unless change the CWD and then emotion_file_meta_artwork_get cannot get the actual album art image!

What happens???

netstar updated this revision to Diff 10528.Jan 15 2017, 5:04 AM

@raster, i've tried to make this less fugly...
I still don;t understand why it's returning a frame of vidoe
if not chdir and passing the filename only!!!

netstar updated this revision to Diff 10529.Jan 15 2017, 5:15 AM

Have tried to make this as pretty as I can!!!
I don't like this and i do not understand
wtf happens?!!!

netstar updated this revision to Diff 10534.Jan 15 2017, 11:12 PM

Use your effing gumption

netstar updated this revision to Diff 10536.Jan 15 2017, 11:24 PM

This one's better...

Seems evas_image_loader.gst can get in the way if symlinked
to files you want videothumbs from e.g. .m4v

netstar updated this revision to Diff 10537.Jan 15 2017, 11:32 PM

exit(0) on success - twice as fast thumb loading...
also elm_exit() will segv it's 7am..

Evas Generic Loaders caused the issue PROBABLY

I think i' d like to have the mp4 gst symlink (evas_image_loader) REMOVED...!!!

raster accepted this revision.Jan 16 2017, 12:05 AM
This revision is now accepted and ready to land.Jan 16 2017, 12:05 AM
raster closed this revision.Jan 16 2017, 9:19 PM

this was merged in 47b39cc22799f1b061da41d7c1cf068311883e28