• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/minidlna/ffmpeg-0.5.1/

Lines Matching defs:oc

59 static AVStream *add_audio_stream(AVFormatContext *oc, int codec_id)
64 st = av_new_stream(oc, 1);
81 static void open_audio(AVFormatContext *oc, AVStream *st)
147 static void write_audio_frame(AVFormatContext *oc, AVStream *st)
166 if (av_interleaved_write_frame(oc, &pkt) != 0) {
172 static void close_audio(AVFormatContext *oc, AVStream *st)
188 static AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
193 st = av_new_stream(oc, 0);
227 if(oc->oformat->flags & AVFMT_GLOBALHEADER)
253 static void open_video(AVFormatContext *oc, AVStream *st)
274 if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
328 static void write_video_frame(AVFormatContext *oc, AVStream *st)
364 if (oc->oformat->flags & AVFMT_RAWPICTURE) {
375 ret = av_interleaved_write_frame(oc, &pkt);
393 ret = av_interleaved_write_frame(oc, &pkt);
405 static void close_video(AVFormatContext *oc, AVStream *st)
424 AVFormatContext *oc;
456 oc = avformat_alloc_context();
457 if (!oc) {
461 oc->oformat = fmt;
462 snprintf(oc->filename, sizeof(oc->filename), "%s", filename);
469 video_st = add_video_stream(oc, fmt->video_codec);
472 audio_st = add_audio_stream(oc, fmt->audio_codec);
477 if (av_set_parameters(oc, NULL) < 0) {
482 dump_format(oc, 0, filename, 1);
487 open_video(oc, video_st);
489 open_audio(oc, audio_st);
493 if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) {
500 av_write_header(oc);
520 write_audio_frame(oc, audio_st);
522 write_video_frame(oc, video_st);
530 av_write_trailer(oc);
534 close_video(oc, video_st);
536 close_audio(oc, audio_st);
539 for(i = 0; i < oc->nb_streams; i++) {
540 av_freep(&oc->streams[i]->codec);
541 av_freep(&oc->streams[i]);
546 url_fclose(oc->pb);
550 av_free(oc);