Skip to content

Commit

Permalink
Modify x264enc invalid type of tune property (open-webrtc-toolkit#425)
Browse files Browse the repository at this point in the history
* Modify x264enc invalid type of tune property
  • Loading branch information
qwu16 authored Feb 26, 2020
1 parent d08a9ae commit c7c59d6
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions source/agent/plugins/samples/cpu_pipeline/mypipeline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ GstElement * MyPipeline::InitializePipeline() {
outsink = gst_element_factory_make("appsink","appsink");

/* Create the empty VideoGstAnalyzer */
pipeline = gst_pipeline_new("detect-pipeline");
pipeline = gst_pipeline_new("cpu-pipeline");


if (!detect){
Expand Down Expand Up @@ -122,28 +122,26 @@ rvaStatus MyPipeline::LinkElements() {
"height", G_TYPE_INT, 480,
"profile", G_TYPE_STRING, "constrained-baseline", NULL);

//g_object_set(G_OBJECT(videorate),"max-rate", inferenceframerate, NULL);
//g_object_set(G_OBJECT(postproc),"brightness", 0.0001, NULL);

g_object_set(G_OBJECT(encoder),"key-int-max", 30, NULL);
g_object_set(G_OBJECT(encoder),"pass", 5, NULL);
g_object_set(G_OBJECT(encoder),"quantizer", 25, NULL);
g_object_set(G_OBJECT(encoder),"speed-preset", 6, NULL);
//g_object_set(G_OBJECT(encoder),"cabac", false, NULL);
g_object_set(G_OBJECT(encoder),"bitrate", 812, NULL);
//g_object_set(G_OBJECT(encoder),"dct8x8", true, NULL);
g_object_set(G_OBJECT(encoder),"aud", false, NULL);
g_object_set(G_OBJECT(encoder),"tune", "zerolatency", NULL);
g_object_set(G_OBJECT(source),"is-live", true, NULL);

g_object_set(G_OBJECT(encoder),"pass", 5,
"quantizer", 25,
"speed-preset", 6,
"bitrate", 812,
"aud", false,
"tune", 0x00000004,
"key-int-max", 30, NULL);

g_object_set(G_OBJECT(outsink),"drop", true, NULL);
g_object_set(G_OBJECT(outsink), "max-buffers", 1,
"sync", false,
"drop", true, NULL);

g_object_set(G_OBJECT(detect),"inference-id", "dtc", NULL);
g_object_set(G_OBJECT(detect),"device", device.c_str(), NULL);
g_object_set(G_OBJECT(detect),"model",model.c_str(), NULL);
g_object_set(G_OBJECT(detect),"cpu-streams", 12, NULL);
g_object_set(G_OBJECT(detect),"nireq", 24, NULL);
//g_object_set(G_OBJECT(detect),"pre-proc", "vaapi", NULL);
//g_object_set(G_OBJECT(detect),"every-nth-frame", 5, NULL);
g_object_set(G_OBJECT(detect),"device", device.c_str(),
"model",model.c_str(),
"cpu-streams", 12,
"nireq", 24,
"inference-id", "dtc", NULL);


gst_bin_add_many(GST_BIN (pipeline), source,decodebin,watermark,postproc,h264parse,detect,converter, encoder,outsink, NULL);
Expand All @@ -155,6 +153,7 @@ rvaStatus MyPipeline::LinkElements() {
}



link_ok = gst_element_link_filtered (encoder, outsink, encodecaps);
gst_caps_unref (encodecaps);

Expand Down

0 comments on commit c7c59d6

Please sign in to comment.