![]() |
|
EDL (and ComSkip) integration - Printable Version +- XBMC Community Forum (http://forum.xbmc.org) +-- Forum: Development (/forumdisplay.php?fid=32) +--- Forum: Development (/forumdisplay.php?fid=93) +--- Thread: EDL (and ComSkip) integration (/showthread.php?tid=27798) |
EDL (and ComSkip) integration - DrDDT - 2007-08-07 13:44 Hi! I'm trying implement EDL for XBMC (see http://forum.xbmc.org/showthread.php?tid=21890&page=4) I'm very new to XBMC development so please be patient with me. I'm trying to add the option 'path_to_movie\movie.edl' to the mplayer options, if the file 'path_to_movie\movie.edl' exists. As suggested, I'll have to do the following: - Check if the filename give to mplayer is actually a movie and not a stream/playlist: // Check if file can have EDL if (item.IsInternetStream()) .... if (item.IsPlayList()) .... if (!item.IsVideo()) .... - If the file can have an edl, generate the possible filename: CStdString strEdlFileName; ReplaceExtension(strFile, "edl", strEdlFileName); - Check if 'path_to_movie\movie.edl' exists -[ How do I do this? ]- - Add the option to the mplayer conf Someting like: options.SetEDLFile(strFile); if (m_stredlfile.length() > 0) { m_vecOptions.push_back("-edl=" + m_stredlfile ); } Is this going to work? How do I check if the EDL file exists? - spiff - 2007-08-07 13:54 CFile::Exists and yes it will work - DrDDT - 2007-08-07 14:58 spiff Wrote:CFile::Exists I gave it a shot, it compiles, but I cannot test it yet: Code: Index: mplayer.cpp- spiff - 2007-08-07 15:02 i havent tested it either but your diff is unacceptable for inclusion indent is 2 space using spaces, please comply. and i'd prefer if you didnt spam your name all over the file. (do not mistake this for hostility) - DrDDT - 2007-08-07 15:10 spiff Wrote:i havent tested it either but your diff is unacceptable for inclusion This patch wasn't meant for inclusion, sorry I didn't make this clear. The 'name spamming' is only for me to find my own changes. I haven't coded a single line for over ten years, so I'm a bit rusty. I'll test it first, then I'll find the correct formatting and submit rules for patches. - spiff - 2007-08-07 15:18 cool - DrDDT - 2007-08-08 13:18 I've got it working now (after a few bugfixes). I'll try to add a on/off switch in the settings now. - spiff - 2007-08-08 13:31 why would we want that? if you dont want your edls, rename them / delete them. - DrDDT - 2007-08-08 17:32 spiff Wrote:why would we want that? if you dont want your edls, rename them / delete them. Doesn't the same goes for subtitles? If I have a recorded tv show, and have comskip generate an edl for removing commercials, I might want to disable the EDL because too much of the show was disabled. Maybe later then. - spiff - 2007-08-08 23:54 oh sorry you mean an osd option. a conditional osd option (only shown if we have an edl) is all fine. i thought you meant a "real" setting in settings->video. |