userContent.css对Slack不起作用

时间:2018-08-09 08:12:19

标签: css userstyles

我正在尝试使默认的Slack字体变大。我正在使用Firefox的userContent.css:

#include <gst/gst.h>

#include <gst/rtsp-server/rtsp-server.h>

#include <string>
#include <fstream>


static GstElement *pMy = NULL;
static GstElement *pMy2 = NULL;

static gboolean timeout(GstRTSPServer * server)
{
   GstRTSPSessionPool *pool;

   pool = gst_rtsp_server_get_session_pool(server);
   gst_rtsp_session_pool_cleanup(pool);
   g_object_unref(pool);

   return TRUE;
}

static void onNeedVideoData(GstElement * appsrc)
{
   static int NN = 0;
   ++NN;

   int Size = sFileSize(NN);
   GstBuffer* buf = gst_buffer_new_and_alloc(Size);

   GstMapInfo map;
   gst_buffer_map(buf, &map, GST_MAP_WRITE);

   FILE *fp = fopen(std::string("C:\\rtsp_files\\body" +    std::to_string(NN) + ".bin").c_str(), "rb");
   fread(map.data, sizeof(unsigned char), Size, fp);
   fclose(fp);

  gst_buffer_unmap(buf, &map);


  //in random moment we send seek-event to some GstElement
  if (NN % 300 == 0){
    double dspeed = 4.;
    gint64 position;


    if (!gst_element_query_position(pMy, GST_FORMAT_TIME, &position)) {
        g_printerr("Unable to retrieve current position.\n");
        return;
    }

    GstEvent * seek_event = gst_event_new_seek(dspeed, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE),
        GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_NONE, 0);

    auto res1 = gst_element_send_event(pMy2, seek_event);
    g_print("%d\n", res1);
}

GstFlowReturn ret;
g_signal_emit_by_name(appsrc, "push-buffer", buf, &ret);

gst_buffer_unref(buf);
}

 static void need_video_data(GstElement * appsrc, guint unused) 
{
   onNeedVideoData(appsrc);
}


static void media_constructed(GstRTSPMediaFactory * factory, GstRTSPMedia * media)
{
   GstElement* element = pMy = gst_rtsp_media_get_element(media);
   GstElement* vsrc = gst_bin_get_by_name_recurse_up(GST_BIN(element), "vsrc");     

   g_signal_connect(vsrc, "need-data", (GCallback)need_video_data, NULL);

   pMy2 = gst_bin_get_by_name_recurse_up(GST_BIN(element), "h264parse0");
}


int main(int argc, char *argv[]) 
{
   GMainLoop *loop;
   GstRTSPServer *server;
   GstRTSPMountPoints *mounts;
   GstRTSPMediaFactory *factory;


   gst_init(&argc, &argv);

   loop = g_main_loop_new(NULL, FALSE);

   /* create a server instance */
   server = gst_rtsp_server_new();


   /* get the mount points for this server, every server has a default object
   * that be used to map uri mount points to media factories */
   mounts = gst_rtsp_server_get_mount_points(server);

/* make a media factory for a test stream. The default media factory can use
* gst-launch syntax to create pipelines.
* any launch line works as long as it contains elements named pay%d. Each
* element with pay%d names will be a stream */
   factory = gst_rtsp_media_factory_new();
   gst_rtsp_media_factory_set_launch(factory, "( "
    "appsrc name=vsrc  !"
    "h264parse ! rtph264pay pt=96 name=pay0  )");

   gst_rtsp_media_factory_set_shared(factory, TRUE);

   g_signal_connect(factory, "media-constructed", (GCallback)
    media_constructed, NULL);

   /* attach the test factory to the /test url */
   gst_rtsp_mount_points_add_factory(mounts, "/test", factory);

   /* don't need the ref to the mapper anymore */
   g_object_unref(mounts);

   /* attach the server to the default maincontext */
   if (gst_rtsp_server_attach(server, NULL) == 0)
    goto failed;

   /* add a timeout for the session cleanup */
   g_timeout_add_seconds(2, (GSourceFunc)timeout, server);

   g_print("stream ready at rtsp://127.0.0.1:8554/test\n");

   g_main_loop_run(loop);

   return 0;

/* ERRORS */
   failed:
   {
      g_print("failed to attach the server\n");
      return -1;
   }
}

乳齿象节的工作原理像一个饰物。但是,松弛部分拒绝工作,userContent.css规则未出现在任何给定元素的规则列表中。

0 个答案:

没有答案