Libav
|
libavformat API example. More...
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "libavutil/mathematics.h"
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
Go to the source code of this file.
Macros | |
#define | STREAM_DURATION 5.0 |
#define | STREAM_FRAME_RATE 25 /* 25 images/s */ |
#define | STREAM_NB_FRAMES ((int)(STREAM_DURATION * STREAM_FRAME_RATE)) |
#define | STREAM_PIX_FMT AV_PIX_FMT_YUV420P /* default pix_fmt */ |
Functions | |
static AVStream * | add_audio_stream (AVFormatContext *oc, enum AVCodecID codec_id) |
static void | open_audio (AVFormatContext *oc, AVStream *st) |
static void | get_audio_frame (int16_t *samples, int frame_size, int nb_channels) |
static void | write_audio_frame (AVFormatContext *oc, AVStream *st) |
static void | close_audio (AVFormatContext *oc, AVStream *st) |
static AVStream * | add_video_stream (AVFormatContext *oc, enum AVCodecID codec_id) |
static AVFrame * | alloc_picture (enum AVPixelFormat pix_fmt, int width, int height) |
static void | open_video (AVFormatContext *oc, AVStream *st) |
static void | fill_yuv_image (AVFrame *pict, int frame_index, int width, int height) |
static void | write_video_frame (AVFormatContext *oc, AVStream *st) |
static void | close_video (AVFormatContext *oc, AVStream *st) |
int | main (int argc, char **argv) |
Variables | |
static int | sws_flags = SWS_BICUBIC |
static float | t |
static float | tincr |
static float | tincr2 |
static int16_t * | samples |
static int | audio_input_frame_size |
static AVFrame * | picture |
static AVFrame * | tmp_picture |
static int | frame_count |
libavformat API example.
Definition in file output.c.
#define STREAM_FRAME_RATE 25 /* 25 images/s */ |
Definition at line 43 of file output.c.
Referenced by add_video_stream().
#define STREAM_NB_FRAMES ((int)(STREAM_DURATION * STREAM_FRAME_RATE)) |
Definition at line 44 of file output.c.
Referenced by write_video_frame().
#define STREAM_PIX_FMT AV_PIX_FMT_YUV420P /* default pix_fmt */ |
Definition at line 45 of file output.c.
Referenced by add_video_stream().
|
static |
|
static |
|
static |
Definition at line 122 of file output.c.
Referenced by write_audio_frame().
|
static |
|
static |
|
static |
|
static |
Definition at line 234 of file output.c.
Referenced by open_video().
|
static |
Definition at line 287 of file output.c.
Referenced by write_video_frame().
|
static |
|
static |
|
static |
Definition at line 47 of file output.c.
Referenced by write_video_frame().
|
static |
Definition at line 52 of file output.c.
Referenced by adpcm_compress_trellis(), alaw2linear(), amf_tag_contents(), asf_write_markers(), assert_avoptions(), audio_encode_example(), av_aes_init(), av_dict_copy(), av_gettime(), av_opt_set_dict(), av_parse_time(), av_timegm(), av_tree_insert(), avi_write_header(), bessel(), block_cmp(), bmp_decode_frame(), body(), butterflies_float_c(), crazytime_to_iso8601(), dca_downmix(), decode_555(), decode_band(), decode_block(), decode_cce(), decode_channel(), decode_dct(), decode_end(), decode_frame(), decode_group3_1d_line(), decode_group3_2d_line(), decode_run_2bit(), decode_thread(), dv_init_mux(), dwt_decode97_float(), dwt_decode97_int(), encode_block(), encode_picture_ls(), estimate_sid_gain(), ff_amf_tag_size(), ff_atrac3p_ipqf(), ff_id3v2_write_metadata(), ff_jpeg2000_tag_tree_init(), ff_jpegls_decode_picture(), ff_mjpeg_find_marker(), ff_riff_write_info(), ff_vorbis_comment(), ff_vp6_filter_diag4_c(), ff_yuv2rgb_get_func_ptr(), filetime_to_iso8601(), filter_codec_opts(), flv_read_packet(), generate_noise(), get_audio_frame(), get_chroma_qp(), get_date_tag(), get_dimension(), get_generic_seed(), get_scale_idx(), gxf_write_umf_material_description(), handle_invoke_status(), handle_ping(), hpel_motion_search(), idct32(), idx_to_quant(), ir2_decode_plane(), ir2_decode_plane_inter(), ivi_free_buffers(), mask_edges(), merge_date(), mid_pred(), mkv_write_attachments(), mkv_write_chapters(), mkv_write_tag(), mov_create_chapter_track(), mov_read_mac_string(), mov_write_3gp_udta_tag(), mov_write_chpl_tag(), mov_write_header(), mov_write_string_metadata(), mov_write_trkn_tag(), mpc7_decode_frame(), mpc8_decode_frame(), mpc8_parse_seektable(), mss4_decode_dct(), mxf_compute_index_tables(), mxf_read_packet(), mxf_read_packet_old(), mxf_read_seek(), mxf_set_current_edit_unit(), mxf_write_header(), nsv_parse_NSVs_header(), ogm_dshow_header(), oledate_to_iso8601(), open_audio(), open_input_file(), parse_forced_key_frames(), pcm_dvd_decode_samples(), pow_m1_4(), print_report(), qpel_motion_search(), quantize_and_encode_band_cost_template(), read_block_types(), read_colors(), read_dct_coeffs(), read_motion_values(), read_patterns(), read_runs(), read_time(), read_tree(), revert_channel_correlation(), rv34_decode_cbp(), rv34_decode_inter_mb_header(), rv34_decode_intra_mb_header(), rv40_strong_loop_filter(), rv40_weak_loop_filter(), sad_hpel_motion_search(), scalarproduct_int16_altivec(), search_for_quantizers_anmr(), search_for_quantizers_faac(), sha1_transform(), sipr_decode_lp(), smacker_decode_bigtree(), smacker_read_packet(), smjpeg_write_header(), stream_component_open(), tak_parse(), tm2_low_chroma(), tqi_decode_init(), truespeech_apply_twopoint_filter(), truespeech_place_pulses(), truespeech_synth(), ulaw2linear(), ulti_grad(), unix_to_file_time(), vb_decode_framedata(), vorbis_parse_setup_hdr_codebooks(), vp56_deblock_filter(), vp5_adjust(), wavpack_decode_block(), write_chapter(), write_globalinfo(), write_tags(), ws_snd_decode_frame(), wv_get_value(), wv_unpack_mono(), wv_unpack_stereo(), x8_ac_compensation(), x8_get_ac_rlf(), x8_loop_filter(), and xa_decode().
|
static |
Definition at line 52 of file output.c.
Referenced by audio_encode_example(), get_audio_frame(), and open_audio().
|
static |
Definition at line 52 of file output.c.
Referenced by get_audio_frame(), and open_audio().
|
static |
Definition at line 53 of file output.c.
Referenced by aac_decode_er_frame(), aac_decode_frame_int(), aac_encode_frame(), adpcm_decode_frame(), adpcm_encode_frame(), adx_decode_frame(), adx_encode_frame(), alac_entropy_coder(), alac_linear_predictor(), amr_wb_encode_frame(), apply_window_and_mdct(), audio_encode_example(), avisynth_read_packet_audio(), cinaudio_decode_frame(), close_audio(), cng_encode_frame(), cook_decode_frame(), decode_residuals(), encode_frame(), Faac_encode_frame(), ff_mpa_synth_filter(), flac_decorrelate_indep_c(), flac_decorrelate_ls_c(), flac_decorrelate_ms_c(), flac_decorrelate_rs_c(), frame_list_remove_samples(), g722_encode_frame(), get_audio_frame(), get_packet_header(), gsm_decode_frame(), libgsm_decode_frame(), libgsm_encode_frame(), mace_decode_frame(), matroska_parse_wavpack(), mov_build_index(), MPA_encode_frame(), mxf_write_d10_audio_packet(), oggvorbis_encode_frame(), open_audio(), pcm_bluray_decode_frame(), pcm_decode_frame(), pcm_dvd_decode_samples(), pcm_encode_frame(), postfilter(), r3d_read_reda(), ra144_decode_frame(), ra144_encode_frame(), rematrix_channels(), residue_encode(), sipr_decode_frame(), smka_decode_frame(), synth_superframe(), synthfilt_build_sb_samples(), tak_decode_frame(), truespeech_decode_frame(), tta_decode_frame(), update_md5_sum(), vorbis_encode_frame(), wma_decode_superframe(), write_audio_frame(), write_element(), ws_snd_decode_frame(), wv_unpack_mono(), and wv_unpack_stereo().
|
static |
Definition at line 54 of file output.c.
Referenced by open_audio(), and write_audio_frame().
|
static |
Definition at line 179 of file output.c.
Referenced by alloc_picture(), avs_decode_frame(), decode_frame(), dnxhd_decode_frame(), gif_decode_frame(), ir2_decode_frame(), jpeg2000_decode_frame(), libopenjpeg_decode_frame(), mpeg_decode_frame(), raw_decode(), update_frame_pool(), video_decode_example(), video_encode_example(), and vp8_decode().
|
static |
Definition at line 180 of file output.c.
Referenced by rl2_read_header(), write_video_frame(), and yop_read_seek().