Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8076597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:17:33+00:00 2026-06-05T15:17:33+00:00

I have a media player I’ve created in C, and its running along side

  • 0

I have a media player I’ve created in C, and its running along side a server I have in Python. The server accepts commands to modify a play list that resides in an SQLite database.

Once the python code updates the DB (This happens in the background while the media player is playing) it needs to let the player know a new playlist is in the DB so it can start playing the new files.

I was going to set a flag in the DB, and the player can constantly poll this flag, but I don’t think this is the best way. All the options I can think of involve the media player constantly checking for something.

What would be the best way of going about this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:17:34+00:00Added an answer on June 5, 2026 at 3:17 pm

    There are many ways you can do that:

    1. Signals – send SIGUSR1 signal to player from Python.
    2. Sockets – player listens on some port and Python sends some data on that port (UDP will be easiest in that case).
    3. Fifo – there is mkfifo on Linux machines. Files created that way works similar to sockets.

    I would recommend UDP sockets. It’s easy, fast and more elegant than signals. Python code would be something about 3 lines of code.

    Example Python code:

    sock = socket.socket()
    sock.connect(('localhost', 9999))
    sock.sendall('update')
    sock.close()
    

    Example C UDP server:
    http://www.cs.ucsb.edu/~almeroth/classes/W01.176B/hw2/examples/udp-server.c

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have an swf media player which play flv videos but i want it
hi i have create one simple media player.... now its working fine. i retrieve
I am making media player and i have progress bar in it. When play
I have create the service which implement the media player class to play the
I have two lists for a media player - the play queue and the
I have a simple ASP.NET page that uses the VLC media player to play
What I'm looking for is to have media player plugin, which will be able
i have windows media player in my application.i want to allow only the supported
We have our own media player built in Javascript and I was wondering if
I would like to implement the following behaviour: I have a special media player,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.