IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
How to open ALAC packet_decoder?
nu774
post May 12 2014, 07:05
Post #1





Group: Developer
Posts: 522
Joined: 22-November 10
From: Japan
Member No.: 85902



Since ALAC in Matroska doesn't seem to be currently supported , I just tried to create quite a simple bridge plugin that just forwards A-ALAC setup from Matroska owner to ALAC packet decoder.
So I tried packet_decoder::g_open() with owner_MP4_ALAC. However, other parameters for it is not documented in packet_decoder.h and I couldn't successfully open it. How those params will be?
I tried the following:
p_param1: 0
p_param2: pointer to a buffer containing ALACSpecificConfig, described in ALACMagicCookieDescription.txt in reference encoder source. ALACSpecificConfig is used by Matroska as codec private data.
p_param2size: sizeof ALACSpecificConfig (24 or 48).

Also, I'd like to see complete lists of standard packet decoders and parameter spec for them, if there is any.

This post has been edited by nu774: May 12 2014, 07:40
Go to the top of the page
+Quote Post
nu774
post May 13 2014, 00:52
Post #2





Group: Developer
Posts: 522
Joined: 22-November 10
From: Japan
Member No.: 85902



OK, I found it out. ALAC packet decoder requires additional 4 byte header before ALACSpecificConfig, that stands for version+flags inside of alac box in M4A container (so it requires whole content of alac box).
This is somewhat silly since it should be quite easy to add support for Matroska owner to the existing ALAC packet decoder, but as a proof of concept (and for my fun), I created it anyway.

Source:
https://github.com/nu774/foo_input_matroska_alac
Binary download:
https://github.com/nu774/foo_input_matroska_alac/releases
Go to the top of the page
+Quote Post
mudlord
post May 14 2014, 02:43
Post #3





Group: Developer (Donating)
Posts: 806
Joined: 1-December 07
Member No.: 49165



I am amazed something simple like this packet decoder isnt in FB2K natively.
Go to the top of the page
+Quote Post
nu774
post May 14 2014, 02:58
Post #4





Group: Developer
Posts: 522
Joined: 22-November 10
From: Japan
Member No.: 85902



This is already simple enough, but things would be simpler if it were implemented in built-in ALAC packet decoder itself.
I guess a few lines of additions to g_is_our_setup() and open() is enough in that case.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th August 2014 - 12:49