When I include this big block of C code in my app, it triggers a Linker
bug that creates an elf that is 4gb in size.
The compile options are...
-Wall -mlittle-endian -mcpu=arm9 -fno-strict-aliasing -mapcs-frame
-fno-builtin -ffunction-sections -fshort-enums -Os -finline-functions
-funit-at-a-time -fmerge-all-constants -DNDEBUG -DDYNAMIC_APP -DBREW
The linker options are....
--emit-relocs --no-warn-mismatch -Os --discard-all -nostdlib
The code is ....
static const char* dbgCmdMsg[ 5 ] =
{
"MM_CMD_SETMEDIAPARAM", /* MM_CMD_SETMEDIAPARM */
"MM_CMD_GETMEDIAPARAM", /* MM_CMD_GETMEDIAPARM */
"MM_CMD_PLAY", /* MM_CMD_PLAY */
"MM_CMD_RECORD", /* MM_CMD_RECORD */
"MM_CMD_GETTOTALTIME" /* MM_CMD_GETTOTALTIME */
};
static const char* dbgStatusMsg[ 20 ] =
{
"CMD_SUCCESSFUL",
"MM_STATUS_START", /* MM_STATUS_START */
"MM_STATUS_DONE", /* MM_STATUS_DONE */
"MM_STATUS_ABORT", /* MM_STATUS_ABORT */
"MM_STATUS_MEDIA_SPEC", /* MM_STATUS_MEDIA_SPEC */
"MM_STATUS_TICK_UPDATE", /* MM_STATUS_TICK_UPDATE */
"MM_STATUS_DATA_IO_DELAY", /* MM_STATUS_DATA_IO_DELAY */
"MM_STATUS_SEEK", /* MM_STATUS_SEEK */
"MM_STATUS_SEEK_FAIL", /* MM_STATUS_SEEK_FAIL */
"MM_STATUS_PAUSE", /* MM_STATUS_PAUSE */
"MM_STATUS_PAUSE_FAIL", /* MM_STATUS_PAUSE_FAIL */
"MM_STATUS_RESUME", /* MM_STATUS_RESUME */
"MM_STATUS_RESUME_FAIL", /* MM_STATUS_RESUME_FAIL */
"MM_STATUS_REPEAT", /* MM_STATUS_REPEAT */
"MM_STATUS_SPACE_WARNING" , /* MM_STATUS_SPACE_WARNING */
"MM_STATUS_SPACE_ERROR", /* MM_STATUS_SPACE_ERROR */
"MM_STATUS_UNKNOWN", /* MM_STATUS_UNKNOWN */
"MM_STATUS_FRAME", /* MM_STATUS_FRAME */
"MM_STATUS_SYNC", /* MM_STATUS_SYNC */
"MM_STATUS_AUDIOSYNC" /* MM_STATUS_AUDIOSYNC */
};
static const char* dbgAdvStatusMsg[ 41 ] =
{
"MM_MP4_STATUS_3GPP_TTEXT", /* Next 3GPP Timed Text is
READY to display */
"MM_MP4_STATUS_TELOP_TEXT", /* Next Telop Text is READY to
display */
"MM_MP4_STATUS_BUFFER_UPDATE", /* indicate Buffering */
"MM_MP4_STATUS_CONNECTION_UPDATE", /* streaming Setup in
progress indication */
"MM_MP4_STATUS_PB_READY", /* indicate moving to Playback
Ready State */
"MM_MP4_STATUS_OPEN_COMPLETE", /* indicate open file
complete */
"MM_MP4_STATUS_NO_SYNC_FRAME", /* no sync frame error (seek
may fail) */
"MM_MP4_STATUS_RTSP", /* RTSP status code */
"MM_MP4_STATUS_RESTARTING_VIDEO", /* restarting video in loop
mode */
"MM_MP4_STATUS_RESTARTING_AUDIO", /* restarting audio in loop
mode */
"MM_MP4_STATUS_RESTARTING_TEXT", /* restarting text in loop
mode */
"MM_MP4_STATUS_PS_BUFFER_UPDATE", /* pseudo stream is in
buffering state */
"MM_MP4_STATUS_UNHANDLED_SDP", /* unhandled sdp line */
"MM_MP4_STATUS_UNHANDLED_RTSP", /* unhandled rtsp header */
"MM_MP4_STATUS_AUDIO_ABORT", /* Error in audio track */
"MM_MP4_STATUS_VIDEO_ABORT", /* Error in video track */
"MM_MP4_STATUS_MIDI_AVAILABLE", /* MIDI data is available for
user */
"MM_MP4_STATUS_PLAYING", /* Qtv is playing after
reposition or start of play */
"MM_MP4_STATUS_FILE_SYS_LIMIT", /* File sys limit is
approaching during stream recording */
"MM_MP4_STATUS_FILE_SYS_FULL", /* File sys is FULL */
"MM_MP4_STATUS_FILE_ALREADY_EXISTS", /* File already Exists,
Cannot overwrite */
"MM_MP4_STATUS_FILE_OW_FAILURE", /* Failed to overwrite a file
*/
"MM_MP4_STATUS_RECORDER_FAILED", /* Stream recorder failed */
"MM_MP4_STATUS_RECORD_COMPLETED", /* Stream record completed
*/
"MM_MP4_STATUS_VIDEO_MEDIA_END", /* video media ends, but
still video maybe playing */
"MM_MP4_STATUS_AUDIO_MEDIA_END", /* audio media ends, but
still audio maybe playing */
"MM_MP4_STATUS_TEXT_MEDIA_END", /* text media ends, but still
text maybe playing */
"MM_MP4_STATUS_PSEUDO_PAUSE", /* While Pseudo Streaming not
enough data so PSEUDO PAUSE */
"MM_MP4_STATUS_PSEUDO_RESUME", /* While Pseudo Streaming
enough data to resume */
"MM_MP4_STATUS_HTTP_PAUSE", /* While HTTP Streaming not
enough data so HTTP PAUSE */
"MM_MP4_STATUS_HTTP_RESUME", /* While HTTP Streaming enough
data to resume */
"MM_MP4_STATUS_RECORDED_CLIP_DURATION", /* gives recorded clip
duration, record_duration = *((uint32 *)pCmdNotify->pCmdData) */
"MM_MP4_STATUS_TS_LAYER_PRESENT", /* Add for dectection of TS
LAYER */
"MM_MP4_STATUS_VIDEO_RESOLUTION_NOT_SUPPORTED",/* video resolution
not supported */
"MM_MP4_STATUS_INFO", /* Status information passed the
app */
"MM_MP4_STATUS_DL_STOPPED", /* HTTP Download stopped */
"MM_MP4_STATUS_DL_COMPLETE", /* HTTP Downloading completed
*/
"MM_MP4_STATUS_DL_DATA_AVAILABLE", /* Downloaded Data
available */
"MM_MP4_STATUS_PLAYLIST_CLIP_TRANSITION", /* Clip transition */
"MM_MP4_STATUS_PLAYLIST_SKIP_COMPLETE", /* Succeeded in skipping
to a different clip */
"MM_MP4_STATUS_PLAYLIST_SKIP_FAILED" /* Failed to skip to a
different clip */
};