2013-03-21, 00:03
Hello,
Kind of new to xbmc, but learning every day. The ability to customize the software through skins and code is really nice. One of the first modifications I wanted to do was to get the Aspect Ratio of a movie to display when the movie info comes up. The skins already displayed this information, but it was limited to the set defined in StreamDetails.cpp. My setup is a constant height projector, so having correct Aspect Ratios in the movie info section is a function that helps out a bunch, since I don't have to go to another source (disk, internet, etc..) to see what preset to select on my projector to get it to display correctly.
I added AR definitions in StremDetails.cpp for 1.37, 2.40, and 2.76, then compiled binaries for macOsX and Ubuntu. After a mod to the skins Textures.xbt file to add the new png files, and adding the movie Aspect Ratios to the movie.nfo files, things were starting to look pretty good. However, there is still a problem cropping up. DVDPlayer is modifying the xbmc AspectRatio database field for a movie when a movie is played. Typically you would think this is not a problem, since DVDPlayer is more likely to have the true Aspect Ratio vs. what is scrapped to a nfo file...but for ripped blurays in 2.35, 2.40, or any others that encode the black bars into the movie file, the player can interpret the AR to be different than what the movie was shot in, and as such when it updates the xbmc AR field to reflect that, the AR in the movie info is now inaccurate. Well technically it is probably accurate since the black bars are in the movie file, but not for the purposes of users like me who have a constant height setup. The nfo AR can be reloaded into the xbmc AR field when the movie details are rescanned, but a preferred way would be to not have DVDPlayer change the AR field in the database.
I had been trying to trace through the xbmc code to see where updating the AR might be blocked, without much success. Not as easy as finding where to add new ARs to xbmc . One of the searches on the forum turned up this Post where the user explains where the database media flags gets updated, and I thought that might be exactly what I wanted to review to see how to prevent the AR from getting modified by DVDPlayer.
Line 4430 in Application.cpp has comments saying "update with stream details from player, if any", the users post says the player will check to see if there are any StreamDetails for the video, and if there aren't any, then the database will be updated with the current values from the player. My take on the post and the code after 4430 is that the GetStreamDetails call is not returning a value (or valid value) for the Aspect Ratio, and it in turn updates the xbmc database fields with what the player has.
Figured I would seek help on the forum to see if I am on the right track, or entirely off base on what can be done to get the player not to overwrite the database media flag values...specifically AR. Any help in accomplishing what I want to do, or comments on why stopping the player from updating the media flag database values might not be a good idea is greatly appreciated.
Thanks,
Kind of new to xbmc, but learning every day. The ability to customize the software through skins and code is really nice. One of the first modifications I wanted to do was to get the Aspect Ratio of a movie to display when the movie info comes up. The skins already displayed this information, but it was limited to the set defined in StreamDetails.cpp. My setup is a constant height projector, so having correct Aspect Ratios in the movie info section is a function that helps out a bunch, since I don't have to go to another source (disk, internet, etc..) to see what preset to select on my projector to get it to display correctly.
I added AR definitions in StremDetails.cpp for 1.37, 2.40, and 2.76, then compiled binaries for macOsX and Ubuntu. After a mod to the skins Textures.xbt file to add the new png files, and adding the movie Aspect Ratios to the movie.nfo files, things were starting to look pretty good. However, there is still a problem cropping up. DVDPlayer is modifying the xbmc AspectRatio database field for a movie when a movie is played. Typically you would think this is not a problem, since DVDPlayer is more likely to have the true Aspect Ratio vs. what is scrapped to a nfo file...but for ripped blurays in 2.35, 2.40, or any others that encode the black bars into the movie file, the player can interpret the AR to be different than what the movie was shot in, and as such when it updates the xbmc AR field to reflect that, the AR in the movie info is now inaccurate. Well technically it is probably accurate since the black bars are in the movie file, but not for the purposes of users like me who have a constant height setup. The nfo AR can be reloaded into the xbmc AR field when the movie details are rescanned, but a preferred way would be to not have DVDPlayer change the AR field in the database.
I had been trying to trace through the xbmc code to see where updating the AR might be blocked, without much success. Not as easy as finding where to add new ARs to xbmc . One of the searches on the forum turned up this Post where the user explains where the database media flags gets updated, and I thought that might be exactly what I wanted to review to see how to prevent the AR from getting modified by DVDPlayer.
Line 4430 in Application.cpp has comments saying "update with stream details from player, if any", the users post says the player will check to see if there are any StreamDetails for the video, and if there aren't any, then the database will be updated with the current values from the player. My take on the post and the code after 4430 is that the GetStreamDetails call is not returning a value (or valid value) for the Aspect Ratio, and it in turn updates the xbmc database fields with what the player has.
Figured I would seek help on the forum to see if I am on the right track, or entirely off base on what can be done to get the player not to overwrite the database media flag values...specifically AR. Any help in accomplishing what I want to do, or comments on why stopping the player from updating the media flag database values might not be a good idea is greatly appreciated.
Thanks,