Recherche avancée

Médias (0)

Mot : - Tags -/albums

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (25)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5071)

  • A Comprehensive Guide to Robust Digital Marketing Analytics

    30 octobre 2023, par Erin

    First impressions are everything. This is not only true for dating and job interviews but also for your digital marketing strategy. Like a poorly planned resume getting tossed in the “no thank you” pile, 38% of visitors to your website will stop engaging with your content if they find the layout unpleasant. Thankfully, digital marketers can access data that can be harnessed to optimise websites and turn those “no thank you’s” into “absolutely’s.”

    So, how can we transform raw data into valuable insights that pay off ? The key is web analytics tools that can help you make sense of it all while collecting data ethically. In this article, we’ll equip you with ways to take your digital marketing strategy to the next level with the power of web analytics.

    What are the different types of digital marketing analytics ?

    Digital marketing analytics are like a cipher into the complex behaviour of your buyers. Digital marketing analytics help collect, analyse and interpret data from any touchpoint you interact with your buyers online. Whether you’re trying to gauge the effectiveness of a new email marketing campaign or improve your mobile app layout, there’s a way for you to make use of the insights you gain. 

    As we go through the eight commonly known types of digital marketing analytics, please note we’ll primarily focus on what falls under the umbrella of web analytics. 

    1. Web analytics help you better understand how users interact with your website. Good web analytics tools will help you understand user behaviour while securely handling user data. 
    2. Learn more about the effectiveness of your organisation’s social media platforms with social media analytics. Social media analytics include user engagement, post reach and audience demographics. 
    3. Email marketing analytics help you see how email campaigns are being engaged with.
    4. Search engine optimisation (SEO) analytics help you understand your website’s visibility in search engine results pages (SERPs). 
    5. Pay-per-click (PPC) analytics measure the performance of paid advertising campaigns.
    6. Content marketing analytics focus on how your content is performing with your audience. 
    7. Customer analytics helps organisations identify and examine buyer behaviour to retain the biggest spenders. 
    8. Mobile app analytics track user interactions within mobile applications. 

    Choosing which digital marketing analytics tools are the best fit for your organisation is not an easy task. When making these decisions, it’s critical to remember the ethical implications of data collection. Although data insights can be invaluable to your organisation, they won’t be of much use if you lose the trust of your users. 

    Tips and best practices for developing robust digital marketing analytics 

    So, what separates top-notch, robust digital marketing analytics from the rest ? We’ve already touched on it, but a big part involves respecting user privacy and ethically handling data. Data security should be on your list of priorities, alongside conversion rate optimisation when developing a digital marketing strategy. In this section, we will examine best practices for using digital marketing analytics while retaining user trust.

    Lightbulb with a target in the center being struck by arrows

    Clear objectives

    Before comparing digital marketing analytics tools, you should define clear and measurable goals. Try asking yourself what you need your digital marketing analytics strategy to accomplish. Do you want to improve conversion rates while remaining data compliant ? Maybe you’ve noticed users are not engaging with your platform and want to fix that. Save yourself time and energy by focusing on the most relevant pain points and areas of improvement.

    Choose the right tools for the job

    Don’t just base your decision on what other people tell you. Take the tool for a test drive — free trials allow you to test features and user interfaces and learn more about the platform before committing. When choosing digital marketing analytics tools, look for ones that ensure compliance with privacy laws like GDPR.

    Don’t overlook data compliance

    GDPR ensures organisations prioritise data protection and privacy. You could be fined up to €20 million, or 4% of the previous year’s revenue for violations. Without data compliance practices, you can say goodbye to the time and money spent on digital marketing strategies. 

    Don’t sacrifice data quality and accuracy

    Inaccurate and low-quality data can taint your analysis, making it hard to glean valuable insights from your digital marketing analytics efforts. Regularly audit and clean your data to remove inaccuracies and inconsistencies. Address data discrepancies promptly to maintain the integrity of your analytics. Data validation measures also help to filter out inaccurate data.

    Communicate your findings

    Having insights is one thing ; effectively communicating complex data findings is just as important. Customise dashboards to display key metrics aligned with your objectives. Make sure to automate reports, allowing stakeholders to stay updated without manual intervention. 

    Understand the user journey

    To optimise your conversion rates, you need to understand the user journey. Start by analysing visitors interactions with your website — this will help you identify conversion bottlenecks in your sales or lead generation processes. Implement A/B testing for landing page optimisation, refining elements like call-to-action buttons or copy, and leverage Form Analytics to make informed, data-driven improvements to your forms.

    Continuous improvement

    Learn from the data insights you gain, and iterate your marketing strategies based on the findings. Stay updated with evolving web analytics trends and technologies to leverage new growth opportunities.

    Why you need web analytics to support your digital marketing analytics toolbox

    You wouldn’t set out on a roadtrip without a map, right ? Digital marketing analytics without insights into how users interact with your website are just as useless. Used ethically, web analytics tools can be an invaluable addition to your digital marketing analytics toolbox. 

    The data collected via web analytics reveals user interactions with your website. These could include anything from how long visitors stay on your page to their actions while browsing your website. Web analytics tools help you gather and understand this data so you can better understand buyer preferences. It’s like a domino effect : the more you understand your buyers and user behaviour, the better you can assess the effectiveness of your digital content and campaigns. 

    Web analytics reveal user behaviour, highlighting navigation patterns and drop-off points. Understanding these patterns helps you refine website layout and content, improving engagement and conversions for a seamless user experience.

    Magnifying glass examining various screens that contain data

    Concrete CMS harnessed the power of web analytics, specifically Form Analytics, to uncover a crucial insight within their user onboarding process. Their data revealed a significant issue : the “address” input field was causing visitors to drop off and not complete the form, severely impacting the overall onboarding experience and conversion rate.

    Armed with these insights, Concrete CMS made targeted optimisations to the form, resulting in a substantial transformation. By addressing the specific issue identified through Form Analytics, they achieved an impressive outcome – a threefold increase in lead generation.

    This case is a great example of how web analytics can uncover customer needs and preferences and positively impact conversion rates. 

    Ethical implications of digital marketing analytics

    As we’ve touched on, digital marketing analytics are a powerful tool to help better understand online user behaviour. With great power comes great responsibility, however, and it’s a legal and ethical obligation for organisations to protect individual privacy rights. Let’s get into the benefits of practising ethical digital marketing analytics and the potential risks of not respecting user privacy : 

    • If someone uses your digital platform and then opens their email one day to find it filled with random targeted ad campaigns, they won’t be happy. Avoid losing user trust — and facing a potential lawsuit — by informing users what their data will be used for. Give them the option to consent to opt-in or opt-out of letting you use their personal information. If users are also assured you’ll safeguard personal information against unauthorised access, they’ll be more likely to trust you to handle their data securely.
    • Protecting data against breaches means investing in technology that will let you end-to-end encrypt and securely store data. Other important data-security best practices include access control, backing up data regularly and network and physical security of assets.
    • A fine line separates digital marketing analytics and misusing user data — many companies have gotten into big trouble for crossing it. (By big trouble, we mean millions of dollars in fines.) When it comes to digital marketing analytics, you should never cut corners when it comes to user privacy and data security. This balance involves understanding what data can be collected and what should be collected and respecting user boundaries and preferences.

    Learn more 

    We discussed a lot of facets of digital marketing analytics, namely how to develop a robust digital marketing strategy while prioritising data compliance. With Matomo, you can protect user data and respect user privacy while gaining invaluable insights into user behaviour. Save your organisation time and money by investing in a web analytics solution that gives you the best of both worlds. 

    If you’re ready to begin using ethical and robust digital marketing analytics on your website, try Matomo. Start your 21-day free trial now — no credit card required.

  • A Comprehensive Guide to Robust Digital Marketing Analytics

    15 novembre 2023, par Erin — Analytics Tips

    First impressions are everything. This is not only true for dating and job interviews but also for your digital marketing strategy. Like a poorly planned job application getting tossed in the “no thank you” pile, 38% of visitors to your website will stop engaging with your content if they find the layout unpleasant. Thankfully, digital marketers can access data that can be harnessed to optimise websites and turn those “no thank you’s” into “absolutely’s.”

    So, how can we transform raw data into valuable insights that pay off ? The key is web analytics tools that can help you make sense of it all while collecting data ethically. In this article, we’ll equip you with ways to take your digital marketing strategy to the next level with the power of web analytics.

    What are the different types of digital marketing analytics ?

    Digital marketing analytics are like a cipher into the complex behaviour of your buyers. Digital marketing analytics help collect, analyse and interpret data from any touchpoint you interact with your buyers online. Whether you’re trying to gauge the effectiveness of a new email marketing campaign or improve your mobile app layout, there’s a way for you to make use of the insights you gain.

    Icons representing the 8 types of digital marketing analytics

    As we go through the eight commonly known types of digital marketing analytics, please note we’ll primarily focus on what falls under the umbrella of web analytics. 

    1. Web analytics help you better understand how users interact with your website. Good web analytics tools will help you understand user behaviour while securely handling user data. 
    2. Learn more about the effectiveness of your organisation’s social media platforms with social media analytics. Social media analytics include user engagement, post reach and audience demographics. 
    3. Email marketing analytics help you see how email campaigns are being engaged with.
    4. Search engine optimisation (SEO) analytics help you understand your website’s visibility in search engine results pages (SERPs). 
    5. Pay-per-click (PPC) or campaign analytics measure the performance of paid advertising campaigns.
    6. Content marketing analytics focus on how your content is performing with your audience. 
    7. Customer analytics helps organisations identify and examine buyer behaviour to retain the biggest spenders. 
    8. Mobile app analytics track user interactions within mobile applications. 

    Choosing which digital marketing analytics tools are the best fit for your organisation is not an easy task. When making these decisions, it’s critical to remember the ethical implications of data collection. Although data insights can be invaluable to your organisation, they won’t be of much use if you lose the trust of your users. 

    Tips and best practices for developing robust digital marketing analytics 

    So, what separates top-notch, robust digital marketing analytics from the rest ? We’ve already touched on it, but a big part involves respecting user privacy and ethically handling data. Data security should be on your list of priorities, alongside conversion rate optimisation when developing a digital marketing strategy. In this section, we will examine best practices for using digital marketing analytics while retaining user trust.

    Lightbulb with a target in the center being struck by arrows

    Clear objectives

    Before comparing digital marketing analytics tools, you should define clear and measurable goals. Try asking yourself what you need your digital marketing analytics strategy to accomplish. Do you want to improve conversion rates while remaining data compliant ? Maybe you’ve noticed users are not engaging with your platform and want to fix that. Save yourself time and energy by focusing on the most relevant pain points and areas of improvement.

    Choose the right tools for the job

    Don’t just base your decision on what other people tell you. Take the tool for a test drive — free trials allow you to test features and user interfaces and learn more about the platform before committing. When choosing digital marketing analytics tools, look for ones that ensure data accuracy as well as compliance with privacy laws like GDPR.

    Don’t overlook data compliance

    GDPR ensures organisations prioritise data protection and privacy. You could be fined up to €20 million, or 4% of the previous year’s revenue for violations. Without data compliance practices, you can say goodbye to the time and money spent on digital marketing strategies. 

    Don’t sacrifice data quality and accuracy

    Inaccurate and low-quality data can taint your analysis, making it hard to glean valuable insights from your digital marketing analytics efforts. Many analytics tools only show sampled data or use AI and ML to fill data gaps, potentially compromising the accuracy and completeness of your analytics. 

    When your analytics are based on incomplete or inaccurate data, it’s like trying to assemble a puzzle with missing pieces—you might get a glimpse of the whole picture, but it’s never quite clear. Accurate data isn’t just helpful—it’s the backbone of smart marketing strategies. It lets you make confident decisions and enables precise targeting for greater impact.

    Communicate your findings

    Having insights is one thing ; effectively communicating complex data findings is just as important. Customise dashboards to display key metrics aligned with your objectives. Make sure to automate reports, allowing stakeholders to stay updated without manual intervention. 

    Understand the user journey

    To optimise your conversion rates, you need to understand the user journey. Start by analysing visitors interactions with your website — this will help you identify conversion bottlenecks in your sales or lead generation processes. Implement A/B testing for landing page optimisation, refining elements like call-to-action buttons or copy, and leverage Form Analytics to make informed, data-driven improvements to your forms.

    Continuous improvement

    Learn from the data insights you gain, and iterate your marketing strategies based on the findings. Stay updated with evolving web analytics trends and technologies to leverage new growth opportunities. 

    Why you need web analytics to support your digital marketing analytics toolbox

    You wouldn’t set out on a roadtrip without a map, right ? Digital marketing analytics without insights into how users interact with your website are just as useless. Used ethically, web analytics tools can be an invaluable addition to your digital marketing analytics toolbox. 

    The data collected via web analytics reveals user interactions with your website. These could include anything from how long visitors stay on your page to their actions while browsing your website. Web analytics tools help you gather and understand this data so you can better understand buyer preferences. It’s like a domino effect : the more you understand your buyers and user behaviour, the better you can assess the effectiveness of your digital content and campaigns. 

    Web analytics reveal user behaviour, highlighting navigation patterns and drop-off points. Understanding these patterns helps you refine website layout and content, improving engagement and conversions for a seamless user experience.

    Magnifying glass examining various screens that contain data

    Concrete CMS harnessed the power of web analytics, specifically Matomo’s Form Analytics, to uncover crucial insights within their user onboarding process. Their data revealed a significant issue : the “address” input field was causing visitors to drop off and not complete the form, severely impacting the overall onboarding experience and conversion rate.

    Armed with these insights, Concrete CMS made targeted optimisations to the form, resulting in a substantial transformation. By addressing the specific issue identified through Form Analytics, they achieved an impressive outcome – a threefold increase in lead generation.

    This case is a great example of how web analytics can uncover customer needs and preferences and positively impact conversion rates. 

    Ethical implications of digital marketing analytics

    As we’ve touched on, digital marketing analytics are a powerful tool to help better understand online user behaviour. With great power comes great responsibility, however, and it’s a legal and ethical obligation for organisations to protect individual privacy rights. Let’s get into the benefits of practising ethical digital marketing analytics and the potential risks of not respecting user privacy : 

    • If someone uses your digital platform and then opens their email one day to find it filled with random targeted ad campaigns, they won’t be happy. Avoid losing user trust — and facing a potential lawsuit — by informing users what their data will be used for. Give them the option to consent to opt-in or opt-out of letting you use their personal information. If users are also assured you’ll safeguard personal information against unauthorised access, they’ll be more likely to trust you to handle their data securely.
    • Protecting data against breaches means investing in technology that will let you end-to-end encrypt and securely store data. Other important data-security best practices include access control, backing up data regularly and network and physical security of assets.

    A fine line separates digital marketing analytics and misusing user data — many companies have gotten into big trouble for crossing it. (By big trouble, we mean millions of dollars in fines.) When it comes to digital marketing analytics, you should never cut corners when it comes to user privacy and data security. This balance involves understanding what data can be collected and what should be collected and respecting user boundaries and preferences.

    A balanced scale with a salesperson on one side and money/profit on the other

    Learn more 

    We discussed a lot of facets of digital marketing analytics, namely how to develop a robust digital marketing strategy while prioritising data compliance. With Matomo, you can protect user data and respect user privacy while gaining invaluable insights into user behaviour with 100% accurate data. Save your organisation time and money by investing in a web analytics solution that gives you the best of both worlds. 

    If you’re ready to begin using ethical and robust digital marketing analytics on your website, try Matomo. Start your 21-day free trial now — no credit card required.

  • Getting and decoding video by RTP H264

    29 novembre 2023, par AlekseiKraev

    Parsing RTP H264.
WINAPI C. A queue from C++ has been applied, I repent.

    


    RTP is generated using FFMPEG with the following command :
ffmpeg.exe -f gdigrab -framerate 25 -i desktop -s 853x480 -b:v 120000 -c:v libx264 -f rtp rtp ://127.0.0.1:8080

    


    Parsing the incoming RTP/h264 stream and converting it to an RGB matrix.

    


    video_H264_decode.h

    


    #pragma once
#ifndef _VIDEO_H264_DECODE_SEND_H // Блокируем повторное включение этого модуля
#define _VIDEO_H264_DECODE_SEND_H
//******************************************************************************
// Section include
//******************************************************************************
#include "main.h"
#include 
//******************************************************************************
// Constants
//******************************************************************************

//******************************************************************************
// Type
//******************************************************************************
typedef struct {
    unsigned char* data;
    int size;
}RTPData_DType;

typedef struct 
{
    union
    {
        struct
        {
            char V:2;               //Версия
            char P:1;               //заполнение
            char X:1;               //расширение
            char CC:4;              //количество CSRC

            char M:1;               //маркер (флаг последнего пакета AU),
            char PT:7;              //полезная нагрузка (тип данных носителя полезной нагрузки RTP, H264 = 96)

            short sequence_number;  //Порядковый номер: порядковый номер пакета RTP, увеличенный на 1.
            int time_stamp;         //временная метка выборки медиа. 
            int SSRC;               //Пакет данных имеет одинаковое происхождение.
        };
        unsigned char data[12];
    };
}RTPHeader_DType;
//******************************************************************************
// Global var
//******************************************************************************

//******************************************************************************
// Local function prototype
//******************************************************************************
UCHAR rtp_H264_recive_init(void);
UCHAR RTPStop(void);
//******************************************************************************
// Macros
//******************************************************************************
#define BYTE2_SWAP(X)   ((((short)(X) & 0xff00) >> 8) |(((short)(X) & 0x00ff) << 8))
#endif
//******************************************************************************
// ENF OF FILE
//******************************************************************************


    


    video_H264_decode.c

    


    //******************************************************************************&#xA;//include&#xA;//******************************************************************************&#xA;#include "main.h"&#xA;/*#include "video_H264_decode.h"&#xA;#include &#xA;#include &#xA;#include <chrono>&#xA;#include &#xA;&#xA;#pragma comment(lib, "ws2_32.lib")&#xA;#include */&#xA;#include <iostream>&#xA;#include <queue>&#xA;&#xA;extern "C" {&#xA;#include "libavformat/avformat.h"&#xA;#include "libavfilter/avfilter.h"&#xA;#include "libavdevice/avdevice.h"&#xA;#include "libswscale/swscale.h"&#xA;#include "libswresample/swresample.h"&#xA;#include "libpostproc/postprocess.h"&#xA;#include "libavcodec/avcodec.h"&#xA;}&#xA;&#xA;#pragma comment(lib,"avcodec.lib")&#xA;#pragma comment(lib,"avdevice.lib")&#xA;#pragma comment(lib,"avfilter.lib")&#xA;#pragma comment(lib,"avformat.lib")&#xA;#pragma comment(lib,"avutil.lib")&#xA;#pragma comment(lib,"postproc.lib")&#xA;#pragma comment(lib,"swresample.lib")&#xA;#pragma comment(lib,"swscale.lib")&#xA;&#xA;#pragma warning(disable: 4996)&#xA;//******************************************************************************&#xA;// Section for determining the variables used in the module&#xA;//******************************************************************************&#xA;//------------------------------------------------------------------------------&#xA;// Global&#xA;//------------------------------------------------------------------------------&#xA;&#xA;//------------------------------------------------------------------------------&#xA;// Local&#xA;//------------------------------------------------------------------------------&#xA;const int inteval = 0x01000000;&#xA;BOOL FlagRTPActive = TRUE;&#xA;&#xA;HANDLE hMutexRTPRecive;&#xA;HANDLE hSemaphoreRTP;&#xA;HANDLE hTreadRTPRecive;&#xA;HANDLE hTreadRTPDecode;&#xA;&#xA;&#xA;SOCKET RTPSocket; //socket UDP RTP&#xA;RTPData_DType packet;&#xA;RTPData_DType FU_buffer = { 0 };&#xA;&#xA;std::queue q;&#xA;std::set<int> seq;&#xA;&#xA;AVFormatContext* pAVFormatContext;&#xA;AVCodecContext* pAVCodecContext;&#xA;const AVCodec* pAVCodec;&#xA;AVFrame* pAVFrame;&#xA;AVFrame* AVFrameRGG;&#xA;SwsContext* pSwsContext;&#xA;AVPacket *pAVPacket;&#xA;AVCodecParserContext* pAVCodecParserContext;&#xA;&#xA;UINT port;&#xA;//******************************************************************************&#xA;// Section of prototypes of local functions&#xA;//******************************************************************************&#xA;DWORD WINAPI rtp_H264_recive_Procedure(CONST LPVOID lpParam);&#xA;DWORD WINAPI rtp_decode_Procedure(CONST LPVOID lpParam);&#xA;char RTPSocketInit(void);&#xA;void RTPPacketParser(void);&#xA;char RTPSocketRecive(void);&#xA;void Decode_NaluToAVFrameRGG();&#xA;//******************************************************************************&#xA;// Section of the description of functions&#xA;//******************************************************************************&#xA;UCHAR rtp_H264_recive_init(void)&#xA;{&#xA;    hSemaphoreRTP = CreateSemaphore(&#xA;        NULL,           // default security attributes&#xA;        0,              // initial count&#xA;        1,              // maximum count&#xA;        NULL);          // unnamed semaphore&#xA;&#xA;    hMutexRTPRecive = CreateMutex(&#xA;        NULL,              // default security attributes&#xA;        FALSE,             // initially not owned&#xA;        NULL);             // unnamed mutex&#xA;&#xA;    hTreadRTPRecive = CreateThread(NULL, NULL, rtp_H264_recive_Procedure, NULL, NULL, NULL);&#xA;    hTreadRTPDecode = CreateThread(NULL, NULL, rtp_decode_Procedure, NULL, NULL, NULL);&#xA;&#xA;    return 0;&#xA;}&#xA;//------------------------------------------------------------------------------&#xA;UCHAR RTPStop(void)&#xA;{&#xA;    FlagRTPActive = FALSE;&#xA;&#xA;    if (hSemaphoreRTP) CloseHandle(hSemaphoreRTP);&#xA;    if (hMutexRTPRecive) CloseHandle(hMutexRTPRecive);&#xA;    if (hTreadRTPRecive) CloseHandle(hTreadRTPRecive);&#xA;&#xA;    closesocket(RTPSocket);  &#xA;&#xA;    return 0;&#xA;}&#xA;//------------------------------------------------------------------------------&#xA;DWORD WINAPI rtp_H264_recive_Procedure(CONST LPVOID lpParam)&#xA;{&#xA;    while (RTPSocketInit() == 0)&#xA;        Sleep(2000);&#xA;       &#xA;    while (1)&#xA;    {&#xA;        RTPSocketRecive();&#xA;        RTPPacketParser();&#xA;        ReleaseSemaphore(hSemaphoreRTP, 1, NULL);&#xA;    }&#xA;}&#xA;//------------------------------------------------------------------------------&#xA;DWORD WINAPI rtp_decode_Procedure(CONST LPVOID lpParam)&#xA;{&#xA;    port = param.Option.VideoPort;&#xA;&#xA;    pAVPacket = av_packet_alloc();&#xA;    if (!pAVPacket)&#xA;    {&#xA;        MessageBox(NULL, L"ERROR Could not allocate pAVPacket", L"Init decoder error", MB_OK | MB_ICONERROR);&#xA;        exit(1);&#xA;    }&#xA;    av_init_packet(pAVPacket);&#xA;&#xA;    /* find the MPEG-1 video decoder */&#xA;    pAVCodec = avcodec_find_decoder(AV_CODEC_ID_H264);&#xA;    if (!pAVCodec)&#xA;    {&#xA;        MessageBox(NULL, L"ERROR Codec not found", L"Init decoder error", MB_OK | MB_ICONERROR);&#xA;        exit(1);&#xA;    }&#xA;&#xA;    pAVCodecParserContext = av_parser_init(pAVCodec->id);&#xA;    if (!pAVCodecParserContext)&#xA;    {&#xA;        MessageBox(NULL, L"ERROR Parser not found", L"Init decoder error", MB_OK | MB_ICONERROR);&#xA;        exit(1);&#xA;    }&#xA;&#xA;    pAVCodecContext = avcodec_alloc_context3(pAVCodec);&#xA;    if (!pAVCodecContext) &#xA;    {&#xA;        MessageBox(NULL, L"ERROR Could not allocate video codec context", L"Init decoder error", MB_OK | MB_ICONERROR);&#xA;        exit(1);&#xA;    }&#xA;               &#xA;    if (avcodec_open2(pAVCodecContext, pAVCodec, NULL) &lt; 0)&#xA;    {&#xA;        MessageBox(NULL, L"ERROR Could not open codec", L"Init decoder error", MB_OK | MB_ICONERROR);&#xA;        exit(1);&#xA;    }&#xA;&#xA;    pAVFrame = av_frame_alloc();&#xA;    if (!pAVFrame) &#xA;    {&#xA;        MessageBox(NULL, L"ERROR Could not allocate video frame", L"Init decoder error", MB_OK | MB_ICONERROR);&#xA;        exit(1);&#xA;    }    &#xA;    &#xA;    while (FlagRTPActive)&#xA;    {&#xA;        if(port != param.Option.VideoPort)&#xA;            closesocket(RTPSocket);&#xA;&#xA;        WaitForSingleObject(hSemaphoreRTP, 500);        &#xA;        Decode_NaluToAVFrameRGG();&#xA;    }&#xA;&#xA;    avformat_free_context(pAVFormatContext);&#xA;    av_frame_free(&amp;pAVFrame);&#xA;    avcodec_close(pAVCodecContext);&#xA;    av_packet_free(&amp;pAVPacket);&#xA;&#xA;    &#xA;    if (hTreadRTPDecode) CloseHandle(hTreadRTPDecode);&#xA;&#xA;    return 0;&#xA;}&#xA;&#xA;//------------------------------------------------------------------------------&#xA;char RTPSocketInit(void)&#xA;{    &#xA;    sockaddr_in RTPSocketAddr;&#xA;    &#xA;    RTPSocketAddr.sin_family = AF_INET;&#xA;    RTPSocketAddr.sin_addr.s_addr = htonl(INADDR_ANY);&#xA;    RTPSocketAddr.sin_port = htons(param.Option.VideoPort);&#xA;&#xA;    RTPSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);&#xA;    if (RTPSocket == INVALID_SOCKET)&#xA;    {&#xA;        MessageBox(NULL, L"ERROR Invalid RTP Socket", L"UDP Socket", MB_OK | MB_ICONERROR);&#xA;        return 0;&#xA;    }&#xA;&#xA;    int option = 12000;&#xA;    if (setsockopt(RTPSocket, SOL_SOCKET, SO_RCVBUF, (char*)&amp;option, sizeof(option)) &lt; 0)&#xA;    {&#xA;        printf("setsockopt failed\n");&#xA;&#xA;    }&#xA;&#xA;    /*option = TRUE;&#xA;    if (setsockopt(RTPSocket, SOL_SOCKET, SO_CONDITIONAL_ACCEPT, (char*)&amp;option, sizeof(option)) &lt; 0)&#xA;    {&#xA;        printf("setsockopt failed\n");&#xA;&#xA;    }*/&#xA;&#xA;    if (bind(RTPSocket, (sockaddr*)&amp;RTPSocketAddr, sizeof(RTPSocketAddr)) == SOCKET_ERROR)&#xA;    {&#xA;        MessageBox(NULL, L"ERROR bind", L"UDP Socket", MB_OK | MB_ICONERROR);&#xA;        closesocket(RTPSocket);&#xA;        return 0;&#xA;    }&#xA;    return 1;&#xA;}&#xA;&#xA;//------------------------------------------------------------------------------&#xA;char RTPSocketRecive(void)&#xA;{&#xA;    static char RecvBuf[2000];&#xA;    static int BufLen = 2000;&#xA;&#xA;    int iResult = 0;&#xA;    struct sockaddr_in SenderAddr;&#xA;    int SenderAddrSize = sizeof(SenderAddr);&#xA;    TCHAR szErrorMsg[100];&#xA;&#xA;    iResult = recvfrom(RTPSocket, RecvBuf, BufLen, 0, NULL, NULL);&#xA;    if (iResult == SOCKET_ERROR &amp;&amp; FlagRTPActive == TRUE)&#xA;    {&#xA;        StringCchPrintf(szErrorMsg, 100, L"ERROR recvfrom Ошибка:%d", WSAGetLastError());&#xA;        MessageBox(NULL, szErrorMsg, L"UDP Socket", MB_OK | MB_ICONERROR);&#xA;        return -1;&#xA;    }&#xA;&#xA;    packet.data = (unsigned char*)RecvBuf;&#xA;    packet.size = iResult;&#xA;&#xA;    return 1;&#xA;}&#xA;&#xA;//------------------------------------------------------------------------------&#xA;void RTPPacketParser(void)&#xA;{&#xA;    RTPHeader_DType RTPHeader;&#xA;    RTPData_DType NALU;&#xA;    unsigned char* buffer = packet.data;&#xA;    int pos = 0;&#xA;    static int count = 0;&#xA;    static short lastSequenceNumber = 0xFFFF;&#xA;    short type;&#xA;    char payload_header;&#xA;&#xA;    //read rtp header&#xA;    memcpy(&amp;RTPHeader, buffer, sizeof(RTPHeader));&#xA;    RTPHeader.sequence_number = BYTE2_SWAP(RTPHeader.sequence_number);&#xA;    pos &#x2B;= 12;    &#xA;  &#xA;    if (RTPHeader.X) {&#xA;        //profile extension&#xA;        short define;&#xA;        short length;&#xA;        length = buffer[pos &#x2B; 3];//suppose not so long extension&#xA;        pos &#x2B;= 4;&#xA;        pos &#x2B;= (length * 4);&#xA;    }&#xA;&#xA;    payload_header = buffer[pos];&#xA;    type = payload_header &amp; 0x1f; //Тип полезной нагрузки RTP&#xA;    pos&#x2B;&#x2B;;&#xA;    &#xA;    //STAP-A&#xA;    if (type == 24)&#xA;    {        &#xA;        while (pos &lt; packet.size)&#xA;        {&#xA;            unsigned short NALU_size;&#xA;            memcpy(&amp;NALU_size, buffer &#x2B; pos, 2);&#xA;            NALU_size = BYTE2_SWAP(NALU_size);&#xA;            pos &#x2B;= 2;&#xA;            char NAL_header = buffer[pos];&#xA;            short NAL_type = NAL_header &amp; 0x1f;&#xA;&#xA;            if (NAL_type == 7) &#xA;            {&#xA;                count&#x2B;&#x2B;;&#xA;                //cout&lt;&lt;"SPS, sequence number: "&lt;/cout&lt;&lt;"PPS, sequence number: "&lt;/cout&lt;&lt;"end of sequence, sequence number: "&lt; 0) &#xA;            {&#xA;                NALU.data = (unsigned char*) malloc(NALU_size &#x2B; 4);&#xA;                NALU.size = NALU_size &#x2B; 4;&#xA;                memcpy(NALU.data, &amp;inteval, 4);&#xA;                memcpy(NALU.data &#x2B; 4, &amp;buffer[pos], NALU_size);&#xA;&#xA;                WaitForSingleObject(hMutexRTPRecive, INFINITE);&#xA;                q.push(NALU);&#xA;                ReleaseMutex(hMutexRTPRecive);&#xA;            }&#xA;&#xA;            pos &#x2B;= NALU_size;&#xA;        }&#xA;    }&#xA;    //FU-A Fragmentation unit&#xA;    else if (type == 28)&#xA;    {        &#xA;        //FU header&#xA;        char FU_header = buffer[pos];&#xA;        bool fStart = FU_header &amp; 0x80;&#xA;        bool fEnd = FU_header &amp; 0x40;&#xA;&#xA;        //NAL header&#xA;        char NAL_header = (payload_header &amp; 0xe0) | (FU_header &amp; 0x1f);&#xA;        short NAL_type = FU_header &amp; 0x1f;&#xA;        if (NAL_type == 7) &#xA;        {&#xA;            count&#x2B;&#x2B;;&#xA;            //SPS&#xA;        }&#xA;        else if (NAL_type == 8) &#xA;        {&#xA;            //PPS&#xA;        }&#xA;        else if (NAL_type == 10) &#xA;        {&#xA;            //end of sequence&#xA;        }&#xA;        pos&#x2B;&#x2B;;&#xA;&#xA;        int size = packet.size - pos;&#xA;        &#xA;        if (count > 0)&#xA;        {&#xA;            if (fStart) &#xA;            {&#xA;                if (FU_buffer.size != 0)&#xA;                {&#xA;                    free(FU_buffer.data);&#xA;                    FU_buffer.size = 0;&#xA;                }&#xA;                FU_buffer.data = (unsigned char*)malloc(size &#x2B; 5);&#xA;                if (FU_buffer.data == NULL)&#xA;                    return;&#xA;                FU_buffer.size = size &#x2B; 5;&#xA;                memcpy(FU_buffer.data, &amp;inteval, 4);&#xA;                memcpy(FU_buffer.data &#x2B; 4, &amp;NAL_header, 1);&#xA;                memcpy(FU_buffer.data &#x2B; 5, buffer &#x2B; pos, size);&#xA;            }&#xA;            else&#xA;            {&#xA;                unsigned char* temp = (unsigned char*)malloc(FU_buffer.size &#x2B; size);&#xA;                memcpy(temp, FU_buffer.data, FU_buffer.size);&#xA;                memcpy(temp &#x2B; FU_buffer.size, buffer &#x2B; pos, size);&#xA;                if (FU_buffer.size != 0) free(FU_buffer.data);&#xA;                FU_buffer.data = temp;&#xA;                FU_buffer.size &#x2B;= size;&#xA;            }&#xA;&#xA;            if (fEnd)&#xA;            {&#xA;                NALU.data = (unsigned char*)malloc(FU_buffer.size);&#xA;                NALU.size = FU_buffer.size;&#xA;                memcpy(NALU.data, FU_buffer.data, FU_buffer.size);&#xA;&#xA;                WaitForSingleObject(hMutexRTPRecive, INFINITE);&#xA;                q.push(NALU);&#xA;                ReleaseMutex(hMutexRTPRecive);&#xA;&#xA;                free(FU_buffer.data);&#xA;                FU_buffer.size = 0;&#xA;            }&#xA;        }&#xA;        &#xA;    }&#xA;    else &#xA;    {&#xA;        //other type&#xA;        short NAL_type = type;&#xA;        if (NAL_type == 7) &#xA;        {&#xA;            count&#x2B;&#x2B;;&#xA;            //SPS&#xA;        }&#xA;        else if (NAL_type == 8) &#xA;        {&#xA;            //PPS&#xA;        }&#xA;        else if (NAL_type == 10) &#xA;        {&#xA;            //end of sequence&#xA;        }&#xA;&#xA;        int size = packet.size - pos &#x2B; 1;&#xA;        if (count > 0)&#xA;        {&#xA;            NALU.data = (unsigned char*)malloc(size&#x2B;4);&#xA;            NALU.size = size &#x2B; 4;&#xA;            memcpy(NALU.data, &amp;inteval, 4);&#xA;            memcpy(NALU.data &#x2B; 4, &amp;buffer[12], size);&#xA;&#xA;            WaitForSingleObject(hMutexRTPRecive, INFINITE);&#xA;            q.push(NALU);&#xA;            ReleaseMutex(hMutexRTPRecive);&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;//------------------------------------------------------------------------------&#xA;void Decode_NaluToAVFrameRGG()&#xA;{&#xA;    unsigned char cntNALU;&#xA;    int len = 0;&#xA;    static int size = 0;&#xA;    unsigned char* data = NULL;&#xA;    int ret;&#xA;    RTPData_DType NALU;&#xA;&#xA;    av_frame_unref(pAVFrame);&#xA;    av_packet_unref(pAVPacket);&#xA;&#xA;    while(1)&#xA;    {&#xA;        WaitForSingleObject(hMutexRTPRecive, INFINITE);&#xA;        if (q.empty())&#xA;        {&#xA;            ReleaseMutex(hMutexRTPRecive);&#xA;            break;&#xA;        }&#xA;        NALU = q.front();&#xA;        q.pop();&#xA;        ReleaseMutex(hMutexRTPRecive);&#xA;&#xA;        data = NALU.data;&#xA;        size = NALU.size;&#xA;&#xA;        while(size)&#xA;        {            &#xA;            len = av_parser_parse2(pAVCodecParserContext, pAVCodecContext, &amp;pAVPacket->data, &amp;pAVPacket->size,&#xA;                (uint8_t*)data, size,&#xA;                AV_NOPTS_VALUE, AV_NOPTS_VALUE, AV_NOPTS_VALUE);&#xA;&#xA;            data = len ? data &#x2B; len : data;&#xA;            size -= len;&#xA;            &#xA;            if (pAVPacket->size)&#xA;            {&#xA;                ret = avcodec_send_packet(pAVCodecContext, pAVPacket);&#xA;&#xA;                if(ret == AVERROR_EOF)&#xA;                    MessageBox(NULL, L"the codec has been fully flushed, and there will be no more output frames", L"avcodec_send_packet", MB_OK | MB_ICONERROR);&#xA;&#xA;                if (ret &lt; 0)&#xA;                {&#xA;                    MessageBox(NULL, L"ERROR sending a packet for decoding", L"Decode", MB_OK | MB_ICONERROR);&#xA;                    //exit(1);&#xA;                }&#xA;&#xA;                while (ret >= 0) &#xA;                {&#xA;                    ret = avcodec_receive_frame(pAVCodecContext, pAVFrame);&#xA;                    if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)&#xA;                        break;&#xA;                    else if (ret &lt; 0) {&#xA;                        MessageBox(NULL, L"ERROR during decoding", L"Decode", MB_OK | MB_ICONERROR);&#xA;                        //exit(1);&#xA;                    }&#xA;                    &#xA;                    AVFrameRGG = av_frame_alloc();                                       &#xA;                    pSwsContext = sws_getContext(pAVCodecContext->width, pAVCodecContext->height, pAVCodecContext->pix_fmt,&#xA;                        pAVCodecContext->width, pAVCodecContext->height, AV_PIX_FMT_RGB24, SWS_SPLINE,&#xA;                        0, 0, 0);&#xA;&#xA;                    sws_scale_frame(pSwsContext, AVFrameRGG, pAVFrame);&#xA;                                        &#xA;                    ImgBufferSet(AVFrameRGG->data[0], pAVCodecContext->height, pAVCodecContext->width, AVFrameRGG->linesize[0]);&#xA;&#xA;                    sws_freeContext(pSwsContext);&#xA;                    av_frame_free(&amp;AVFrameRGG);&#xA;                }&#xA;            }&#xA;        }&#xA;        free(NALU.data);&#xA;        NALU.size = 0;&#xA;    }    &#xA;}&#xA;&#xA;</int></queue></iostream></chrono>

    &#xA;

    It's DECIDED

    &#xA;