⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x264_gtk.c.svn-base

📁 一個影像串流的壓縮方式H264加密方式
💻 SVN-BASE
📖 第 1 页 / 共 3 页
字号:
  else    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->mb.bframes.use_as_reference), FALSE);  if (x264_gtk->bidir_me)    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->mb.bframes.bidir_me), TRUE);  else    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->mb.bframes.bidir_me), FALSE);  if (x264_gtk->adaptive)    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->mb.bframes.adaptive), TRUE);  else    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->mb.bframes.adaptive), FALSE);  if (x264_gtk->weighted_biprediction)    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->mb.bframes.weighted_biprediction), TRUE);  else    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->mb.bframes.weighted_biprediction), FALSE);  g_snprintf (buf, 5, "%d", x264_gtk->max_consecutive);  gtk_entry_set_text (GTK_ENTRY (config->mb.bframes.max_consecutive), buf);  gtk_range_set_value (GTK_RANGE (config->mb.bframes.bias), (gdouble)x264_gtk->bias);  gtk_combo_box_set_active (GTK_COMBO_BOX (config->mb.bframes.direct_mode), x264_gtk->direct_mode);  /* more */  if (x264_gtk->bframe_rdo)    gtk_combo_box_set_active (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), X264_PD_6b);  else    gtk_combo_box_set_active (GTK_COMBO_BOX (config->more.motion_estimation.partition_decision), x264_gtk->partition_decision);  gtk_combo_box_set_active (GTK_COMBO_BOX (config->more.motion_estimation.method), x264_gtk->me_method);  g_snprintf (buf, 5, "%d", x264_gtk->range);  gtk_entry_set_text (GTK_ENTRY (config->more.motion_estimation.range), buf);  if (x264_gtk->chroma_me)    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->more.motion_estimation.chroma_me), TRUE);  else    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->more.motion_estimation.chroma_me), FALSE);  g_snprintf (buf, 5, "%d", x264_gtk->max_ref_frames);  gtk_entry_set_text (GTK_ENTRY (config->more.motion_estimation.max_ref_frames), buf);  if (x264_gtk->mixed_refs)    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->more.motion_estimation.mixed_refs), TRUE);  else    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->more.motion_estimation.mixed_refs), FALSE);  g_snprintf (buf, 5, "%d", x264_gtk->sample_ar_x);  gtk_entry_set_text (GTK_ENTRY (config->more.misc.sample_ar_x), buf);  g_snprintf (buf, 5, "%d", x264_gtk->sample_ar_y);  gtk_entry_set_text (GTK_ENTRY (config->more.misc.sample_ar_y), buf);  g_snprintf (buf, 5, "%d", x264_gtk->threads);  gtk_entry_set_text (GTK_ENTRY (config->more.misc.threads), buf);  if (x264_gtk->cabac)    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->more.misc.cabac), TRUE);  else    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->more.misc.cabac), FALSE);  gtk_combo_box_set_active (GTK_COMBO_BOX (config->more.misc.trellis), x264_gtk->trellis);  g_snprintf (buf, 64, "%d", x264_gtk->noise_reduction);  gtk_entry_set_text (GTK_ENTRY (config->more.misc.noise_reduction), buf);  if (x264_gtk->deblocking_filter)    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->more.misc.df.deblocking_filter), TRUE);  else    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (config->more.misc.df.deblocking_filter), FALSE);  gtk_range_set_value (GTK_RANGE (config->more.misc.df.strength), (gdouble)x264_gtk->strength);  gtk_range_set_value (GTK_RANGE (config->more.misc.df.threshold), (gdouble)x264_gtk->threshold);  gtk_combo_box_set_active (GTK_COMBO_BOX (config->more.debug.log_level), x264_gtk->debug_method);  gtk_entry_set_text (GTK_ENTRY (config->more.debug.fourcc),  x264_gtk->fourcc);}static void_current_get (X264_Gui_Config *gconfig, X264_Gtk *x264_gtk){  const gchar *text;  if (!gconfig)    return;  if (!x264_gtk)    g_print ("problem...\n");  /* bitrate */  switch (gtk_combo_box_get_active (GTK_COMBO_BOX (gconfig->bitrate.pass)))  {  case 0:    x264_gtk->pass = X264_PASS_SINGLE_BITRATE;    text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.w_average_bitrate));    x264_gtk->average_bitrate = (gint)g_ascii_strtoull (text, NULL, 10);    break;  case 1:    x264_gtk->pass = X264_PASS_SINGLE_QUANTIZER;    x264_gtk->quantizer = (gint)gtk_range_get_value (GTK_RANGE (gconfig->bitrate.w_quantizer));    break;  case 2:    x264_gtk->pass = X264_PASS_MULTIPASS_1ST;    text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.w_target_bitrate));    x264_gtk->target_bitrate = (gint)g_ascii_strtoull (text, NULL, 10);    break;  case 3:    x264_gtk->pass = X264_PASS_MULTIPASS_1ST_FAST;    text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.w_target_bitrate));    x264_gtk->target_bitrate = (gint)g_ascii_strtoull (text, NULL, 10);    break;  case 4:  default:    x264_gtk->pass = X264_PASS_MULTIPASS_NTH;    text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.w_target_bitrate));    x264_gtk->target_bitrate = (gint)g_ascii_strtoull (text, NULL, 10);    break;  }  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->bitrate.update_statfile)))    x264_gtk->update_statfile = 1;  else    x264_gtk->update_statfile = 0;  text = gtk_entry_get_text (GTK_ENTRY (gconfig->bitrate.statsfile_name));  memcpy (x264_gtk->statsfile_name,          text,          strlen(text) + 1);  /* rate control */  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.bitrate.keyframe_boost));  x264_gtk->keyframe_boost = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.bitrate.bframes_reduction));  x264_gtk->bframes_reduction = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.bitrate.bitrate_variability));  x264_gtk->bitrate_variability = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.quantization_limits.min_qp));  x264_gtk->min_qp = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.quantization_limits.max_qp));  x264_gtk->max_qp = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.quantization_limits.max_qp_step));  x264_gtk->max_qp_step = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.scene_cuts.scene_cut_threshold));  x264_gtk->scene_cut_threshold = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.scene_cuts.min_idr_frame_interval));  x264_gtk->min_idr_frame_interval = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->rate_control.scene_cuts.max_idr_frame_interval));  x264_gtk->max_idr_frame_interval = (gint)g_ascii_strtoull (text, NULL, 10);  /* mb */  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.partitions.transform_8x8)))    x264_gtk->transform_8x8 = 1;  else    x264_gtk->transform_8x8 = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.partitions.pframe_search_8)))    x264_gtk->pframe_search_8 = 1;  else    x264_gtk->pframe_search_8 = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.partitions.bframe_search_8)))    x264_gtk->bframe_search_8 = 1;  else    x264_gtk->bframe_search_8 = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.partitions.pframe_search_4)))    x264_gtk->pframe_search_4 = 1;  else    x264_gtk->pframe_search_4 = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.partitions.inter_search_8)))    x264_gtk->inter_search_8 = 1;  else    x264_gtk->inter_search_8 = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.partitions.inter_search_4)))    x264_gtk->inter_search_4 = 1;  else    x264_gtk->inter_search_4 = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.bframes.use_as_reference)))    x264_gtk->use_as_reference = 1;  else    x264_gtk->use_as_reference = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.bframes.bidir_me)))    x264_gtk->bidir_me = 1;  else    x264_gtk->bidir_me = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.bframes.adaptive)))    x264_gtk->adaptive = 1;  else    x264_gtk->adaptive = 0;  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->mb.bframes.weighted_biprediction)))    x264_gtk->weighted_biprediction = 1;  else    x264_gtk->weighted_biprediction = 0;  text = gtk_entry_get_text (GTK_ENTRY (gconfig->mb.bframes.max_consecutive));  x264_gtk->max_consecutive = (gint)g_ascii_strtoull (text, NULL, 10);  x264_gtk->bias = (gint)gtk_range_get_value (GTK_RANGE (gconfig->mb.bframes.bias));  switch (gtk_combo_box_get_active (GTK_COMBO_BOX (gconfig->mb.bframes.direct_mode)))    {    case 0:      x264_gtk->direct_mode = X264_NONE;    case 1:      x264_gtk->direct_mode = X264_SPATIAL;      break;    default:      x264_gtk->direct_mode = X264_TEMPORAL;      break;    }  /* more */  switch (gtk_combo_box_get_active (GTK_COMBO_BOX (gconfig->more.motion_estimation.partition_decision)))    {    case 0:      x264_gtk->partition_decision = X264_PD_1;      break;    case 1:      x264_gtk->partition_decision = X264_PD_2;      break;    case 2:      x264_gtk->partition_decision = X264_PD_3;      break;    case 3:      x264_gtk->partition_decision = X264_PD_4;      break;    case 4:      x264_gtk->partition_decision = X264_PD_5;      break;    case 5:      x264_gtk->partition_decision = X264_PD_6;      break;    default:      x264_gtk->partition_decision = X264_PD_6;      x264_gtk->bframe_rdo = 1;      break;    }  switch (gtk_combo_box_get_active (GTK_COMBO_BOX (gconfig->more.motion_estimation.method)))    {    case 0:      x264_gtk->me_method = X264_ME_METHOD_DIAMOND;      break;    case 1:      x264_gtk->me_method = X264_ME_METHOD_HEXAGONAL;      break;    case 2:      x264_gtk->me_method = X264_ME_METHOD_UNEVEN_MULTIHEXA;      break;    default:      x264_gtk->me_method = X264_ME_METHOD_EXHAUSTIVE;      break;    }  text = gtk_entry_get_text (GTK_ENTRY (gconfig->more.motion_estimation.range));  x264_gtk->range = (gint)g_ascii_strtoull (text, NULL, 10);  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->more.motion_estimation.chroma_me)))    x264_gtk->chroma_me = 1;  else    x264_gtk->chroma_me = 0;  text = gtk_entry_get_text (GTK_ENTRY (gconfig->more.motion_estimation.max_ref_frames));  x264_gtk->max_ref_frames = (gint)g_ascii_strtoull (text, NULL, 10);  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->more.motion_estimation.mixed_refs)))    x264_gtk->mixed_refs = 1;  else    x264_gtk->mixed_refs = 0;  text = gtk_entry_get_text (GTK_ENTRY (gconfig->more.misc.sample_ar_x));  x264_gtk->sample_ar_x = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->more.misc.sample_ar_y));  x264_gtk->sample_ar_y = (gint)g_ascii_strtoull (text, NULL, 10);  text = gtk_entry_get_text (GTK_ENTRY (gconfig->more.misc.threads));  x264_gtk->threads = (gint)g_ascii_strtoull (text, NULL, 10);  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->more.misc.cabac)))    x264_gtk->cabac = 1;  else    x264_gtk->cabac = 0;  x264_gtk->trellis = gtk_combo_box_get_active (GTK_COMBO_BOX (gconfig->more.misc.trellis));  text = gtk_entry_get_text (GTK_ENTRY (gconfig->more.misc.noise_reduction));  x264_gtk->noise_reduction = (gint)g_ascii_strtoull (text, NULL, 10);  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gconfig->more.misc.df.deblocking_filter)))    x264_gtk->deblocking_filter = 1;  else    x264_gtk->deblocking_filter = 0;  x264_gtk->strength = (gint)gtk_range_get_value (GTK_RANGE (gconfig->more.misc.df.strength));  x264_gtk->threshold = (gint)gtk_range_get_value (GTK_RANGE (gconfig->more.misc.df.threshold));  switch (gtk_combo_box_get_active (GTK_COMBO_BOX (gconfig->more.debug.log_level)))    {    case 0:      x264_gtk->debug_method = X264_DEBUG_METHOD_NONE;      break;    case 1:      x264_gtk->debug_method = X264_DEBUG_METHOD_ERROR;      break;    case 2:      x264_gtk->debug_method = X264_DEBUG_METHOD_WARNING;      break;    case 3:      x264_gtk->debug_method = X264_DEBUG_METHOD_INFO;      break;    default:      x264_gtk->debug_method = X264_DEBUG_METHOD_DEBUG;      break;    }  text = gtk_entry_get_text (GTK_ENTRY (gconfig->more.debug.fourcc));  memcpy (x264_gtk->fourcc, text, strlen (text) + 1);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -