Project

General

Profile

Actions

Testing #783

closed

Verify inotify is working with VideoFE

Added by Hammel over 3 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Testing
Target version:
Start date:
24 Jul 2020
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

I don't remember testing that the inotify support actually works. I want to make sure that adding a usb stick causes the display to update. This is especially important for the player-only system that will launch directly into the VideoFE app and have to update it's display once SMB gets running and finds network mounts.

Actions #1

Updated by Hammel 10 months ago

  • Priority changed from Urgent to Immediate
  • Target version changed from 2.0 - Harkonnen to 3.0 - Corrino
  • Severity changed from 02 - High to 05 - Very Low
Actions #2

Updated by Hammel 5 months ago

  • Severity changed from 05 - Very Low to 01 - Critical
Actions #3

Updated by Hammel 5 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

I need to copy some videos to USB sticks to try this. I have a big disk with 1TB+ videos but that doesn't work well with VideoFE (see RM #522). So I need some smaller sets of videos to test with.

I ordered some smaller sticks to break up the videos for camping, but I need to use some 32GB sticks I have for testing this issue for now.

Actions #4

Updated by Hammel 5 months ago

  • % Done changed from 10 to 30

Looks like the watcher catches the usb stick insert and updates the db but the UI is not automatically updated.

[    watcher.c:0141] INFO DB change detected.
[         db.c:0681] INFO Looking for movie directories to scan.
[         db.c:0225] INFO Find command: find . -type d -name movies
[         db.c:0236] INFO Clearing directory list.
[         db.c:0242] INFO Building directory list.
[         db.c:0253] INFO Done finding directories to scan.
[         db.c:0683] INFO Looking for TV directories to scan.
[         db.c:0225] INFO Find command: find . -type d -name tv
[         db.c:0236] INFO Clearing directory list.
[         db.c:0242] INFO Building directory list.
[         db.c:0253] INFO Done finding directories to scan.
[         db.c:0706] INFO Calling readDB on movieDirList
[         db.c:0708] INFO Calling readDB on episodeDirList
[         db.c:0715] INFO Calling genVideo on movieList
[         db.c:0717] INFO Calling genVideo on episodeList

Looks like all that is missing is a call to updateDisplay() from watcherProcessor(). I think that should do it.

Actions #5

Updated by Hammel 5 months ago

  • % Done changed from 30 to 60

watcher.c is updated and ready for testing on hardware.

Actions #6

Updated by Hammel 5 months ago

This didn't actually work. I'm not sure what inotify() caught in the above example, but it wasn't a mounted directory under /media/usb or /media/smb because inotify() is only watching /media and it doesn't watch directories recursively.

So I need to change the code to watch both /media/usb and /media/smb. Also, /media/smb may not work as there are notes about possible problems with network drives. I'll have to test to see if that works.

Actions #7

Updated by Hammel 5 months ago

  • % Done changed from 60 to 80

Implemented, but needs testing on hardware.

Actions #8

Updated by Hammel 5 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

Okay, it wasn't quite that easy. While calling updateDisplay was necessary, it had to be done in the GTK+ main thread. So instead of calling it directly, I needed to call it from a g_timeout_add() callback function, and then only once.

This has been implemented and tested on hardware. I've tested plugging in a USB stick and unplugging one, and repeated this a few times. Seems pretty stable.

Code committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF