Hi All
With the MP4 Parser, I've just found myself writing a piece of code for
the third time, to turn the number of channels as an Int into the XMPDM
channel type strings (mono, stereo, 5.1 etc).
What I'm not sure on is where the best place is to put that code so it can
be re-used? Options
Hi,
On Mon, Jan 30, 2012 at 3:40 PM, Nick Burch wrote:
> What do people think is the best way to handle this sort of thing?
I'd go with XMPDM, as that's already a dependency of the described
piece of code.
BR,
Jukka Zitting
On Mon, 30 Jan 2012, Jukka Zitting wrote:
On Mon, Jan 30, 2012 at 3:40 PM, Nick Burch wrote:
What do people think is the best way to handle this sort of thing?
I'd go with XMPDM, as that's already a dependency of the described
piece of code.
OK. Any thoughts on how it should work? The two t
Hi,
On Mon, Jan 30, 2012 at 3:59 PM, Nick Burch wrote:
> OK. Any thoughts on how it should work? The two things that spring to mind
> are:
> String toAudioChannelType(int numberOfChannels)
> void setAudioChannelType(int numberOfChannels, Metadata metadata)
>
> Do you think we should be buildi
On Mon, 30 Jan 2012, Jukka Zitting wrote:
What we might also consider as an extra convenience, are Metadata
methods like:
int getNumberOfAudioChannels();
void getNumberOfAudioChannels(int channels);
and
String getAudioChannelType();
void setAudioChannelType(String type);
based on
Hi,
On Mon, Jan 30, 2012 at 4:20 PM, Nick Burch wrote:
> On Mon, 30 Jan 2012, Jukka Zitting wrote:
>> What we might also consider as an extra convenience, are Metadata methods
>> like: [...]
>
> If we're doing that sort of thing, then I'd rather we put the logic onto the
> Property for that. The
I personally like Nick's 3rd idea: Extending the Property class to support a
converter.
Even in the case described here the Metadata property setters could be modified
to something like:
public void set(Property property, int value) {
if(property.getPropertyType() != Property.PropertyTy
On Mon, 30 Jan 2012, Jukka Zitting wrote:
If we're doing that sort of thing, then I'd rather we put the logic
onto the Property for that. The Property already has a type and the
closed list of allowed values (as Strings, from the XMPDM
specification). It would seem to me that the logic for goin