From c456e421911fe01be5af9c63db81eeb7cc5b337e Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 21 Dec 2014 10:41:30 -0800 Subject: [PATCH] win-dshow: Use actual encoder names Was using a temporary name for the encoders still; now uses the actual encoder names. --- plugins/win-dshow/data/locale/en-US.ini | 2 ++ plugins/win-dshow/win-dshow-encoder.cpp | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/win-dshow/data/locale/en-US.ini b/plugins/win-dshow/data/locale/en-US.ini index d2b3e7506..2a54c6b5d 100644 --- a/plugins/win-dshow/data/locale/en-US.ini +++ b/plugins/win-dshow/data/locale/en-US.ini @@ -18,3 +18,5 @@ AudioDevice="Audio Device" # encoder text Bitrate="Bitrate" +Encoder.C985="AverMedia C985 Hardware Encoder" +Encoder.C353="AverMedia C353 Hardware Encoder" diff --git a/plugins/win-dshow/win-dshow-encoder.cpp b/plugins/win-dshow/win-dshow-encoder.cpp index 554f4c9a0..1be9da342 100644 --- a/plugins/win-dshow/win-dshow-encoder.cpp +++ b/plugins/win-dshow/win-dshow-encoder.cpp @@ -42,9 +42,14 @@ struct DShowEncoder { struct encoder_packet *packet, bool *received_packet); }; -static const char *GetDShowEncoderName(void) +static const char *GetC985EncoderName(void) { - return "DShow Encoder (temp)"; + return obs_module_text("Encoder.C985"); +} + +static const char *GetC353EncoderName(void) +{ + return obs_module_text("Encoder.C353"); } static inline void FindDevice(DeviceId &id, const wchar_t *name) @@ -331,7 +336,6 @@ void RegisterDShowEncoders() obs_encoder_info info = {}; info.type = OBS_ENCODER_VIDEO; info.codec = "h264"; - info.get_name = GetDShowEncoderName; info.destroy = DestroyDShowEncoder; info.encode = DShowEncode; info.update = UpdateDShowEncoder; @@ -348,12 +352,14 @@ void RegisterDShowEncoders() for (const DeviceId &device : devices) { if (!foundC985 && device.name.find(L"C985") != string::npos) { info.id = "dshow_c985_h264"; + info.get_name = GetC985EncoderName; info.create = CreateC985Encoder; obs_register_encoder(&info); foundC985 = true; } else if (device.name.find(L"C353") != string::npos) { info.id = "dshow_c353_h264"; + info.get_name = GetC353EncoderName; info.create = CreateC353Encoder; obs_register_encoder(&info); } -- GitLab