Mercurial > audlegacy-plugins
comparison src/aac/src/libmp4.c @ 1075:37abd9b3de4b trunk
[svn] - conversion to yaz's style was not needed, just API v2 ;p
author | nenolod |
---|---|
date | Thu, 24 May 2007 15:53:40 -0700 |
parents | c77a0ed314bc |
children | b5a61440bfe8 |
comparison
equal
deleted
inserted
replaced
1074:0847931f52b7 | 1075:37abd9b3de4b |
---|---|
69 }; | 69 }; |
70 | 70 |
71 InputPlugin *mp4_iplist[] = { &mp4_ip, NULL }; | 71 InputPlugin *mp4_iplist[] = { &mp4_ip, NULL }; |
72 | 72 |
73 DECLARE_PLUGIN(mp4, NULL, NULL, mp4_iplist, NULL, NULL, NULL, NULL); | 73 DECLARE_PLUGIN(mp4, NULL, NULL, mp4_iplist, NULL, NULL, NULL, NULL); |
74 | |
75 InputPlugin *mp4_plugin = &mp4_ip; | |
76 | 74 |
77 typedef struct _mp4cfg | 75 typedef struct _mp4cfg |
78 { | 76 { |
79 #define FILE_UNKNOWN 0 | 77 #define FILE_UNKNOWN 0 |
80 #define FILE_MP4 1 | 78 #define FILE_MP4 1 |
558 numSamples = mp4ff_num_samples(mp4file, mp4track); | 556 numSamples = mp4ff_num_samples(mp4file, mp4track); |
559 msDuration = ((float)numSamples * (float)(framesize - 1.0)/(float)samplerate) * 1000; | 557 msDuration = ((float)numSamples * (float)(framesize - 1.0)/(float)samplerate) * 1000; |
560 playback->output->open_audio(FMT_S16_NE, samplerate, channels); | 558 playback->output->open_audio(FMT_S16_NE, samplerate, channels); |
561 playback->output->flush(0); | 559 playback->output->flush(0); |
562 | 560 |
563 mp4_plugin->set_info(xmmstitle, msDuration, | 561 mp4_ip.set_info(xmmstitle, msDuration, |
564 mp4ff_get_avg_bitrate( mp4file, mp4track ), | 562 mp4ff_get_avg_bitrate( mp4file, mp4track ), |
565 samplerate,channels); | 563 samplerate,channels); |
566 | 564 |
567 while ( buffer_playing ) { | 565 while ( buffer_playing ) { |
568 void* sampleBuffer; | 566 void* sampleBuffer; |
736 buffer_playing = FALSE; | 734 buffer_playing = FALSE; |
737 g_static_mutex_unlock(&mutex); | 735 g_static_mutex_unlock(&mutex); |
738 g_thread_exit(NULL); | 736 g_thread_exit(NULL); |
739 } | 737 } |
740 | 738 |
741 mp4_plugin->set_info(xmmstitle, -1, -1, samplerate, channels); | 739 mp4_ip.set_info(xmmstitle, -1, -1, samplerate, channels); |
742 playback->output->flush(0); | 740 playback->output->flush(0); |
743 | 741 |
744 while(buffer_playing && buffervalid > 0 && streambuffer != NULL) | 742 while(buffer_playing && buffervalid > 0 && streambuffer != NULL) |
745 { | 743 { |
746 faacDecFrameInfo finfo; | 744 faacDecFrameInfo finfo; |
774 if (ostmp != NULL) | 772 if (ostmp != NULL) |
775 g_free(ostmp); | 773 g_free(ostmp); |
776 | 774 |
777 ostmp = stemp; | 775 ostmp = stemp; |
778 | 776 |
779 mp4_plugin->set_info(xmmstitle, -1, -1, samplerate, channels); | 777 mp4_ip.set_info(xmmstitle, -1, -1, samplerate, channels); |
780 } | 778 } |
781 } | 779 } |
782 | 780 |
783 g_free(ttemp); | 781 g_free(ttemp); |
784 ttemp = NULL; | 782 ttemp = NULL; |