Lines Matching refs:encoder
358 static gboolean gst_vpx_enc_start (GstVideoEncoder * encoder);
359 static gboolean gst_vpx_enc_stop (GstVideoEncoder * encoder);
369 static gboolean gst_vpx_enc_propose_allocation (GstVideoEncoder * encoder,
371 static gboolean gst_vpx_enc_transform_meta (GstVideoEncoder * encoder,
872 gst_vpx_enc_set_auto_bitrate (GstVPXEnc * encoder) in gst_vpx_enc_set_auto_bitrate() argument
874 if (encoder->input_state != NULL) { in gst_vpx_enc_set_auto_bitrate()
880 if (GST_VIDEO_INFO_FPS_N (&encoder->input_state->info) != 0) { in gst_vpx_enc_set_auto_bitrate()
881 fps_n = GST_VIDEO_INFO_FPS_N (&encoder->input_state->info); in gst_vpx_enc_set_auto_bitrate()
882 fps_d = GST_VIDEO_INFO_FPS_D (&encoder->input_state->info); in gst_vpx_enc_set_auto_bitrate()
890 GST_VIDEO_INFO_WIDTH (&encoder->input_state->info) * in gst_vpx_enc_set_auto_bitrate()
891 GST_VIDEO_INFO_HEIGHT (&encoder->input_state->info); in gst_vpx_enc_set_auto_bitrate()
893 target_bitrate = pixels_per_sec * encoder->bits_per_pixel; in gst_vpx_enc_set_auto_bitrate()
895 GST_DEBUG_OBJECT (encoder, in gst_vpx_enc_set_auto_bitrate()
897 GST_VIDEO_INFO_WIDTH (&encoder->input_state->info), in gst_vpx_enc_set_auto_bitrate()
898 GST_VIDEO_INFO_HEIGHT (&encoder->input_state->info), in gst_vpx_enc_set_auto_bitrate()
899 GST_VIDEO_INFO_FPS_N (&encoder->input_state->info), in gst_vpx_enc_set_auto_bitrate()
900 GST_VIDEO_INFO_FPS_D (&encoder->input_state->info), in gst_vpx_enc_set_auto_bitrate()
901 encoder->bits_per_pixel, target_bitrate); in gst_vpx_enc_set_auto_bitrate()
903 encoder->cfg.rc_target_bitrate = target_bitrate / 1000; in gst_vpx_enc_set_auto_bitrate()
1142 vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_SCALEMODE, &sm); in gst_vpx_enc_set_property()
1159 vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_SCALEMODE, &sm); in gst_vpx_enc_set_property()
1171 vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_CPUUSED, in gst_vpx_enc_set_property()
1183 vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_ENABLEAUTOALTREF, in gst_vpx_enc_set_property()
1196 vpx_codec_control (&gst_vpx_enc->encoder, in gst_vpx_enc_set_property()
1208 status = vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_SHARPNESS, in gst_vpx_enc_set_property()
1221 vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_STATIC_THRESHOLD, in gst_vpx_enc_set_property()
1234 vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_TOKEN_PARTITIONS, in gst_vpx_enc_set_property()
1247 vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_ARNR_MAXFRAMES, in gst_vpx_enc_set_property()
1260 vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_ARNR_STRENGTH, in gst_vpx_enc_set_property()
1277 status = vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_TUNING, in gst_vpx_enc_set_property()
1288 status = vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_CQ_LEVEL, in gst_vpx_enc_set_property()
1301 vpx_codec_control (&gst_vpx_enc->encoder, in gst_vpx_enc_set_property()
1327 vpx_codec_enc_config_set (&gst_vpx_enc->encoder, &gst_vpx_enc->cfg); in gst_vpx_enc_set_property()
1582 GstVPXEnc *encoder = GST_VPX_ENC (video_encoder); in gst_vpx_enc_start() local
1586 if (!encoder->have_default_config) { in gst_vpx_enc_start()
1587 GST_ELEMENT_ERROR (encoder, LIBRARY, INIT, in gst_vpx_enc_start()
1596 gst_vpx_enc_destroy_encoder (GstVPXEnc * encoder) in gst_vpx_enc_destroy_encoder() argument
1598 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_destroy_encoder()
1599 if (encoder->inited) { in gst_vpx_enc_destroy_encoder()
1600 vpx_codec_destroy (&encoder->encoder); in gst_vpx_enc_destroy_encoder()
1601 encoder->inited = FALSE; in gst_vpx_enc_destroy_encoder()
1604 if (encoder->first_pass_cache_content) { in gst_vpx_enc_destroy_encoder()
1605 g_byte_array_free (encoder->first_pass_cache_content, TRUE); in gst_vpx_enc_destroy_encoder()
1606 encoder->first_pass_cache_content = NULL; in gst_vpx_enc_destroy_encoder()
1609 if (encoder->cfg.rc_twopass_stats_in.buf) { in gst_vpx_enc_destroy_encoder()
1610 g_free (encoder->cfg.rc_twopass_stats_in.buf); in gst_vpx_enc_destroy_encoder()
1611 encoder->cfg.rc_twopass_stats_in.buf = NULL; in gst_vpx_enc_destroy_encoder()
1612 encoder->cfg.rc_twopass_stats_in.sz = 0; in gst_vpx_enc_destroy_encoder()
1614 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_destroy_encoder()
1620 GstVPXEnc *encoder; in gst_vpx_enc_stop() local
1624 encoder = GST_VPX_ENC (video_encoder); in gst_vpx_enc_stop()
1626 gst_vpx_enc_destroy_encoder (encoder); in gst_vpx_enc_stop()
1628 gst_tag_setter_reset_tags (GST_TAG_SETTER (encoder)); in gst_vpx_enc_stop()
1630 g_free (encoder->multipass_cache_file); in gst_vpx_enc_stop()
1631 encoder->multipass_cache_file = NULL; in gst_vpx_enc_stop()
1632 encoder->multipass_cache_idx = 0; in gst_vpx_enc_stop()
1653 gst_vpx_enc_get_downstream_profile (GstVPXEnc * encoder, GstVideoInfo * info) in gst_vpx_enc_get_downstream_profile() argument
1674 allowed = gst_pad_get_allowed_caps (GST_VIDEO_ENCODER_SRC_PAD (encoder)); in gst_vpx_enc_get_downstream_profile()
1700 GST_DEBUG_OBJECT (encoder, in gst_vpx_enc_get_downstream_profile()
1708 GST_DEBUG_OBJECT (encoder, "Using profile %d", profile); in gst_vpx_enc_get_downstream_profile()
1717 GstVPXEnc *encoder; in gst_vpx_enc_set_format() local
1728 encoder = GST_VPX_ENC (video_encoder); in gst_vpx_enc_set_format()
1729 vpx_enc_class = GST_VPX_ENC_GET_CLASS (encoder); in gst_vpx_enc_set_format()
1732 if (encoder->inited) { in gst_vpx_enc_set_format()
1734 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_set_format()
1735 vpx_codec_destroy (&encoder->encoder); in gst_vpx_enc_set_format()
1736 encoder->inited = FALSE; in gst_vpx_enc_set_format()
1737 encoder->multipass_cache_idx++; in gst_vpx_enc_set_format()
1739 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_set_format()
1742 encoder->cfg.g_bit_depth = encoder->cfg.g_input_bit_depth = info->finfo->bits; in gst_vpx_enc_set_format()
1743 if (encoder->cfg.g_bit_depth > 8) { in gst_vpx_enc_set_format()
1747 encoder->cfg.g_profile = gst_vpx_enc_get_downstream_profile (encoder, info); in gst_vpx_enc_set_format()
1748 if (encoder->cfg.g_profile == INVALID_PROFILE) { in gst_vpx_enc_set_format()
1749 GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, in gst_vpx_enc_set_format()
1751 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_set_format()
1755 encoder->cfg.g_w = GST_VIDEO_INFO_WIDTH (info); in gst_vpx_enc_set_format()
1756 encoder->cfg.g_h = GST_VIDEO_INFO_HEIGHT (info); in gst_vpx_enc_set_format()
1758 if (encoder->timebase_n != 0 && encoder->timebase_d != 0) { in gst_vpx_enc_set_format()
1760 encoder->cfg.g_timebase.num = encoder->timebase_n; in gst_vpx_enc_set_format()
1761 encoder->cfg.g_timebase.den = encoder->timebase_d; in gst_vpx_enc_set_format()
1768 encoder->cfg.g_timebase.num = 1; in gst_vpx_enc_set_format()
1769 encoder->cfg.g_timebase.den = 90000; in gst_vpx_enc_set_format()
1772 if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS || in gst_vpx_enc_set_format()
1773 encoder->cfg.g_pass == VPX_RC_LAST_PASS) { in gst_vpx_enc_set_format()
1774 if (!encoder->multipass_cache_prefix) { in gst_vpx_enc_set_format()
1775 GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, in gst_vpx_enc_set_format()
1777 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_set_format()
1781 g_free (encoder->multipass_cache_file); in gst_vpx_enc_set_format()
1783 if (encoder->multipass_cache_idx > 0) in gst_vpx_enc_set_format()
1784 encoder->multipass_cache_file = g_strdup_printf ("%s.%u", in gst_vpx_enc_set_format()
1785 encoder->multipass_cache_prefix, encoder->multipass_cache_idx); in gst_vpx_enc_set_format()
1787 encoder->multipass_cache_file = in gst_vpx_enc_set_format()
1788 g_strdup (encoder->multipass_cache_prefix); in gst_vpx_enc_set_format()
1791 if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { in gst_vpx_enc_set_format()
1792 if (encoder->first_pass_cache_content != NULL) in gst_vpx_enc_set_format()
1793 g_byte_array_free (encoder->first_pass_cache_content, TRUE); in gst_vpx_enc_set_format()
1795 encoder->first_pass_cache_content = g_byte_array_sized_new (4096); in gst_vpx_enc_set_format()
1797 } else if (encoder->cfg.g_pass == VPX_RC_LAST_PASS) { in gst_vpx_enc_set_format()
1800 if (encoder->cfg.rc_twopass_stats_in.buf != NULL) { in gst_vpx_enc_set_format()
1801 g_free (encoder->cfg.rc_twopass_stats_in.buf); in gst_vpx_enc_set_format()
1802 encoder->cfg.rc_twopass_stats_in.buf = NULL; in gst_vpx_enc_set_format()
1803 encoder->cfg.rc_twopass_stats_in.sz = 0; in gst_vpx_enc_set_format()
1806 if (!g_file_get_contents (encoder->multipass_cache_file, in gst_vpx_enc_set_format()
1807 (gchar **) & encoder->cfg.rc_twopass_stats_in.buf, in gst_vpx_enc_set_format()
1808 &encoder->cfg.rc_twopass_stats_in.sz, &err)) { in gst_vpx_enc_set_format()
1809 GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, in gst_vpx_enc_set_format()
1813 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_set_format()
1819 vpx_codec_enc_init (&encoder->encoder, vpx_enc_class->get_algo (encoder), in gst_vpx_enc_set_format()
1820 &encoder->cfg, flags); in gst_vpx_enc_set_format()
1822 GST_ELEMENT_ERROR (encoder, LIBRARY, INIT, in gst_vpx_enc_set_format()
1824 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_set_format()
1828 if (vpx_enc_class->enable_scaling (encoder)) { in gst_vpx_enc_set_format()
1831 sm.h_scaling_mode = encoder->h_scaling_mode; in gst_vpx_enc_set_format()
1832 sm.v_scaling_mode = encoder->v_scaling_mode; in gst_vpx_enc_set_format()
1834 status = vpx_codec_control (&encoder->encoder, VP8E_SET_SCALEMODE, &sm); in gst_vpx_enc_set_format()
1836 GST_WARNING_OBJECT (encoder, "Failed to set VP8E_SET_SCALEMODE: %s", in gst_vpx_enc_set_format()
1842 vpx_codec_control (&encoder->encoder, VP8E_SET_CPUUSED, in gst_vpx_enc_set_format()
1843 encoder->cpu_used); in gst_vpx_enc_set_format()
1845 GST_WARNING_OBJECT (encoder, "Failed to set VP8E_SET_CPUUSED: %s", in gst_vpx_enc_set_format()
1850 vpx_codec_control (&encoder->encoder, VP8E_SET_ENABLEAUTOALTREF, in gst_vpx_enc_set_format()
1851 (encoder->enable_auto_alt_ref ? 1 : 0)); in gst_vpx_enc_set_format()
1853 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1857 status = vpx_codec_control (&encoder->encoder, VP8E_SET_NOISE_SENSITIVITY, in gst_vpx_enc_set_format()
1858 encoder->noise_sensitivity); in gst_vpx_enc_set_format()
1860 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1864 status = vpx_codec_control (&encoder->encoder, VP8E_SET_SHARPNESS, in gst_vpx_enc_set_format()
1865 encoder->sharpness); in gst_vpx_enc_set_format()
1867 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1870 status = vpx_codec_control (&encoder->encoder, VP8E_SET_STATIC_THRESHOLD, in gst_vpx_enc_set_format()
1871 encoder->static_threshold); in gst_vpx_enc_set_format()
1873 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1877 status = vpx_codec_control (&encoder->encoder, VP8E_SET_TOKEN_PARTITIONS, in gst_vpx_enc_set_format()
1878 encoder->token_partitions); in gst_vpx_enc_set_format()
1880 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1884 status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_MAXFRAMES, in gst_vpx_enc_set_format()
1885 encoder->arnr_maxframes); in gst_vpx_enc_set_format()
1887 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1891 status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_STRENGTH, in gst_vpx_enc_set_format()
1892 encoder->arnr_strength); in gst_vpx_enc_set_format()
1894 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1898 status = vpx_codec_control (&encoder->encoder, VP8E_SET_TUNING, in gst_vpx_enc_set_format()
1899 encoder->tuning); in gst_vpx_enc_set_format()
1901 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1904 status = vpx_codec_control (&encoder->encoder, VP8E_SET_CQ_LEVEL, in gst_vpx_enc_set_format()
1905 encoder->cq_level); in gst_vpx_enc_set_format()
1907 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1910 status = vpx_codec_control (&encoder->encoder, VP8E_SET_MAX_INTRA_BITRATE_PCT, in gst_vpx_enc_set_format()
1911 encoder->max_intra_bitrate_pct); in gst_vpx_enc_set_format()
1913 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_set_format()
1919 && !vpx_enc_class->configure_encoder (encoder, state)) { in gst_vpx_enc_set_format()
1921 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_set_format()
1929 latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, in gst_vpx_enc_set_format()
1932 latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, in gst_vpx_enc_set_format()
1936 encoder->inited = TRUE; in gst_vpx_enc_set_format()
1939 if (encoder->input_state) in gst_vpx_enc_set_format()
1940 gst_video_codec_state_unref (encoder->input_state); in gst_vpx_enc_set_format()
1941 encoder->input_state = gst_video_codec_state_ref (state); in gst_vpx_enc_set_format()
1944 if (encoder->rc_target_bitrate_auto) in gst_vpx_enc_set_format()
1945 gst_vpx_enc_set_auto_bitrate (encoder); in gst_vpx_enc_set_format()
1948 image = &encoder->image; in gst_vpx_enc_set_format()
1951 vpx_enc_class->set_image_format (encoder, image); in gst_vpx_enc_set_format()
1960 caps = vpx_enc_class->get_new_vpx_caps (encoder); in gst_vpx_enc_set_format()
1962 vpx_enc_class->set_stream_info (encoder, caps, info); in gst_vpx_enc_set_format()
1964 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_set_format()
1970 gst_video_encoder_negotiate (GST_VIDEO_ENCODER (encoder)); in gst_vpx_enc_set_format()
1977 gst_vpx_enc_process (GstVPXEnc * encoder) in gst_vpx_enc_process() argument
1991 video_encoder = GST_VIDEO_ENCODER (encoder); in gst_vpx_enc_process()
1992 vpx_enc_class = GST_VPX_ENC_GET_CLASS (encoder); in gst_vpx_enc_process()
1994 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_process()
1995 pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); in gst_vpx_enc_process()
2000 GST_DEBUG_OBJECT (encoder, "packet %u type %d", (guint) pkt->data.frame.sz, in gst_vpx_enc_process()
2004 && encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { in gst_vpx_enc_process()
2005 GST_LOG_OBJECT (encoder, "handling STATS packet"); in gst_vpx_enc_process()
2007 g_byte_array_append (encoder->first_pass_cache_content, in gst_vpx_enc_process()
2015 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_process()
2017 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_process()
2020 pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); in gst_vpx_enc_process()
2023 GST_LOG_OBJECT (encoder, "non frame pkt: %d", pkt->kind); in gst_vpx_enc_process()
2024 pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); in gst_vpx_enc_process()
2037 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_process()
2045 encoder->cfg.g_timebase.den, in gst_vpx_enc_process()
2046 encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); in gst_vpx_enc_process()
2047 GST_TRACE_OBJECT (encoder, "vpx pts: %" G_GINT64_FORMAT in gst_vpx_enc_process()
2057 user_data = vpx_enc_class->process_frame_user_data (encoder, frame); in gst_vpx_enc_process()
2059 encoder->cfg.ts_periodicity != 0) { in gst_vpx_enc_process()
2060 vpx_enc_class->get_frame_temporal_settings (encoder, frame, in gst_vpx_enc_process()
2064 if (layer_id != 0 && encoder->prev_was_keyframe) { in gst_vpx_enc_process()
2074 encoder->prev_was_keyframe = TRUE; in gst_vpx_enc_process()
2077 encoder->prev_was_keyframe = FALSE; in gst_vpx_enc_process()
2087 tl0picidx = ++encoder->tl0picidx; in gst_vpx_enc_process()
2091 vpx_enc_class->preflight_buffer (encoder, frame, buffer, in gst_vpx_enc_process()
2097 vpx_enc_class->handle_invisible_frame_buffer (encoder, user_data, in gst_vpx_enc_process()
2102 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_process()
2104 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_process()
2107 pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); in gst_vpx_enc_process()
2111 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_process()
2120 GstVPXEnc *encoder; in gst_vpx_enc_drain() local
2126 encoder = GST_VPX_ENC (video_encoder); in gst_vpx_enc_drain()
2128 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_drain()
2129 deadline = encoder->deadline; in gst_vpx_enc_drain()
2132 gst_util_uint64_scale (encoder->last_pts, in gst_vpx_enc_drain()
2133 encoder->cfg.g_timebase.den, in gst_vpx_enc_drain()
2134 encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); in gst_vpx_enc_drain()
2136 status = vpx_codec_encode (&encoder->encoder, NULL, pts, 0, flags, deadline); in gst_vpx_enc_drain()
2137 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_drain()
2140 GST_ERROR_OBJECT (encoder, "encode returned %d %s", status, in gst_vpx_enc_drain()
2146 gst_vpx_enc_process (encoder); in gst_vpx_enc_drain()
2148 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_drain()
2149 if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS && encoder->multipass_cache_file) { in gst_vpx_enc_drain()
2152 if (!g_file_set_contents (encoder->multipass_cache_file, in gst_vpx_enc_drain()
2153 (const gchar *) encoder->first_pass_cache_content->data, in gst_vpx_enc_drain()
2154 encoder->first_pass_cache_content->len, &err)) { in gst_vpx_enc_drain()
2155 GST_ELEMENT_ERROR (encoder, RESOURCE, WRITE, (NULL), in gst_vpx_enc_drain()
2160 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_drain()
2168 GstVPXEnc *encoder; in gst_vpx_enc_flush() local
2172 encoder = GST_VPX_ENC (video_encoder); in gst_vpx_enc_flush()
2174 gst_vpx_enc_destroy_encoder (encoder); in gst_vpx_enc_flush()
2175 if (encoder->input_state) { in gst_vpx_enc_flush()
2176 gst_video_codec_state_ref (encoder->input_state); in gst_vpx_enc_flush()
2177 gst_vpx_enc_set_format (video_encoder, encoder->input_state); in gst_vpx_enc_flush()
2178 gst_video_codec_state_unref (encoder->input_state); in gst_vpx_enc_flush()
2187 GstVPXEnc *encoder; in gst_vpx_enc_finish() local
2192 encoder = GST_VPX_ENC (video_encoder); in gst_vpx_enc_finish()
2194 if (encoder->inited) { in gst_vpx_enc_finish()
2225 GstVPXEnc *encoder; in gst_vpx_enc_handle_frame() local
2236 encoder = GST_VPX_ENC (video_encoder); in gst_vpx_enc_handle_frame()
2237 vpx_enc_class = GST_VPX_ENC_GET_CLASS (encoder); in gst_vpx_enc_handle_frame()
2240 GST_VIDEO_INFO_WIDTH (&encoder->input_state->info), in gst_vpx_enc_handle_frame()
2241 GST_VIDEO_INFO_HEIGHT (&encoder->input_state->info)); in gst_vpx_enc_handle_frame()
2243 gst_video_frame_map (&vframe, &encoder->input_state->info, in gst_vpx_enc_handle_frame()
2245 image = gst_vpx_enc_buffer_to_image (encoder, &vframe); in gst_vpx_enc_handle_frame()
2247 vpx_enc_class->set_frame_user_data (encoder, frame, image); in gst_vpx_enc_handle_frame()
2253 g_mutex_lock (&encoder->encoder_lock); in gst_vpx_enc_handle_frame()
2256 encoder->cfg.g_timebase.den, in gst_vpx_enc_handle_frame()
2257 encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); in gst_vpx_enc_handle_frame()
2258 encoder->last_pts = frame->pts; in gst_vpx_enc_handle_frame()
2262 gst_util_uint64_scale (frame->duration, encoder->cfg.g_timebase.den, in gst_vpx_enc_handle_frame()
2263 encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); in gst_vpx_enc_handle_frame()
2266 encoder->last_pts += frame->duration; in gst_vpx_enc_handle_frame()
2270 GST_WARNING_OBJECT (encoder, in gst_vpx_enc_handle_frame()
2279 if (encoder->n_ts_layer_flags != 0) { in gst_vpx_enc_handle_frame()
2283 encoder->ts_layer_flags[frame->system_frame_number % in gst_vpx_enc_handle_frame()
2284 encoder->n_ts_layer_flags]; in gst_vpx_enc_handle_frame()
2289 encoder->cfg.ts_periodicity != 0 && in gst_vpx_enc_handle_frame()
2290 encoder->n_ts_layer_id >= encoder->cfg.ts_periodicity) { in gst_vpx_enc_handle_frame()
2291 vpx_enc_class->apply_frame_temporal_settings (encoder, frame, in gst_vpx_enc_handle_frame()
2292 encoder->cfg.ts_layer_id[frame->system_frame_number % in gst_vpx_enc_handle_frame()
2293 encoder->cfg.ts_periodicity], encoder->tl0picidx, in gst_vpx_enc_handle_frame()
2294 encoder->ts_layer_sync_flags[frame->system_frame_number % in gst_vpx_enc_handle_frame()
2295 encoder->n_ts_layer_sync_flags]); in gst_vpx_enc_handle_frame()
2298 status = vpx_codec_encode (&encoder->encoder, image, in gst_vpx_enc_handle_frame()
2299 pts, duration, flags, encoder->deadline); in gst_vpx_enc_handle_frame()
2301 g_mutex_unlock (&encoder->encoder_lock); in gst_vpx_enc_handle_frame()
2305 GST_ELEMENT_ERROR (encoder, LIBRARY, ENCODE, in gst_vpx_enc_handle_frame()
2313 return gst_vpx_enc_process (encoder); in gst_vpx_enc_handle_frame()
2337 gst_vpx_enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query) in gst_vpx_enc_propose_allocation() argument
2341 return GST_VIDEO_ENCODER_CLASS (parent_class)->propose_allocation (encoder, in gst_vpx_enc_propose_allocation()
2346 gst_vpx_enc_transform_meta (GstVideoEncoder * encoder, in gst_vpx_enc_transform_meta() argument