forked from len0rd/rockbox
Change enum codecs in apps/codecs/librm/rm.h to follow the coding guidelines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22067 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5f5d105755
commit
c08a2c7c53
3 changed files with 8 additions and 8 deletions
|
@ -529,7 +529,7 @@ int rm_get_packet(uint8_t **src,RMContext *rmctx, RMPacket *pkt)
|
||||||
|
|
||||||
advance_buffer(src,12);
|
advance_buffer(src,12);
|
||||||
consumed += 12;
|
consumed += 12;
|
||||||
if (rmctx->codec_type == cook) {
|
if (rmctx->codec_type == CODEC_COOK) {
|
||||||
for(x = 0 ; x < w/sps; x++)
|
for(x = 0 ; x < w/sps; x++)
|
||||||
{
|
{
|
||||||
place = sps*(h*x+((h+1)/2)*(y&1)+(y>>1));
|
place = sps*(h*x+((h+1)/2)*(y&1)+(y>>1));
|
||||||
|
@ -538,7 +538,7 @@ int rm_get_packet(uint8_t **src,RMContext *rmctx, RMPacket *pkt)
|
||||||
consumed += sps;
|
consumed += sps;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (rmctx->codec_type == aac) {
|
else if (rmctx->codec_type == CODEC_AAC) {
|
||||||
rmctx->sub_packet_cnt = (get_uint16be(*src) & 0xf0) >> 4;
|
rmctx->sub_packet_cnt = (get_uint16be(*src) & 0xf0) >> 4;
|
||||||
advance_buffer(src, 2);
|
advance_buffer(src, 2);
|
||||||
consumed += 2;
|
consumed += 2;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#define MAX_EXTRADATA_SIZE 16
|
#define MAX_EXTRADATA_SIZE 16
|
||||||
|
|
||||||
enum codecs{cook, aac};
|
enum codecs{CODEC_COOK, CODEC_AAC};
|
||||||
typedef struct rm_packet
|
typedef struct rm_packet
|
||||||
{
|
{
|
||||||
uint8_t *frames[100]; /* Pointers to ordered audio frames in buffer */
|
uint8_t *frames[100]; /* Pointers to ordered audio frames in buffer */
|
||||||
|
|
|
@ -166,12 +166,12 @@ static inline int real_read_audio_stream_info(int fd, RMContext *rmctx)
|
||||||
skipped += rmctx->extradata_size;
|
skipped += rmctx->extradata_size;
|
||||||
switch(fourcc) {
|
switch(fourcc) {
|
||||||
case FOURCC('c','o','o','k'):
|
case FOURCC('c','o','o','k'):
|
||||||
rmctx->codec_type = cook;
|
rmctx->codec_type = CODEC_COOK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FOURCC('r','a','a','c'):
|
case FOURCC('r','a','a','c'):
|
||||||
case FOURCC('r','a','c','p'):
|
case FOURCC('r','a','c','p'):
|
||||||
rmctx->codec_type = aac;
|
rmctx->codec_type = CODEC_AAC;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Not a supported codec */
|
default: /* Not a supported codec */
|
||||||
|
@ -188,7 +188,7 @@ static inline int real_read_audio_stream_info(int fd, RMContext *rmctx)
|
||||||
DEBUGF(" fourcc = %s\n",fourcc2str(fourcc));
|
DEBUGF(" fourcc = %s\n",fourcc2str(fourcc));
|
||||||
DEBUGF(" codec_extra_data_length = %ld\n",rmctx->extradata_size);
|
DEBUGF(" codec_extra_data_length = %ld\n",rmctx->extradata_size);
|
||||||
DEBUGF(" codec_extradata :\n");
|
DEBUGF(" codec_extradata :\n");
|
||||||
if(rmctx->codec_type == cook) {
|
if(rmctx->codec_type == CODEC_COOK) {
|
||||||
DEBUGF(" cook_extradata :\n");
|
DEBUGF(" cook_extradata :\n");
|
||||||
print_cook_extradata(rmctx);
|
print_cook_extradata(rmctx);
|
||||||
}
|
}
|
||||||
|
@ -401,10 +401,10 @@ bool get_rm_metadata(int fd, struct mp3entry* id3)
|
||||||
|
|
||||||
switch(rmctx->codec_type)
|
switch(rmctx->codec_type)
|
||||||
{
|
{
|
||||||
case cook:
|
case CODEC_COOK:
|
||||||
/* Already set, do nothing */
|
/* Already set, do nothing */
|
||||||
break;
|
break;
|
||||||
case aac:
|
case CODEC_AAC:
|
||||||
id3->codectype = AFMT_RM_AAC;
|
id3->codectype = AFMT_RM_AAC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue