Re: [DVDnav-discuss] Fwd: Patch to add dvdnav_get_serial_string function to dvdnav
---------- Messaggio inoltrato ---------- From: Matthew Wire <devel@mrwire.co.uk> To: dvdnav mailing list <dvdnav-discuss@mplayerhq.hu> Date: Wed, 28 Jan 2009 12:53:11 +0000 Subject: [DVDnav-discuss] Patch to add dvdnav_get_serial_string function to dvdnav The attached patch adds a function to dvdnav to obtain the dvd serial number externally.
This is used in mythtv to generate a unique id for the disc for it's bookmarking code.
This is my first patch to dvdnav to please tell me if I'm doing things wrong etc.
Cheers, Matthew
you broke the API extending an existing function for no reason; you should add a new function and raise the minor number instead.
On Wed, 28 Jan 2009 23:25:44 +0100, Nico Sabbi wrote:
[21 quoted lines suppressed]
you broke the API extending an existing function for no reason; you should add a new function and raise the minor number instead.
[1 quoted line suppressed]
Hmm.. No he didn't. dvd_read_name is a static local function. He should however have added the new dvd_serial property of vm_t at the end, as that would break any app using the vm.h structs, but i'm not sure if that is public or not. Joakim
On Sat, Jan 31, 2009 at 11:23 AM, elupus <elupus@ecce.se> wrote:
On Wed, 28 Jan 2009 23:25:44 +0100, Nico Sabbi wrote:
[21 quoted lines suppressed]
you broke the API extending an existing function for no reason; you should add a new function and raise the minor number instead.
[1 quoted line suppressed]
Hmm.. No he didn't. dvd_read_name is a static local function.
Right, the only API change is to add the serial getting function.
He should however have added the new dvd_serial property of vm_t at the end, as that would break any app using the vm.h structs, but i'm not sure if that is public or not.
Good question. If the vm.h header is installed, then we have to consider it 'public'. Because, if it is then people can use the functions there to run their own VM. But, by typing 'make install' I see that it is not installed. So it is likely safe to stick that string in the middle. There is a minor error in the code that writes the serial data out. Line 196 indexes the serial string at 15, when that is the size of the string - needs to be 14. Patch (w/ minor fix) attached. E -- Erik Hovland erik@hovland.org http://hovland.org/
Il giorno sab, 31/01/2009 alle 12.50 -0800, Erik Hovland ha scritto:
On Sat, Jan 31, 2009 at 11:23 AM, elupus <elupus@ecce.se> wrote:
On Wed, 28 Jan 2009 23:25:44 +0100, Nico Sabbi wrote:
[21 quoted lines suppressed]
you broke the API extending an existing function for no reason; you should add a new function and raise the minor number instead.
[1 quoted line suppressed]
Hmm.. No he didn't. dvd_read_name is a static local function.
Right, the only API change is to add the serial getting function.
He should however have added the new dvd_serial property of vm_t at the end, as that would break any app using the vm.h structs, but i'm not sure if that is public or not.
Good question. If the vm.h header is installed, then we have to consider it 'public'. Because, if it is then people can use the functions there to run their own VM. But, by typing 'make install' I see that it is not installed. So it is likely safe to stick that string in the middle. There is a minor error in the code that writes the serial data out. Line 196 indexes the serial string at 15, when that is the size of the string - needs to be 14.
Patch (w/ minor fix) attached.
E
Both right. Thanks for fixing it. Applied. P.S. sorry for the snail-slow feedback; I know that the list is full of patches to review, but I can't dedicate nearly as much time to mplayer and dvdnav as I used to do in the past, unfortunately
P.S. sorry for the snail-slow feedback; I know that the list is full of patches to review, but I can't dedicate nearly as much time to mplayer and dvdnav as I used to do in the past, unfortunately
You are currently moving at about my pace. So no complaints from me. E -- Erik Hovland erik@hovland.org http://hovland.org/
participants (3)
-
elupus -
Erik Hovland -
Nico Sabbi