• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavformat/

Lines Matching defs:oc

63 static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
68 st = av_new_stream(oc, 1);
85 if(oc->oformat->flags & AVFMT_GLOBALHEADER)
91 static void open_audio(AVFormatContext *oc, AVStream *st)
157 static void write_audio_frame(AVFormatContext *oc, AVStream *st)
176 if (av_interleaved_write_frame(oc, &pkt) != 0) {
182 static void close_audio(AVFormatContext *oc, AVStream *st)
198 static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
203 st = avformat_new_stream(oc, NULL);
237 if(oc->oformat->flags & AVFMT_GLOBALHEADER)
263 static void open_video(AVFormatContext *oc, AVStream *st)
284 if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
338 static void write_video_frame(AVFormatContext *oc, AVStream *st)
374 if (oc->oformat->flags & AVFMT_RAWPICTURE) {
385 ret = av_interleaved_write_frame(oc, &pkt);
403 ret = av_interleaved_write_frame(oc, &pkt);
415 static void close_video(AVFormatContext *oc, AVStream *st)
434 AVFormatContext *oc;
466 oc = avformat_alloc_context();
467 if (!oc) {
471 oc->oformat = fmt;
472 snprintf(oc->filename, sizeof(oc->filename), "%s", filename);
479 video_st = add_video_stream(oc, fmt->video_codec);
482 audio_st = add_audio_stream(oc, fmt->audio_codec);
487 if (av_set_parameters(oc, NULL) < 0) {
492 av_dump_format(oc, 0, filename, 1);
497 open_video(oc, video_st);
499 open_audio(oc, audio_st);
503 if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) {
510 av_write_header(oc);
530 write_audio_frame(oc, audio_st);
532 write_video_frame(oc, video_st);
540 av_write_trailer(oc);
544 close_video(oc, video_st);
546 close_audio(oc, audio_st);
549 for(i = 0; i < oc->nb_streams; i++) {
550 av_freep(&oc->streams[i]->codec);
551 av_freep(&oc->streams[i]);
556 avio_close(oc->pb);
560 av_free(oc);